Scheduled SMS
Endpoint
Section titled “Endpoint”POST /api/v1/scheduler/scheduleRequest body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
to | string | ✅ | Recipient phone number |
body | string | ✅ | Message content |
from | string | ❌ | Sender ID |
scheduledAt | ISO 8601 string | ✅ | When to send — must be in the future |
Example
Section titled “Example”curl https://send.virgincareer.lk/api/v1/scheduler/schedule \ -H "Authorization: Bearer sk_your_key" \ -H "Content-Type: application/json" \ -d '{ "to": "+94771234567", "body": "Your appointment is tomorrow at 10am. Reply STOP to opt out.", "scheduledAt": "2026-04-01T09:00:00.000Z" }'Response
Section titled “Response”{ "messageId": "550e8400-...", "jobId": "1234", "scheduledAt": "2026-04-01T09:00:00.000Z", "status": "scheduled"}Cancel a scheduled message
Section titled “Cancel a scheduled message”DELETE /api/v1/scheduler/cancel/:messageIdcurl -X DELETE \ https://send.virgincareer.lk/api/v1/scheduler/cancel/550e8400-... \ -H "Authorization: Bearer sk_your_key"