Skip to main content
POST
/
api
/
v1
/
messaging
/
campaigns
Campaigns API
curl --request POST \
  --url https://api.vobiz.ai/api/v1/messaging/campaigns
Prerequisites: Campaigns require an approved template (you pass its template_id) and either contact tags or explicit contact IDs as the audience. See Templates API and Contacts API.
Base URL: https://api.vobiz.ai/api/v1/messaging Authentication: Every request requires X-Auth-ID: MA_XXXXXXXX and X-Auth-Token: <token> headers (a Bearer JWT is also accepted). Set Content-Type: application/json on requests with a body. Get your credentials from console.vobiz.ai.

Campaign lifecycle

draftscheduledsendingpausedcompleted / cancelled / failed

List campaigns

GET https://api.vobiz.ai/api/v1/messaging/campaigns
Returns a paginated list of campaigns with status, delivery counts, and scheduling details. Filter with the status query parameter.
Query paramDefaultDescription
statusFilter by campaign status
page1Page number
limit20Page size (max 100)
cURL
curl -X GET \
  "https://api.vobiz.ai/api/v1/messaging/campaigns?status=completed&page=1&limit=20" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: {auth_token}"
200 OK
{
  "items": [
    {
      "id": "7c2e9a4d-1b3f-4e6a-8c9d-0f1a2b3c4d5e",
      "channel_id": "3f1c9b7e-2d4a-4f6b-9c8e-0a1b2c3d4e5f",
      "name": "Welcome Campaign",
      "template_id": "9d8f1e2a-4c3b-4a1d-8e7f-1a2b3c4d5e6f",
      "template_name": "welcome_message",
      "template_lang": "en_US",
      "status": "completed",
      "total_recipients": 142,
      "sent_count": 142,
      "delivered_count": 138,
      "read_count": 95,
      "failed_count": 4,
      "skipped_count": 0,
      "created_at": "2026-03-25T09:55:00Z",
      "updated_at": "2026-03-25T10:30:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 20,
  "has_more": false
}

Create campaign

POST https://api.vobiz.ai/api/v1/messaging/campaigns
Create a new campaign. Reference an approved template by its template_id (a UUID, not a template name). Choose the audience with audience_type: use tags plus audience_tags, or contact_ids plus audience_contact_ids. Set scheduled_at for a future send, or omit it to send immediately.

Request body

FieldRequiredDescription
channel_idYesChannel (UUID) to send from
nameYesCampaign display name
template_idYesUUID of an approved template
template_componentsYesMeta component structure for the template
audience_typeYestags or contact_ids
audience_tagsConditionalArray of contact tags. Required when audience_type is tags
audience_contact_idsConditionalArray of contact IDs. Required when audience_type is contact_ids
variable_mappingsNoObject mapping template variables to contact fields
recipient_variablesNoObject: { "<contact_id>": { "<key>": "<value>" } } per-recipient values
scheduled_atNoRFC3339 datetime (UTC) for a scheduled send
cURL
curl -X POST \
  "https://api.vobiz.ai/api/v1/messaging/campaigns" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: {auth_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "3f1c9b7e-2d4a-4f6b-9c8e-0a1b2c3d4e5f",
    "name": "Welcome Campaign",
    "template_id": "9d8f1e2a-4c3b-4a1d-8e7f-1a2b3c4d5e6f",
    "template_components": [
      { "type": "body", "parameters": [{ "type": "text", "text": "{{1}}" }] }
    ],
    "audience_type": "tags",
    "audience_tags": ["vip"],
    "recipient_variables": {
      "1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718": { "1": "Asha" }
    },
    "scheduled_at": "2026-03-25T10:00:00Z"
  }'
201 Created
{
  "id": "7c2e9a4d-1b3f-4e6a-8c9d-0f1a2b3c4d5e",
  "channel_id": "3f1c9b7e-2d4a-4f6b-9c8e-0a1b2c3d4e5f",
  "name": "Welcome Campaign",
  "template_id": "9d8f1e2a-4c3b-4a1d-8e7f-1a2b3c4d5e6f",
  "template_name": "welcome_message",
  "template_lang": "en_US",
  "status": "scheduled",
  "total_recipients": 0,
  "sent_count": 0,
  "delivered_count": 0,
  "read_count": 0,
  "failed_count": 0,
  "skipped_count": 0,
  "scheduled_at": "2026-03-25T10:00:00Z",
  "created_at": "2026-03-25T09:55:00Z",
  "updated_at": "2026-03-25T09:55:00Z"
}

Get campaign

GET https://api.vobiz.ai/api/v1/messaging/campaigns/{id}
Returns full details and delivery statistics for a specific campaign.
cURL
curl -X GET \
  "https://api.vobiz.ai/api/v1/messaging/campaigns/{id}" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: {auth_token}"

Campaign actions

Control campaign execution. All three use POST with no request body and return the updated Campaign.
EndpointDescription
POST /campaigns/{id}/pausePause a sending campaign. Sending stops immediately.
POST /campaigns/{id}/resumeResume a paused campaign.
POST /campaigns/{id}/cancelPermanently cancel. Cannot be undone.
cURL - pause
curl -X POST "https://api.vobiz.ai/api/v1/messaging/campaigns/{id}/pause" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: {auth_token}"

Delete campaign

DELETE https://api.vobiz.ai/api/v1/messaging/campaigns/{id}
Permanently delete a campaign. Returns 204 No Content.
cURL
curl -X DELETE "https://api.vobiz.ai/api/v1/messaging/campaigns/{id}" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: {auth_token}"
204 No Content
// Empty body on success

List campaign recipients

GET https://api.vobiz.ai/api/v1/messaging/campaigns/{id}/recipients
Returns a paginated, per-contact delivery status. Use it to audit delivery rates or identify failed recipients. Filter with status and page with page / limit.
cURL
curl -X GET \
  "https://api.vobiz.ai/api/v1/messaging/campaigns/{id}/recipients?status=failed&page=1&limit=50" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: {auth_token}"
200 OK
{
  "items": [
    {
      "id": "a1b2c3d4-e5f6-4071-8293-a4b5c6d7e8f9",
      "campaign_id": "7c2e9a4d-1b3f-4e6a-8c9d-0f1a2b3c4d5e",
      "contact_id": "1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718",
      "phone_number": "+919876543210",
      "status": "read",
      "meta_message_id": "wamid.HBgM...",
      "sent_at": "2026-03-25T10:00:05Z",
      "delivered_at": "2026-03-25T10:00:07Z",
      "read_at": "2026-03-25T10:15:00Z",
      "created_at": "2026-03-25T09:55:00Z",
      "updated_at": "2026-03-25T10:15:00Z"
    }
  ],
  "total": 142,
  "page": 1,
  "limit": 50,
  "has_more": true
}

Campaign object

FieldTypeDescription
idUUIDCampaign ID
channel_idUUIDChannel the campaign sends from
namestringCampaign display name
template_idUUIDApproved template used
template_namestringResolved template name
template_langstringTemplate language code
statusstringdraft, scheduled, sending, paused, completed, cancelled, or failed
total_recipientsintTotal recipients resolved for the audience
sent_countintMessages sent
delivered_countintMessages delivered
read_countintMessages read
failed_countintMessages failed
skipped_countintRecipients skipped
batch_sizeintRecipients per batch
batch_delay_msintDelay between batches (ms)
pause_reasonstringReason if paused
scheduled_atRFC3339Scheduled send time (UTC)
started_atRFC3339When sending started (UTC)
completed_atRFC3339When sending completed (UTC)
created_atRFC3339Creation timestamp (UTC)
updated_atRFC3339Last update timestamp (UTC)

Campaign recipient object

FieldTypeDescription
idUUIDRecipient row ID
campaign_idUUIDParent campaign
contact_idUUIDContact targeted
phone_numberstringRecipient phone (E.164)
variablesobjectPer-recipient template variables
statusstringqueued, sent, delivered, read, failed, or skipped
meta_message_idstringMeta message ID (when sent)
error_codestringMeta error code (on failure)
error_descstringMeta error description (on failure)
sent_atRFC3339Sent timestamp (UTC)
delivered_atRFC3339Delivered timestamp (UTC)
read_atRFC3339Read timestamp (UTC)
created_atRFC3339Creation timestamp (UTC)
updated_atRFC3339Last update timestamp (UTC)