Skip to main content

Campaigns

Query campaigns across all channels.

tip

To create campaigns or send messages, use the channel-specific endpoints:

  • SMSPOST /sms/campaigns, POST /sms/promotional
  • ViberPOST /viber/send

List Campaigns

Get a paginated list of campaigns.

GET /api/v1/campaigns

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
pageSizeinteger20Items per page (max 100)
sendingModestring-Filter: "Bulk" or "Transactional"

Response

{
"campaigns": [
{
"campaignId": "660e8400-e29b-41d4-a716-446655440001",
"name": "Order Notifications",
"description": "Real-time order status updates",
"status": "InProgress",
"channel": "Smpp",
"sendingMode": "Transactional",
"totalMessages": 1543,
"deliveredCount": 1520,
"failedCount": 12,
"pendingCount": 11,
"seenCount": 1200,
"createdAt": "2024-01-15T10:30:00Z"
}
],
"totalCount": 1,
"page": 1,
"pageSize": 20,
"totalPages": 1
}

Campaign Statuses

StatusDescription
DraftNot started
QueuingMessages are being prepared (bulk send only) — poll until Ready
ReadyAll messages inserted, waiting for you to call /start
InProgressActively sending
PausedTemporarily stopped
CompletedAll messages processed
FailedMessage preparation failed — re-send to create a new campaign

Example

# List all campaigns
curl -X GET "https://api.transformify.mk/api/v1/campaigns?page=1&pageSize=20" \
-H "X-API-Key: your-api-key"

# Filter by sending mode
curl -X GET "https://api.transformify.mk/api/v1/campaigns?sendingMode=Transactional" \
-H "X-API-Key: your-api-key"

Get Campaign

Get details for a specific campaign.

GET /api/v1/campaigns/{id}

Path Parameters

ParameterTypeDescription
idUUIDCampaign ID

Response

{
"campaignId": "660e8400-e29b-41d4-a716-446655440001",
"name": "Order Notifications",
"description": "Real-time order status updates",
"status": "InProgress",
"channel": "Smpp",
"sendingMode": "Transactional",
"viberServiceId": null,
"templateId": "550e8400-e29b-41d4-a716-446655440000",
"templateName": "Order Update Template",
"totalMessages": 1543,
"deliveredCount": 1520,
"failedCount": 12,
"pendingCount": 11,
"seenCount": 1200,
"createdAt": "2024-01-15T10:30:00Z",
"startedAt": "2024-01-15T10:30:00Z"
}

Example

curl -X GET "https://api.transformify.mk/api/v1/campaigns/660e8400-e29b-41d4-a716-446655440001" \
-H "X-API-Key: your-api-key"

Start Campaign

Start a bulk campaign that has reached Ready status, beginning message delivery.

POST /api/v1/campaigns/{id}/start

Path Parameters

ParameterTypeDescription
idUUIDCampaign ID (from the send response)

Response

{
"campaignId": "660e8400-e29b-41d4-a716-446655440001",
"status": "InProgress"
}
note

Only campaigns in Ready status can be started. Campaigns created via POST /api/v1/viber/send or POST /api/v1/sms/promotional must first reach Ready before you call this endpoint.

Example

curl -X POST "https://api.transformify.mk/api/v1/campaigns/660e8400-e29b-41d4-a716-446655440001/start" \
-H "X-API-Key: your-api-key"

Errors

StatusErrorDescription
400Campaign is not readyCampaign must be in Ready status to start
401UnauthorizedInvalid API key
404Not FoundCampaign not found