auth.md


title: "Auth" description: "GET /v0/auth/me returns the credential making the request: its organization, pod and inbox and its permissions. Use it to discover what a key can reach." canonical: "https://machinemail.dev/docs/reference/api/auth"

Auth

GET /v0/auth/me returns the credential making the request: its organization, pod and inbox and its permissions. Use it to discover what a key can reach.

Source: https://machinemail.dev/docs/reference/api/auth

Method Path Summary
GET /v0/auth/me Who Am I

Who Am I

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)

Field Type Description
scope_type "organization" | "pod" | "inbox" required The scope tier the credential is bound to.
scope_id string required ID of the most specific scope: inbox_id for an inbox credential, pod_id for a pod credential, otherwise organization_id.
organization_id string required ID of the organization.
pod_id string ID of the pod the credential is scoped to. Present when scope_type is pod, and for inbox credentials created under a pod.
inbox_id string ID of the inbox the credential is scoped to. Present when scope_type is inbox.
api_key_id string ID of the API key used. Absent for dashboard sessions and agent access tokens.
api_key_expires_at string (date-time) When the API key used expires. Absent when it does not expire, and for other credentials.
user object The signed-in user, for a dashboard session.

Errors

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

Error bodies use the error envelope.

Example

curl "https://api.machinemail.dev/v0/auth/me" \
  -H "Authorization: Bearer $MACHINEMAIL_API_KEY"
{
  "scope_type": "organization",
  "scope_id": "string",
  "organization_id": "org_01k6x2m9qd0000a7h3kq9v2c4e",
  "pod_id": "pod_01k6x2m9qd0001b8j4mr0w3d5f",
  "inbox_id": "agent@machinemail.dev",
  "api_key_id": "key_01k6x3e8mr0000h4r0ty6c9k1n",
  "api_key_expires_at": "2026-10-01T12:00:00.000Z",
  "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"
  }
}