POST
/
campaigns
curl --request POST \
  --url https://api.puretalk.ai/api/campaigns \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "name": "My Campaign",
  "start_date": "2021-01-01",
  "end_date": "2021-01-01",
  "ai_assistant_id": "123e4567-e89b-12d3-a456-426614174000",
  "type": "call",
  "leads": [
    {
      "to_number": "+1234567890",
      "variables": [
        {
          "var_name": "name",
          "var_value": "John Doe"
        }
      ]
    }
  ]
}'
{
  "msg": "Campaign created successfully",
  "err": false,
  "results": {
    "campaign_id": "123e4567-e89b-12d3-a456-426614174000"
  }
}

Authorizations

X-API-KEY
string
header
required

Authorization header containing API key. You can find your API key in the dashboard under 'API Keys'.

Body

application/json

Response

201
application/json

Campaign created

The response is of type object.