API reference

Account

The API key in use and its agency, to check a setup.

Retrieve the current key

GET /me

Returns the agency and API key the request was authenticated with, and the key's scopes. Needs no scope.

No scope needed

Returns

200 The key and its agency.

Fields (object)
  • agency object
    Show fields of agency
    • id uuid
    • name string
  • apiKey object
    Show fields of apiKey
    • id uuid
    • scopes array of string
  • 401 The API key is missing, invalid or revoked.
  • 403 The key lacks the scope (CAPABILITY_REQUIRED), the plan has no API access (PLAN_NOT_ENTITLED), or, when creating a request, the monthly limit is reached (PLAN_LIMIT_REACHED).
  • 429 Rate limited (RATE_LIMITED); wait for Retry-After seconds.
Request
curl "https://api.agencyaccess.co/api/v2/me" \
  -H "Authorization: Bearer $AGENCYACCESS_API_KEY"
Response 200
{
  "data": {
    "agency": {
      "id": "0b3e5f7a-1c2d-4e6f-8a9b-0c1d2e3f4a5b",
      "name": "Acme Marketing"
    },
    "apiKey": {
      "id": "9e8d7c6b-5a49-4382-a1b0-c9d8e7f6a5b4",
      "scopes": [
        "clients:read",
        "clients:create",
        "requests:read",
        "requests:create"
      ]
    }
  },
  "meta": {
    "requestId": "req_1f0b6c2e9a7d4f58b3c1e6a9d2f4b7c0"
  }
}