API referenceEndpointsAuth
auth.me
RPC auth.me · Scope any authenticated principal · Scope of the answer the organization — x-plane-environment does not change it
AuthorizationBearer <token>
A Plane API key, pl_<env>_…. The key is the environment: everything it reads and writes is scoped to the environment it was minted in, and the two tenancy headers are ignored for one.
In: header
Header Parameters
x-plane-environment?string
The environment slug this request is about. Honoured only for a session cookie; ignored for an API key, whose environment is its identity.
x-plane-organization?string
The organization slug or id this request is about, resolved before the environment. Honoured only for a session cookie.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/auth/me"{ "principal": "apiKey", "user": { "id": "string", "email": "string", "displayName": "string" }, "keyId": "string", "organization": { "id": "string", "slug": "string", "name": "string", "workosOrganizationId": "string", "createdAt": "string", "updatedAt": "string" }, "organizations": [ { "organization": { "id": "string", "slug": "string", "name": "string", "workosOrganizationId": "string", "createdAt": "string", "updatedAt": "string" }, "role": "owner", "status": "active" } ], "environment": { "id": "string", "organizationId": "string", "slug": "string", "name": "string", "kind": "production", "group": "string", "expiresAt": "string", "spend": { "agentMinutesPerMonth": 0, "tokensPerMonth": 0, "dailyUsd": 0 }, "retention": { "sessionEventsDays": 0, "deliveredHooksDays": 0, "deadHooksDays": 0, "spansDays": 0, "usageRollupDays": 0 }, "createdBy": "string", "createdAt": "string", "updatedAt": "string", "archivedAt": "string" }, "role": "owner", "scopes": [ "read" ], "loginMode": "workos"}