Base URL
Authentication
All requests require theAuthorization header with an API key. Create keys in the partner cabinet: Tools -> API (partners.onlytraffic.com/tools/api). An account can have up to 5 named keys, each Full or Read-only; a key is shown once at creation, so copy it right away. See Authentication for the details.
See the Authentication page for error codes and detailed setup.
Endpoints
Writing data
A Full-access key reads and writes; Read-only keys get403 on the write endpoints. Write endpoints do exactly what you can do in the cabinet, with the same validation messages. Identifiers in write requests are public ids (revc_… campaign ids, cplo_… CPL campaign ids); numeric internal ids are rejected with 404. Every write answers with the updated object in data, in the same shape as the matching list endpoint.
See the Write API page for the rules and the per-endpoint pages for request bodies.
Pagination
All list endpoints acceptoffset and limit as query parameters. The Stats endpoints aren’t paginated. They take a from / to period instead: a Unix timestamp or a Y-m-d date, at most 366 days apart. CPC Categories isn’t paginated either: it returns the full catalog in one response.
Date formats
Every timestamp field has two variants:- ISO 8601 string (
*_at) e.g."2024-06-01T12:00:00+00:00" - Unix timestamp integer (
*_at_ts/*_ts) e.g.1717243200
Response format
All responses return HTTP200. The actual status is in the status field.