Start Campaign
curl --request POST \
--url https://prod-api.ringg.ai/ca/api/v0/campaign/start \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"from_numbers": [
"+1234567890"
]
}
'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/campaign/start"
payload = {
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"from_numbers": ["+1234567890"]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '00000000-0000-4000-8000-0000000000a1',
list_id: '123e4567-e89b-12d3-a456-426614174000',
from_numbers: ['+1234567890']
})
};
fetch('https://prod-api.ringg.ai/ca/api/v0/campaign/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "campaign registered successfully!",
"has_ongoing_calls": false
}{
"message": "Invalid agent_id."
}{
"message": "Invalid credentials"
}{
"message": "your current balance is insufficient to complete this action"
}{
"message": "An unexpected error occurred. Please try again later."
}Start Campaign
Start a campaign uploaded with POST /campaign/save using caller numbers you list in from_numbers; the campaign then moves to scheduled or ongoing.
POST
/
campaign
/
start
Start Campaign
curl --request POST \
--url https://prod-api.ringg.ai/ca/api/v0/campaign/start \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"from_numbers": [
"+1234567890"
]
}
'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/campaign/start"
payload = {
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"from_numbers": ["+1234567890"]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '00000000-0000-4000-8000-0000000000a1',
list_id: '123e4567-e89b-12d3-a456-426614174000',
from_numbers: ['+1234567890']
})
};
fetch('https://prod-api.ringg.ai/ca/api/v0/campaign/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "campaign registered successfully!",
"has_ongoing_calls": false
}{
"message": "Invalid agent_id."
}{
"message": "Invalid credentials"
}{
"message": "your current balance is insufficient to complete this action"
}{
"message": "An unexpected error occurred. Please try again later."
}To let Ringg choose caller numbers from a number pool instead, use Start campaign (number pool).
A success returns
list_id is the one returned by Upload campaign contact list; agent_id is the agent the list was uploaded for; from_numbers are workspace numbers from List workspace numbers: send each number’s id (recommended), or the number written exactly as it is listed there. Each retry dials the next number in the list.
{
"agent_id": "your-agent-id",
"list_id": "123e4567-e89b-12d3-a456-426614174000",
"from_numbers": ["00000000-0000-4000-8000-000000000109"]
}
{"status": "campaign registered successfully!"} and the campaign’s campaign_status becomes scheduled or ongoing in Get all campaigns.
The workspace balance must cover the campaign (Billing); otherwise the request returns 402.
Errors
400: an ID is wrong, a caller number is not in the workspace (From numbers not found: …), or the campaign has already started.402: the balance does not cover the campaign.401:X-API-KEYis missing or invalid.
Authorizations
Headers
(Required) Your Ringg AI API key.
Example:
"rg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Body
application/json
(Required) ID of the agent that will handle the calls.
Example:
"00000000-0000-4000-8000-0000000000a1"
(Required) ID of the uploaded campaign contact list.
Example:
"123e4567-e89b-12d3-a456-426614174000"
(Required) Caller numbers, as workspace number IDs from List workspace numbers (recommended) or as numbers written exactly as listed there. Each retry dials the next number in the list. A number not in the workspace returns 400.
Example:
["+1234567890", "+14155550123"]
Was this page helpful?