Skip to content
machinemail

Auth

The credential making the request: its organization, pod, inbox and permissions.

MethodPathSummary
GET/v0/auth/meWho Am I

Who Am I

http
GET /v0/auth/me

The identity and scope of the credential: which organization, pod and inbox it is bound to. Useful with a pod or inbox key to discover its scope.

Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: none beyond a valid key.

Response

200 The credential (application/json)

scope_type"organization" | "pod" | "inbox"Required
The scope tier the credential is bound to.
scope_idstringRequired
ID of the most specific scope: inbox_id for an inbox credential, pod_id for a pod credential, otherwise organization_id.
organization_idstringRequired
ID of the organization.
pod_idstring
ID of the pod the credential is scoped to. Present when scope_type is pod, and for inbox credentials created under a pod.
inbox_idstring
ID of the inbox the credential is scoped to. Present when scope_type is inbox.
api_key_idstring
ID of the API key used. Absent for dashboard sessions and agent access tokens.
userobject
The signed-in user, for a dashboard session.

Errors

StatusMeaning
401Missing, invalid, expired or revoked credential.
500Unexpected server error.

Error bodies use the error envelope.

Example

Request
curl "https://api.machinemail.dev/v0/auth/me" \
  -H "Authorization: Bearer $MACHINEMAIL_API_KEY"
Response 200
{
  "scope_type": "organization",
  "scope_id": "string",
  "organization_id": "org_01k6x2m9qd0000a7h3kq9v2c4e",
  "pod_id": "pod_01k6x2m9qd0001b8j4mr0w3d5f",
  "inbox_id": "agent@machinemail.dev",
  "api_key_id": "key_01k6x3e8mr0000h4r0ty6c9k1n",
  "user": {
    "user_id": "usr_01k6x3j0rw0000n8w4yc0g3q5s",
    "email": "agent@machinemail.dev",
    "name": "Production",
    "organization_id": "org_01k6x2m9qd0000a7h3kq9v2c4e",
    "role": "owner",
    "created_at": "2026-10-01T12:00:00.000Z"
  }
}

On this page

0% read