Identity
Operations tagged Identity in the public API.
About Identity
GET /me identifies the credential: the account the API key belongs to, and the key's own record. It needs no scope, so any working key can call it — use it as a health check for a credential and to read the key's id for self-revocation.
Account, not person. A key belongs to an account and always acts as that account, whoever minted it in the dashboard. id and name are the account owner's: there is no separate account object, and a team member's key reports the owner, not the member.
IDs you will meet.
id— the account id (the owner's user id). Everything the key creates belongs to it; no operation takes it.key.id— the calling key's integer id, the only idDELETE /api_keys/{id}accepts.key.key_id— the key's public identifier, the 16 characters afteragy_live_/agy_test_. Safe to log; no operation takes it.
Identify the calling key
Returns the account the key acts for and the key's own record — its
id, mode, scopes, limits and last use. It needs no scope, so it is
the cheapest way to check that a key works and to read the id that
DELETE /api_keys/{id} accepts for self-revocation. id and name
are the account owner's, whoever minted the key.- Idempotency
- Read-only
- Rate limits
Responses
- 200Success.
objectstringRequiredAlways
accountidintegerRequiredThe account id: the account owner's user id, whoever minted the key.namestringRequiredThe account owner's display name.keyApiKeyResourceRequiredThe API key that authenticated this request.
- 400A tenant selector header named a tenant other than the API key's own (
ACCOUNT_SELECTOR_NOT_SUPPORTED): an all-digitX-Account-Idother than the key owner's id or, whileworkspaces.context_enabledis on, anX-Workspace-Idother than the key's workspace (ws_prefix optional, case-insensitive). A header naming the key's own tenant, or a non-numericX-Account-Id, is ignored; a key cannot switch tenants, so send neither.Error codesACCOUNT_SELECTOR_NOT_SUPPORTED
- 401Missing or invalid API key.
Error codesUNAUTHENTICATED
- 403The API key is missing a required scope.
Error codesACCOUNT_SUSPENDED
- 429Rate limited. Honour the Retry-After header before retrying.
Error codesRATE_LIMITED
- 500Unexpected server error. Retry with the same Idempotency-Key.
Error codesSERVER_ERROR
Request
curl
curl -X GET 'https://api.agentency.com/v1/me' \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"Response
Example 200 response
json
{
"object": "account",
"id": 1,
"name": "Acme Support",
"key": {
"object": "api_key",
"id": 1,
"name": "v1-test",
"mode": "live",
"key_id": "kQ7mX2vB9rT4nW8c",
"masked": "agy_live_kQ7mX2vB9rT4nW8c_••••Zp3H",
"last_four": "Zp3H",
"scopes": [
"chatbots:read",
"chatbots:write",
"knowledge:read",
"knowledge:write",
"crawlers:read",
"crawlers:write",
"conversations:read",
"conversations:write",
"chat:send",
"actions:read",
"actions:write",
"channels:read",
"channels:write",
"customers:read",
"customers:write",
"widget:read",
"widget:write",
"search:read",
"analytics:read",
"billing:read",
"webhooks:read",
"webhooks:write",
"keys:read",
"keys:write",
"files:read",
"files:write",
"profile:read",
"profile:write"
],
"rate_limit_per_minute": null,
"allowed_ips": null,
"expires_at": null,
"last_used_at": null,
"last_used_ip": null,
"revoked_at": null,
"rotation_grace_until": null,
"created_at": "2026-01-01T00:00:00+00:00"
}
}