Resume a campaign

Updated

Continues dialing a paused campaign.

Preview documentation

You're reading the Conversational AI Platform (Preview) docs. Switch to Main.
POST
https://preview.ai.agora.io/conversational-ai/v1/projects/{appid}/campaigns/{campaign_id}:resume

You can resume a campaign whose status is paused.

Path Parameters

appidstring
Required

The App ID of your project.

campaign_idstring
Required

The ID of the campaign, returned in campaign_id when you create the campaign.

Response Body

The campaign was resumed. The response body contains the campaign.

Response Headers

Agora-Request-Idstring

A unique ID for the request. Include it when you contact Agora support.

ETagstring

The current version of the resource. Pass this value in the If-Match header of your next update or delete request for this resource.

campaign_idstring

The ID of the campaign, a UUID.

namestring

The name of the campaign.

statusstring

The status of the campaign:

  • scheduled: The campaign is waiting for its start time.
  • running: The campaign is dialing, or can dial during its schedule.
  • paused: You paused the campaign.
  • completed: The campaign has finished.
  • canceled: You canceled the campaign.
  • failed: The campaign failed. The details are in failure.
agent_idstring

The ID of the agent that makes the calls.

transportobject
lifecycleobject

When each session the campaign starts ends on its own.

scheduleImmediate | Scheduled

When the campaign dials. Pass the fields of one schedule mode only.

countsobject

The number of contacts in each state. Retrieve the campaign to get current counts.

create_tsinteger

The time the campaign was created, as a Unix timestamp in seconds.

start_tsinteger | null

The time the campaign started dialing, as a Unix timestamp in seconds. null before it starts.

complete_tsinteger | null

The time the campaign finished, as a Unix timestamp in seconds. null until it finishes.

failureobject | null

Details of the failure when status is failed. Otherwise null.

Authorization

This endpoint requires authentication.

Request examples

Example Request
curl -X POST 'https://preview.ai.agora.io/conversational-ai/v1/projects/string/campaigns/497f6eca-6276-4993-bfeb-53cbbbba6f08:resume'

Response example

Example Response
{
  "campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904",
  "name": "string",
  "status": "scheduled",
  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
  "transport": {
    "type": "telephony",
    "from": [
      "string"
    ],
    "call_policy": {
      "max_ring_duration_ms": 1,
      "max_call_duration_seconds": 1,
      "max_silence_duration_ms": 30000,
      "end_call": {
        "on_user_request": false,
        "on_voicemail": false,
        "on_ai_assistant": false
      }
    }
  },
  "lifecycle": {
    "idle_timeout_ms": 30000,
    "max_duration_ms": 300000,
    "graceful_stop": {
      "enabled": false,
      "timeout_ms": 30000
    }
  },
  "schedule": {
    "mode": "immediate",
    "timezone": "string",
    "days": [
      {
        "weekday": "mon",
        "ranges": [
          {
            "start": "string",
            "end": "string"
          }
        ]
      }
    ]
  },
  "counts": {
    "contacts": 0,
    "pending": 0,
    "calling": 0,
    "completed": 0,
    "failed": 0,
    "canceled": 0
  },
  "create_ts": 0,
  "start_ts": 0,
  "complete_ts": 0,
  "failure": {
    "code": "string",
    "provider": "string",
    "message": "string",
    "ts": 0
  }
}