Read a Campaign's progress
GET /v1/campaigns/{campaign_id}/progress
| Property | Value |
|---|---|
| Operation | get_campaign_progress |
| Group | Campaigns |
| Scope | campaigns:read |
| Route class | read |
| Idempotency | No Idempotency-Key |
| Audit | Not audited: Aggregates and number health: counts, rates and ids, never content. |
| Released in | 1.65.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Answers the progress of a Campaign (1.65.0; section 6): enrollments by status and disposition, attempts by result, reach, spend, opt-outs, the per-arm results with intervals, and an estimated completion labelled an estimate. Counts only; a draft answers zeros.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the campaigns:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl "$VOCAL_API/v1/campaigns/cmp_.../progress" \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/campaigns/cmp_.../progress`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/campaigns/cmp_.../progress",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaign_id | path | CampaignId | yes | The id of a Campaign: cmp_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | CampaignProgress | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden |
404 | application/json | ErrorEnvelope | not_found |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is CampaignProgress.
| Field | Type | Required | Description |
|---|---|---|---|
arms | array of CampaignArmProgress | yes | |
as_of | Timestamp | yes | |
attempts | CampaignAttemptCounts | yes | |
campaign_id | CampaignId | yes | |
enrollments_by_disposition | map of integer | yes | |
enrollments_by_status | map of integer | yes | |
estimated_completion_at | Timestamp or null | yes | An estimate: remaining eligible enrollments over the current rate. |
mean_attempts_to_reach | number or null | yes | |
mean_duration_s | number or null | yes | |
numbers_throttled | integer | yes | |
object | "campaign_progress" | yes | |
opt_outs | integer | yes | |
reach_rate | number or null | yes | |
spend_micros | integer | yes | |
spend_per_reached_micros | integer or null | yes | |
status | CampaignStatus | yes |