Replace campaign configuration
curl --request PUT \
--url https://api.threetone.in/v1/convai/outbound-campaigns/config \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"policy": {
"timezone": "UTC",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
}
},
"agent_policies": {},
"whatsapp_voice_policy": {
"timezone": "<string>",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
}
}
}
}
'import requests
url = "https://api.threetone.in/v1/convai/outbound-campaigns/config"
payload = { "config": {
"policy": {
"timezone": "UTC",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [3],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": True,
"previous_conversation_id": True,
"previous_summary": True,
"previous_transcript": True
}
},
"agent_policies": {},
"whatsapp_voice_policy": {
"timezone": "<string>",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [3],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": True,
"previous_conversation_id": True,
"previous_summary": True,
"previous_transcript": True
}
}
} }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
policy: {
timezone: 'UTC',
retry: {
retry_delay_seconds: 600,
max_short_retries: 1,
max_total_calls: 6,
max_callbacks: 2,
max_redirects: 2,
interval_placement: 'start',
rotate_step_seconds: 900,
max_consecutive_failures_per_number: 15
},
calling_periods: [{weekdays: [3], intervals: [{start: '<string>', end: '<string>'}]}],
date_overrides: [
{
start_date: '2023-12-25',
end_date: '2023-12-25',
intervals: [{start: '<string>', end: '<string>'}],
name: '<string>'
}
],
data_collection: {
callback_time: '__system_data_collection_callback_time',
redirect_phone_number: '__system_data_collection_redirect_phone_number',
stop: '__system_data_collection_do_not_call',
mappings: {}
},
followup_context: {
call_type: true,
previous_conversation_id: true,
previous_summary: true,
previous_transcript: true
}
},
agent_policies: {},
whatsapp_voice_policy: {
timezone: '<string>',
retry: {
retry_delay_seconds: 600,
max_short_retries: 1,
max_total_calls: 6,
max_callbacks: 2,
max_redirects: 2,
interval_placement: 'start',
rotate_step_seconds: 900,
max_consecutive_failures_per_number: 15
},
calling_periods: [{weekdays: [3], intervals: [{start: '<string>', end: '<string>'}]}],
date_overrides: [
{
start_date: '2023-12-25',
end_date: '2023-12-25',
intervals: [{start: '<string>', end: '<string>'}],
name: '<string>'
}
],
data_collection: {
callback_time: '__system_data_collection_callback_time',
redirect_phone_number: '__system_data_collection_redirect_phone_number',
stop: '__system_data_collection_do_not_call',
mappings: {}
},
followup_context: {
call_type: true,
previous_conversation_id: true,
previous_summary: true,
previous_transcript: true
}
}
}
})
};
fetch('https://api.threetone.in/v1/convai/outbound-campaigns/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version": 123,
"config": {
"policy": {
"timezone": "UTC",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
}
},
"agent_policies": {},
"whatsapp_voice_policy": {
"timezone": "<string>",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
}
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Config
Replace campaign configuration
Create or replace the workspace’s outbound campaign configuration. Send the version you last read as expected_version, or omit it to create the first configuration. A configuration changed since you read it is not replaced. Campaigns keep the policy they started with.
PUT
/
v1
/
convai
/
outbound-campaigns
/
config
Replace campaign configuration
curl --request PUT \
--url https://api.threetone.in/v1/convai/outbound-campaigns/config \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"policy": {
"timezone": "UTC",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
}
},
"agent_policies": {},
"whatsapp_voice_policy": {
"timezone": "<string>",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
}
}
}
}
'import requests
url = "https://api.threetone.in/v1/convai/outbound-campaigns/config"
payload = { "config": {
"policy": {
"timezone": "UTC",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [3],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": True,
"previous_conversation_id": True,
"previous_summary": True,
"previous_transcript": True
}
},
"agent_policies": {},
"whatsapp_voice_policy": {
"timezone": "<string>",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [3],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": True,
"previous_conversation_id": True,
"previous_summary": True,
"previous_transcript": True
}
}
} }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
policy: {
timezone: 'UTC',
retry: {
retry_delay_seconds: 600,
max_short_retries: 1,
max_total_calls: 6,
max_callbacks: 2,
max_redirects: 2,
interval_placement: 'start',
rotate_step_seconds: 900,
max_consecutive_failures_per_number: 15
},
calling_periods: [{weekdays: [3], intervals: [{start: '<string>', end: '<string>'}]}],
date_overrides: [
{
start_date: '2023-12-25',
end_date: '2023-12-25',
intervals: [{start: '<string>', end: '<string>'}],
name: '<string>'
}
],
data_collection: {
callback_time: '__system_data_collection_callback_time',
redirect_phone_number: '__system_data_collection_redirect_phone_number',
stop: '__system_data_collection_do_not_call',
mappings: {}
},
followup_context: {
call_type: true,
previous_conversation_id: true,
previous_summary: true,
previous_transcript: true
}
},
agent_policies: {},
whatsapp_voice_policy: {
timezone: '<string>',
retry: {
retry_delay_seconds: 600,
max_short_retries: 1,
max_total_calls: 6,
max_callbacks: 2,
max_redirects: 2,
interval_placement: 'start',
rotate_step_seconds: 900,
max_consecutive_failures_per_number: 15
},
calling_periods: [{weekdays: [3], intervals: [{start: '<string>', end: '<string>'}]}],
date_overrides: [
{
start_date: '2023-12-25',
end_date: '2023-12-25',
intervals: [{start: '<string>', end: '<string>'}],
name: '<string>'
}
],
data_collection: {
callback_time: '__system_data_collection_callback_time',
redirect_phone_number: '__system_data_collection_redirect_phone_number',
stop: '__system_data_collection_do_not_call',
mappings: {}
},
followup_context: {
call_type: true,
previous_conversation_id: true,
previous_summary: true,
previous_transcript: true
}
}
}
})
};
fetch('https://api.threetone.in/v1/convai/outbound-campaigns/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"version": 123,
"config": {
"policy": {
"timezone": "UTC",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
}
},
"agent_policies": {},
"whatsapp_voice_policy": {
"timezone": "<string>",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
],
"data_collection": {
"callback_time": "__system_data_collection_callback_time",
"redirect_phone_number": "__system_data_collection_redirect_phone_number",
"stop": "__system_data_collection_do_not_call",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
}
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
Body
application/json