- Audience API - Manage audiences and contacts
- Contact API - Contact management
- Credit API - Credit management and billing
Types
Type Definitions
Type Definitions
API Endpoints
Base path:
/sms-programsRequest/Response Types
Create a new SMS program
| Code | Error | Description |
|---|---|---|
| 404 | SenderIdNotFoundError | Sender ID not found |
| 400 | SenderIdNotActiveError | Sender ID is not active |
| 400 | SenderIdNotAccessibleError | Sender ID is not available to this organization |
List all SMS programs
Get SMS program by ID with progress information
| Code | Description |
|---|---|
| 404 | SMS Program not found |
Update an SMS program
Error Responses:| Code | Description | |
|---|---|---|
| 400 | Cannot update - status is not draft | |
| 404 | SenderIdNotFoundError | Sender ID not found |
| 400 | SenderIdNotActiveError | Sender ID is not active |
| 400 | SenderIdNotAccessibleError | Sender ID is not available to this organization |
| 404 | SMS Program not found |
Delete an SMS program
Error Responses:| Code | Description |
|---|---|
| 400 | Cannot delete - status is not draft |
| 404 | SMS Program not found |
Launch an SMS program
Notes:- Only programs in
draftstatus can be launched - Requires sufficient credits - estimated cost = contacts × 1.887
- If insufficient credits, returns
InsufficientCreditsError - On success, status transitions to
pending, thensendingwhen job starts - Credits are deducted at campaign completion
| Code | Error | Description |
|---|---|---|
| 400 | SmsProgramInvalidStatusError | Status is not draft |
| 400 | SmsProgramNoContactsError | Audience has no contacts with phone numbers |
| 400 | InsufficientCreditsError | Not enough credits to send all messages |
| 400 | SenderIdDeletedError | Sender ID was deleted since program creation |
| 404 | SmsProgramNotFoundError | SMS Program not found |
Cancel a running SMS program
Notes:- Only programs in
pendingorsendingstatus can be cancelled - Best-effort cancellation - some messages may still be sent
- Already sent messages are not affected
- Credits for already sent messages are still charged
| Code | Description |
|---|---|
| 400 | Cannot cancel - status is not pending or sending |
| 404 | SMS Program not found |
Billing
SMS programs use the same cost as SMS nodes in call flows: Pre-launch credit check:- Before launching, the system calculates:
estimatedCost = contactCount × 1.887 - If
balance < estimatedCost, launch is rejected withInsufficientCreditsError - Unlike calls (which can go negative due to unpredictable duration), SMS programs require credits upfront
- Credits are deducted at campaign completion based on actual messages sent
- Transaction type in credit history:
sms_charge - Failed messages are not charged