Skip to content

Creating Campaigns

Campaigns let you send to many recipients at once and track results under a single named record.

Terminal window
curl https://send.virgincareer.lk/api/v1/campaigns \
-H "Authorization: Bearer sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "March Promo",
"message": "Get 20% off this weekend only!",
"type": "instant",
"recipients": ["+94771234567", "+94779876543"]
}'
Terminal window
curl https://send.virgincareer.lk/api/v1/campaigns \
-H "Authorization: Bearer sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "April Newsletter",
"message": "Check out our April deals!",
"type": "scheduled",
"scheduledAt": "2026-04-01T08:00:00.000Z",
"groupId": "your-group-id"
}'
Terminal window
curl https://send.virgincareer.lk/api/v1/campaigns \
-H "Authorization: Bearer sk_your_key"
Terminal window
curl https://send.virgincareer.lk/api/v1/campaigns/campaign-id/messages \
-H "Authorization: Bearer sk_your_key"
StatusDescription
processingCurrently sending
scheduledWaiting for scheduled time
completedAll messages processed
failedCampaign encountered an error