API
Level's read-only HTTP API — pull your reports, campaigns, ad accounts and segments into a warehouse, a spreadsheet or a BI tool, without a person signing in.
Every number Level shows on screen can also be fetched over HTTP. The public API
is read-only, versioned under /v1, and meant for the things that run without a
person in front of them: a nightly warehouse job, a Looker Studio or Power BI
connector, a spreadsheet that refreshes itself, an internal dashboard.
curl -H "Authorization: Bearer $TOKEN" \
"https://api.marketing-bar.com/v1/reports/$REPORT_ID/data?dateFrom=2026-08-01&dateTo=2026-08-31"
What it is, in five lines
- Base URL —
https://api.marketing-bar.com, every path under/v1. - Read-only. Every endpoint is a
GET. There is no write scope, because there is no write path — nothing you do over the API can change a report, a budget or a campaign. - Server-to-server. Credentials are an OAuth2 client secret, and browsers are
deliberately shut out (there are no CORS headers on
/v1). Call it from your backend, your scheduler or your BI tool — never from a web page. - One organization per credential. A client reads exactly the organization it was issued in, and only the reports and ad accounts you listed for it.
- Business plan and above. See Plans & limits.
Four steps to the first response
Issue a client
On the API clients screen of your organization, create a client, pick what it may read, and copy the secret — it is shown once. See API clients.
Exchange the secret for a token
POST /api/connect/token with grant_type=client_credentials returns a token that
lives one hour. See Authentication.
Ask who you are
GET /v1/me costs no quota and answers with the client's scopes, plan state,
remaining requests and allow-list sizes. It is the first call to make when
something looks wrong.
Read the data
GET /v1/reports/{id}/data for the numbers, plus endpoints for campaigns, ad
accounts, segments, organizations and the metric catalogues. See
Endpoints.
The rest of the section
- API clients — issuing credentials, scopes, allow-lists, rotating and revoking secrets.
- Authentication — the token request, what the token carries, how long revocation takes.
- Endpoints — all sixteen paths, their parameters, paging and caching.
- Quotas & rate limits — the hourly budget, what each call costs, and the headers that tell you where you stand.
- Errors — the thirteen problem types and what to do about each one.
The machine-readable reference
The OpenAPI document is served by the API itself and is the contract of record:
GET /v1/openapi.json | The OpenAPI 3.1 document — import it into Postman, Insomnia or a code generator. |
GET /v1/docs | The same document rendered as a browsable reference. |
Neither path needs a token and neither costs quota.