Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
Account

The current principal and the org it acts in

Returns the calling principal (API key or user session) and the organization the request acts in. For an API key that org is fixed by the key; for a session it is the active org, and availableOrgs lists every org the user belongs to. Unlike /v1/me this works for API keys and does not onboard.

GET
/v1/whoami
AuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer vl_….

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/whoami"
{
  "principalType": "api_key",
  "organizationId": "string",
  "organizationName": "string",
  "userId": "string",
  "email": "string",
  "role": "string",
  "scopes": [
    "string"
  ],
  "availableOrgs": [
    {
      "organizationId": "string",
      "name": "string",
      "role": "string",
      "features": {
        "batch": true,
        "publicEndpoint": true
      }
    }
  ]
}
{
  "error": "string",
  "code": "string"
}

Command line

The orl CLI wraps this endpoint:

orl account whoami