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.
Returns
200 The key and its agency.
Fields (object)
-
agencyobjectShow fields of agency
-
iduuid -
namestring
-
-
apiKeyobjectShow fields of apiKey
-
iduuid -
scopesarray 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 forRetry-Afterseconds.
curl "https://api.agencyaccess.co/api/v2/me" \
-H "Authorization: Bearer $AGENCYACCESS_API_KEY" const res = await fetch("https://api.agencyaccess.co/api/v2/me", {
headers: {
Authorization: `Bearer ${process.env.AGENCYACCESS_API_KEY}`,
},
})
const { data } = await res.json() {
"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"
}
}