Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Reference Auth API
version: 1.0.0
servers:
- url: https://api.agentmail.to
description: prod
- url: https://x402.api.agentmail.to
description: prod-x402
- url: https://mpp.api.agentmail.to
description: prod-mpp
- url: https://api.agentmail.eu
description: eu-prod
tags:
- name: Auth
paths:
/v0/auth/me:
get:
operationId: auth_me
summary: Who Am I
description: 'Returns the identity and scope of the authenticated credential. Useful when a client holds a pod-scoped or inbox-scoped API key and needs to discover the parent organization, pod, or inbox without prior knowledge.
**CLI:**
```bash
agentmail auth me
```'
tags:
- Auth
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/auth_Identity'
security:
- Bearer: []
components:
schemas:
OrganizationId:
type: string
description: ID of organization.
title: OrganizationId
auth_Identity:
type: object
properties:
scope_type:
$ref: '#/components/schemas/auth_ScopeType'
scope_id:
type: string
description: 'ID of the most specific scope the credential is bound to.
Equals inbox_id when scope_type is inbox, pod_id when pod, organization_id when organization.'
organization_id:
$ref: '#/components/schemas/OrganizationId'
pod_id:
type: string
description: ID of the pod the credential is scoped to. Present when scope_type is pod or inbox.
inbox_id:
type: string
description: ID of the inbox the credential is scoped to. Present when scope_type is inbox.
api_key_id:
type: string
description: ID of the API key used to authenticate. Absent for JWT and proxy credentials.
required:
- scope_type
- scope_id
- organization_id
description: Identity and scope of the authenticated credential.
title: Identity
auth_ScopeType:
type: string
enum:
- organization
- pod
- inbox
description: The scope tier the authenticated credential is bound to.
title: ScopeType
securitySchemes:
Bearer:
type: http
scheme: bearer
x-provenance:
method: harvested
publisher: AgentMail
source: https://docs.agentmail.to/openapi.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)