Campaign status
GET
https://api.voice-agent.gowajee.ai/api/campaign/:id/statusReturns the campaign’s status and a count of recipients by the status of their latest reached call (or latest call, if none was reached). It is the quickest way to show progress.
Path parameters
Section titled “Path parameters”| Name | Description |
|---|---|
id |
The campaign ID. |
Request
Section titled “Request”curl "https://api.voice-agent.gowajee.ai/api/campaign/eac2489c-672c-455e-ab8c-4e0ecd18d7dc/status" \ -H "X-API-Key: $GOWAJEE_API_KEY"const res = await fetch(`https://api.voice-agent.gowajee.ai/api/campaign/${campaignId}/status`, { headers: { 'X-API-Key': process.env.GOWAJEE_API_KEY },});const { data } = await res.json();data = requests.get( f"https://api.voice-agent.gowajee.ai/api/campaign/{campaign_id}/status", headers={"X-API-Key": os.environ["GOWAJEE_API_KEY"]}, timeout=30,).json()["data"]Response
Section titled “Response”{ "success": true, "message": "Get Campaign status successfully", "data": { "id": "eac2489c-672c-455e-ab8c-4e0ecd18d7dc", "status": "RUNNING", "statistics": { "completed": 812, "noAnswer": 120, "busy": 14, "failed": 3, "cancelled": 0, "queued": 6, "inProgress": 9, "scheduled": 230, "expired": 0, "notStarted": 4, "analyzing": 2, "analysisFailed": 0, "voicemail": 0 } }}{ "success": false, "statusCode": 404, "code": "CAMPAIGN_NOT_FOUND", "message": "Campaign not found", "errors": ["Campaign not found"]}The campaign ID doesn’t exist, or it belongs to another organization.
| Field | Description |
|---|---|
data.status |
The campaign status. |
data.statistics |
The number of recipients (not calls) in each state. Each recipient is counted by their latest reached call (COMPLETED, ANALYZING or ANALYSIS_FAILED) if they have one, otherwise by their newest call, the same as latestCallStatus. So a recipient who was reached is still counted by that call while a later call rings (a Smart Callback or Call again), and after it if it is missed. The values add up to the total number of recipients. |
statistics key |
Status of the latest reached call (or latest call) |
|---|---|
completed |
COMPLETED |
noAnswer |
NO_ANSWER. Recipients waiting for a retry stay here until the retry becomes due. |
busy |
BUSY |
failed |
FAILED |
cancelled |
CANCELLED |
queued |
QUEUED |
inProgress |
IN_PROGRESS |
scheduled |
SCHEDULED: waiting for a calling window or a free line. |
expired |
EXPIRED |
analyzing |
ANALYZING. The call ended and the result is being prepared. |
analysisFailed |
ANALYSIS_FAILED |
voicemail |
VOICEMAIL: an answering machine or IVR picked up. Retried like noAnswer. |
notStarted |
Never called, or RINGING / INITIATED right now. |
Errors
Section titled “Errors”The body is the usual error envelope.
| Status | code |
message |
Cause |
|---|---|---|---|
400 |
INVALID_ID |
id must be a valid UUID |
The id in the path isn’t a UUID. |
404 |
CAMPAIGN_NOT_FOUND |
Campaign not found |
Wrong id, or the campaign belongs to another organization. |