Create Campaign
curl --request POST \
--url https://api.example.com/api/v1/campaigns \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"whatsapp_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.example.com/api/v1/campaigns"
payload = {
"name": "<string>",
"whatsapp_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', whatsapp_account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.example.com/api/v1/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"whatsapp_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipient_type": "<string>",
"status": "<string>",
"total_recipients": 123,
"messages_sent": 123,
"messages_delivered": 123,
"messages_read": 123,
"messages_failed": 123,
"created_at": "<string>",
"updated_at": "<string>",
"description": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_type": "text",
"custom_message": "<string>",
"message_payload": {},
"recipient_group_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"recipient_contact_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"scheduled_for": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"cancelled_at": "<string>",
"failed_at": "<string>",
"error_message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}campaigns
Create Campaign
Create a new campaign in DRAFT status.
POST
/
api
/
v1
/
campaigns
Create Campaign
curl --request POST \
--url https://api.example.com/api/v1/campaigns \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"whatsapp_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.example.com/api/v1/campaigns"
payload = {
"name": "<string>",
"whatsapp_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', whatsapp_account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.example.com/api/v1/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"whatsapp_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipient_type": "<string>",
"status": "<string>",
"total_recipients": 123,
"messages_sent": 123,
"messages_delivered": 123,
"messages_read": 123,
"messages_failed": 123,
"created_at": "<string>",
"updated_at": "<string>",
"description": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_type": "text",
"custom_message": "<string>",
"message_payload": {},
"recipient_group_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"recipient_contact_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"scheduled_for": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"cancelled_at": "<string>",
"failed_at": "<string>",
"error_message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Body
application/json
Request to create a new campaign.
Required string length:
1 - 255Campaign recipient selection mode.
Available options:
all, group, custom Maximum string length:
2000Response
Successful Response
Full campaign detail response.