Create campaigns, upload contacts, and read stats over HTTP.
The /campaign surface manages outbound calling campaigns: the campaign itself, the contacts you dial, the schedule and agent configurations that drive them, and the org-wide concurrency limit. Every route lives under the /campaign prefix on https://api.anyreach.ai.For the product walkthrough, see Campaigns. For credentials and the X-Anyreach-Org header, see Authentication.
Read endpoints accept either campaigns:read or campaigns:manage. Mutating endpoints — create, update, start, pause, close, upsert, delete — require campaigns:manage.The concurrency endpoints have their own scopes: GET /campaign/concurrency-settings accepts campaigns:read, campaigns:manage, concurrency:read, or concurrency:manage; PUT accepts campaigns:manage or concurrency:manage.A 403 means the credential is valid but lacks the required scope. See Authentication for how scopes are granted.
Wherever a path takes a campaign {id} or a {contact_id}, you can pass either the resource’s UUID or the external_id you assigned on create. This applies to campaign, contact, start/pause/close, and stats routes — set external_id once and address the resource by your own key thereafter.
Pass default as the campaign {id} on the contacts routes to manage ad-hoc contacts that belong to no campaign. Contacts added under default must already carry valid E.164 phone numbers, since there is no configuration to supply a default country code.
GET /campaign/campaigns also accepts name (substring filter) and status (repeatable) query parameters. GET .../contacts accepts a status filter. The contacts response echoes total, limit, and offset alongside the contacts array.
POST /campaign/campaigns/{id}/contacts upserts: contacts are updated when their id or external_id matches an existing row, and inserted otherwise. It returns counts plus the resolved IDs:
Phone numbers are normalized to E.164 using the campaign configuration’s default_country_code (falling back to +1). Numbers that can’t be parsed return 422. You cannot add contacts to a campaign whose status is closed (400).
Upsert two contacts into a campaign addressed by its external_id. With an org API key (ak_) the organization is implicit; with a personal access token (pat_) add the X-Anyreach-Org header.