Skip to main content
GET

Overview

Fetch a single campaign’s name and status, and a paginated list of its contacts. Each contact comes with the result of its latest call attempt. You can filter by call status, outcome, duration and date, search by phone number or call ID, and sort.

Prerequisites

  • An API key for your workspace
  • The campaign’s batchId: the _id from Get Campaigns, the ID returned when you created the campaign, or the last part of the campaign’s URL in the dashboard. The campaign must have been created by the user who owns the API key.

Request

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.
string
required
ID of the campaign.
integer
default:"1"
Page number. Ignored when cursor is sent.
integer
default:"10"
Contacts per page, from 1 to 500. Larger values are capped at 500.
string
Cursor for the next page. Pass the data.nextCursor value from the previous response, with the same sortBy, sortOrder, filter and search. Faster than page for large campaigns.
string
default:"updatedAt"
Field to sort by: updatedAt, createdAt, retry_count, call_started_at, call_duration or call_status. Any other value sorts by createdAt.
string
default:"desc"
asc for ascending. Any other value sorts descending.
Matches contacts whose phone number contains this text, or whose call has exactly this call ID (request_uuid, call_uuid or stream ID).
string
URL-encoded JSON object. Applies to each contact’s latest call attempt. Fields:
  • call_status – array of statuses, for example ["completed", "no-answer"]
  • call_outcome – array of call outcomes
  • hangup_source – array of hangup sources
  • call_durationMin, call_durationMax – call duration in seconds
  • createdAtMin, createdAtMax – call start time (ISO 8601)
  • crm_sync_status – array of synced, failed or not_synced. Covers webhook and Google Sheet syncs only.
Example: {"call_status":["completed"],"call_durationMin":30}. Unknown fields are ignored, and a value that isn’t valid JSON is ignored, so check the total you get back.

Response

string
required
Campaign ID.
string
required
Campaign name.
string
required
Campaign status: pending, in-progress, paused, freezed (outside the calling window), completed or failed.
boolean
true when the campaign sends call outcomes to a CRM, webhook or Google Sheet, or has done so before.
boolean
true when webhook or Google Sheet sync records exist for this campaign, so the crm_sync_status filter applies.
integer
required
Current page number.
integer
required
Contacts per page.
integer
required
Number of contacts matching the filter and search.
integer
required
Number of pages.
string | null
Cursor to pass as cursor for the next page. null when this page is empty.
array[object]
required
The contacts on this page.
string
Contact (call) ID.
string
Contact’s phone number. Masked when phone number masking is turned on for your organization.
integer
Retry counter for this contact. Reset to 0 when the contact is marked for retry.
integer
Number of call attempts ever made to this contact. Unlike retry_count, it is never reset.
string | null
When the next attempt is scheduled, if it is after the latest call started.
boolean
true when the contact won’t be called again.
string | null
Result of the tools the agent ran during calls to this contact: success (all succeeded), warning (some failed), error (all failed), or null (no tools ran). tool_counts gives the success, failure and total counts.
object
The latest call attempt: call_status, call_duration (seconds), call_started_at, hangup_source, hangup_reason, call_outcome, call_journey, call_uuid, request_uuid, and webhook_events (webhook and Google Sheet sync records for this attempt). Fields are null until the contact has been called.
The response doesn’t include the contact’s CSV variables (lead_data) or call transcripts and recordings.

Error Handling

Errors return status: false, with the reason in errorMessage.
  • 400 Bad Request – Invalid Batch ID: batchId is not a valid ID.
  • 401 Unauthorized – Missing or invalid API key.
  • 404 Not Found – Batch not found: no campaign with this ID was created by the user who owns the API key, or it was deleted.
  • 500 Internal Server Error – Unexpected server error.