Queue contacts on a campaign (not generally available)
POST
/api/v2/aura/campaigns/{id}/contacts
curl --request POST \ --url https://api.sipstack.com/api/v2/aura/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/contacts \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "contacts": [ { "phone": "+14165550100", "name": "example", "language": "en", "externalRef": "example" } ] }'import requests
url = "https://api.sipstack.com/api/v2/aura/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/contacts"
payload = { "contacts": [ { "phone": "+14165550100", "name": "example", "language": "en", "externalRef": "example" } ] }headers = { "x-api-key": "<x-api-key>", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())const url = 'https://api.sipstack.com/api/v2/aura/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/contacts';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"contacts":[{"phone":"+14165550100","name":"example","language":"en","externalRef":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import axios from 'axios';
const options = { method: 'POST', url: 'https://api.sipstack.com/api/v2/aura/campaigns/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/contacts', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, data: { contacts: [ {phone: '+14165550100', name: 'example', language: 'en', externalRef: 'example'} ] }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}Queues up to 1,000 contacts on one of your outbound Aura campaigns. Same
rules as POST /api/v2/aura/calls; returns counts.
:::caution[Not generally available]
This endpoint is not enabled for API access and returns 403.
:::
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
object
contacts
required
Array<object>
object
phone
required
string
Example
+14165550100 name
string
language
string
externalRef
string
Responses
Section titled “ Responses ”Contacts processed.
Media type application/json
object
success
boolean
data
object
received
integer
added
integer
duplicates
integer
refused
object
key
additional properties
integer
invalid
Array<object>
object
row
integer
reason
string
Example generated
{ "success": true, "data": { "received": 1, "added": 1, "duplicates": 1, "refused": { "additionalProperty": 1 }, "invalid": [ { "row": 1, "reason": "example" } ] }}Empty list, more than 1,000 contacts, or a malformed body.
Media type application/json
Inline error shape used by the messaging API and management endpoints.
object
success
boolean
error
string
Example
{ "success": false, "error": "Recipient phone number (to) is required"}Not enabled for API access, or the key is missing the aura:write scope.
Media type application/json
Inline error shape used by the messaging API and management endpoints.
object
success
boolean
error
string
Example
{ "success": false, "error": "Recipient phone number (to) is required"}The campaign is not one of yours.
Media type application/json
Inline error shape used by the messaging API and management endpoints.
object
success
boolean
error
string
Example
{ "success": false, "error": "Recipient phone number (to) is required"}The campaign is completed, cancelled or suspended.
Media type application/json
Inline error shape used by the messaging API and management endpoints.
object
success
boolean
error
string
Example
{ "success": false, "error": "Recipient phone number (to) is required"}