Skip to main content
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.

Endpoints

Campaigns

Contacts

Stats

Configurations

Concurrency settings

Scopes

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.

Conventions

Resolving by external_id

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.

Pagination

The two list endpoints paginate differently. 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.

Limits

Stats response

GET /campaign/campaigns/{id}/stats returns contact counts by status, attempt totals, and live activity:
The stats route resolves the campaign by UUID only.

Upsert response

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).

Example: bulk-add contacts

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.

Campaigns

The product walkthrough for building and running outbound campaigns.

Authentication

Bearer credentials, the X-Anyreach-Org header, and scopes.