Skip to main content
Both the File API and the Adclear API authenticate with the same bearer key. Every request needs two headers.

Required headers

The API key is scoped to a single Adclear organisation and workspace. Rate limits apply per key (see Errors & rate limits).

Acting on behalf of Adclear users

By default, actions performed through the API are attributed to the key’s service account, with your X-External-User-ID value recorded alongside for audit purposes. The ID is stored as supplied. Adclear does not verify it. Keys can instead be issued with act-on-behalf enabled, for integrations whose users also have Adclear accounts. On these keys, X-External-User-Email is resolved to the Adclear user with that email, and the action is performed and audited as that person, with their own role and permissions. Two rules apply:
  • The email header is mandatory on every write (POST, PUT, PATCH, DELETE). Writes without it are rejected with 400.
  • An email that does not match an active member of your organisation is rejected with 403. The action is never silently attributed to the service account.
On ordinary keys the email header is ignored. Ask your Adclear contact if you are unsure which kind of key you hold.

Environments

API keys are environment-specific. A staging key won’t authenticate against production, and vice versa.
Build and test your integration against staging before switching to production.

Interactive API reference

Explore and try endpoints in Swagger UI: Machine-readable OpenAPI 3.1 specs:
  • GET https://public-api.adclear.ai/v1/openapi.json
  • GET https://files.adclear.ai/v1/openapi.json

Generate types from the spec

Generate TypeScript types directly from the specs with openapi-typescript: