Campaign status
GET
https://api.voice-agent.gowajee.ai/api/campaign/:id/statusReturns the campaign’s status and a count of recipients by their latest call status. 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 } }}{ "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) whose newest call is in each state. The values add up to the total number of recipients. |
statistics key |
Latest call status |
|---|---|
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 |
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. |