API reference

Accounts and services

What a request can ask for: your agency's connected accounts that access is granted to, and the services and roles that can be requested.

List connected accounts

GET /accounts

Your agency's connected platform accounts. Use an account's internalAccountId in requestedAccountLinks to choose which of your accounts the client grants access to.

Scope accounts:read

Returns

200 All connected accounts.

Fields (object)
  • internalAccountId string

    Use in requestedAccountLinks.

  • platform string
  • displayName string | null
  • email string | null
  • platformAccountId string | null

    The account's ID on the platform.

  • business object | null
    Show fields of business
    • id string
    • name string | null
  • services array of string

    Services this account can receive access to.

  • status string

    One of connected, disconnected.

  • linkedAt datetime
  • 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/accounts" \
  -H "Authorization: Bearer $AGENCYACCESS_API_KEY"
Response 200
{
  "data": [
    {
      "internalAccountId": "Xk7pQ2mR9vT4wB8nC3dF6hJ1",
      "platform": "Google",
      "displayName": "ads@acme.agency",
      "email": "ads@acme.agency",
      "platformAccountId": null,
      "business": null,
      "services": [
        "Google Ads",
        "Google Analytics",
        "Google Tag Manager"
      ],
      "status": "connected",
      "linkedAt": "2026-03-02T11:00:00.000Z"
    }
  ],
  "meta": {
    "requestId": "req_1f0b6c2e9a7d4f58b3c1e6a9d2f4b7c0"
  }
}

List services

GET /services

Every service that can be requested, with its roles. Use a service's id as the key in requestedServices and one of its role values as accessLevel (leave accessLevel out when roles is empty).

Scope catalog:read

Returns

200 All services.

Fields (object)
  • id string

    The key to use in requestedServices.

  • platform string
  • roles array of object
    Show fields of roles
    • value string
    • label string
    • readOnly boolean
  • grantMethod string

    manual: the client follows instructions instead of granting in one click. One of automatic, manual.

  • clientSignInRequired boolean

    The client signs in with the platform to grant it.

  • accountLinkFields array of object

    Extra fields each requested account link needs.

    Show fields of accountLinkFields
    • name string
    • required boolean
  • 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/services" \
  -H "Authorization: Bearer $AGENCYACCESS_API_KEY"
Response 200
{
  "data": [
    {
      "id": "Google Ads",
      "platform": "Google",
      "roles": [
        {
          "value": "ADMIN",
          "label": "Admin",
          "readOnly": false
        },
        {
          "value": "STANDARD",
          "label": "Standard",
          "readOnly": false
        },
        {
          "value": "READ_ONLY",
          "label": "Read Only",
          "readOnly": true
        },
        {
          "value": "EMAIL_ONLY",
          "label": "Email Only",
          "readOnly": true
        }
      ],
      "grantMethod": "automatic",
      "clientSignInRequired": true,
      "accountLinkFields": []
    },
    {
      "id": "Google Ads MCC",
      "platform": "Google",
      "roles": [],
      "grantMethod": "automatic",
      "clientSignInRequired": true,
      "accountLinkFields": [
        {
          "name": "googleAdsMccAccountId",
          "required": true
        }
      ]
    }
  ],
  "meta": {
    "requestId": "req_1f0b6c2e9a7d4f58b3c1e6a9d2f4b7c0"
  }
}