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.
Returns
200 All connected accounts.
Fields (object)
-
internalAccountIdstringUse in
requestedAccountLinks. -
platformstring -
displayNamestring | null -
emailstring | null -
platformAccountIdstring | nullThe account's ID on the platform.
-
businessobject | nullShow fields of business
-
idstring -
namestring | null
-
-
servicesarray of stringServices this account can receive access to.
-
statusstringOne of
connected,disconnected. -
linkedAtdatetime
- 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 forRetry-Afterseconds.
curl "https://api.agencyaccess.co/api/v2/accounts" \
-H "Authorization: Bearer $AGENCYACCESS_API_KEY" const res = await fetch("https://api.agencyaccess.co/api/v2/accounts", {
headers: {
Authorization: `Bearer ${process.env.AGENCYACCESS_API_KEY}`,
},
})
const { data } = await res.json() {
"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).
Returns
200 All services.
Fields (object)
-
idstringThe key to use in
requestedServices. -
platformstring -
rolesarray of objectShow fields of roles
-
valuestring -
labelstring -
readOnlyboolean
-
-
grantMethodstringmanual: the client follows instructions instead of granting in one click. One ofautomatic,manual. -
clientSignInRequiredbooleanThe client signs in with the platform to grant it.
-
accountLinkFieldsarray of objectExtra fields each requested account link needs.
Show fields of accountLinkFields
-
namestring -
requiredboolean
-
- 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 forRetry-Afterseconds.
curl "https://api.agencyaccess.co/api/v2/services" \
-H "Authorization: Bearer $AGENCYACCESS_API_KEY" const res = await fetch("https://api.agencyaccess.co/api/v2/services", {
headers: {
Authorization: `Bearer ${process.env.AGENCYACCESS_API_KEY}`,
},
})
const { data } = await res.json() {
"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"
}
}