Get Campaign V2

Authentication

AuthorizationBearer
Authenticate server-side requests with a private Vapi API key. Create or copy a key from the [Vapi Dashboard](https://dashboard.vapi.ai) and send it in the `Authorization` header as `Bearer <token>`. Keep private API keys out of client-side code and public repositories.

Path parameters

idstringRequiredformat: "uuid"
The unique identifier for the resource.

Query parameters

includeCountersbooleanOptional

When true, the response includes contactCounters and callMetrics. These are aggregate queries over the campaign’s contacts and events, so they are opt-in rather than paid for on every read. Defaults to false.

Response

statusenum
This is the status of the campaign.
namestring
This is the name of the campaign. This is just for your own reference.
idstring
This is the unique identifier for the campaign.
orgIdstring
This is the unique identifier for the org that this campaign belongs to.
createdAtdatetime

This is the ISO 8601 date-time string of when the campaign was created.

updatedAtdatetime

This is the ISO 8601 date-time string of when the campaign was last updated.

endedReasonenumOptional
This is the explanation for how the campaign ended.
assistantIdstringOptional

This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

squadIdstringOptional

This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

phoneNumberIdstringOptional

This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive.

schedulePlanobjectOptional

This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried.

maxConcurrencydoubleOptional>=1
This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10.
assistantOverridesobjectOptional

These are the overrides for the assistant’s settings and template variables for the campaign. Use this when the campaign targets an assistantId.

squadOverridesobjectOptional

These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a squadId. Per-contact squadOverrides are deep-merged on top of this at dispatch time.

serverobjectOptional

This is the server (URL, auth headers, timeout, etc.) for the campaign webhooks.

serverMessagesenumOptional
These are the messages that will be sent to your Server URL.
predialPlanobjectOptional

This opts the campaign into the blocking campaign.predial eligibility webhook. When set, every contact triggers a campaign.predial POST to the Server URL before dialing, and the response { eligible: boolean } decides whether the call is placed. Requires server. When unset, no pre-dial webhook is sent.

contactCountersobjectOptional

These are the per-status contact counts for this campaign. Sum them for the campaign’s total audience; pending plus dispatched is what is left to complete.

callMetricsobjectOptional

These are the call-level outcomes for this campaign — how many contacts were actually dialed, and how many of those a human picked up.