REST API keys, OpenAPI and rate limits
Create a scoped API token, call /api/v1 with the OpenAPI spec, submit jobs with an Idempotency-Key, and stay within the rate limits.
Last updated
On this page
The REST API gives scripts and tools like Make or Zapier the same capabilities as MCP, with the same review-then-apply safety.
Create an API token
- Open Connect › MCP & CLI (
/connect/mcp) in AdMassy. - Under Automation tokens, choose:
- Token access: Read only or Read and write (uploads, builds, reviewed launches) (the default),
- optionally the manage checkbox, which lets a write token pause/resume existing Meta objects and edit existing ad copy,
- Automation token duration: 30, 60 or 90 days,
- Performance automation access: No performance access, Read reports, rules and activity, or Read, refresh and manage rules (write tokens only).
- Click Create N-day automation token.
- Copy the secret. It starts with
ads_and is shown only once.
Tokens can only be created from the signed-in app, and never get more rights than your own role. Treat a token like a password and Revoke it in Your automation tokens if it leaks. The Activate API button in Settings › Profile is a shortcut to token setup.
Call the API
Base path: https://app.admassy.com/api/v1
curl https://app.admassy.com/api/v1/... \
-H "Authorization: Bearer ads_…"
OAuth access tokens (from an MCP client) are accepted too.
The full specification is public:
- OpenAPI 3.1:
https://app.admassy.com/api/v1/openapi.json. Each operation listsx-mcp-tools(the matching MCP tools),x-required-scopeandx-mutates. - LLM summary:
https://app.admassy.com/llms.txt.
Submit jobs
Write endpoints follow the reviewed-writes flow:
- Call the preview endpoint. You get a
previewIdand the exact Meta requests. - Submit with the
previewIdand anIdempotency-Keyheader (8–200 characters). The response is 202 with a job ID. - Poll the job until it finishes.
Reuse the same Idempotency-Key with the same body after a timeout; you get the original job back instead of a duplicate.
Rate limits
Per credential (token or OAuth client):
| Type | Limit |
|---|---|
| Read requests | 600 per 60 seconds |
| Write requests | 300 per 60 seconds |
Responses carry X-RateLimit-* headers. Over the limit you get 429 with Retry-After (seconds). Meta's own limits are separate and are handled by the job queue; see Troubleshooting.
OAuth for your own app
Apps that act for other users can use OAuth 2.1 instead of tokens: authorize at /oauth/authorize, exchange at /api/oauth/token, with PKCE (S256) and dynamic client registration. Access tokens last 1 hour; refresh tokens 30 days and rotate.
Make and Zapier
Use an HTTP module with the Bearer token for calls, and a workspace webhook for triggers. See Make, Zapier and webhooks.
Related
Was this article helpful?