- SMS Program API - Bulk SMS campaigns
- Contact API - Contact management
- Sender ID API - Sender ID management
- Credit API - Credit management and billing
Types
Type Definitions
Type Definitions
API Endpoints
Base path:
/smsSend a single SMS to a contact
Flow:- Validates sender ID is active and accessible to the organization (shared or org-owned)
- Fetches contact with custom attributes
- Checks organization has positive credit balance
- Resolves template placeholders with contact data
- Sends SMS via provider
- Deducts credits (only on successful send)
- Returns result
| Code | Error | Description |
|---|---|---|
| 400 | SenderIdNotActiveError | Sender ID is not active |
| 400 | SenderIdNotAccessibleError | Sender ID not available to this organization |
| 400 | BadRequestException | Template variable not found (e.g., missing custom attribute) |
| 402 | InsufficientCreditsError | Organization has no credits |
| 404 | SenderIdNotFoundError | Sender ID not found |
| 404 | ContactNotFoundError | Contact not found in organization |
Billing
- Credits are checked before sending (
requireCredits- must have positive balance) - Credits are deducted only after a successful send
- Failed sends are not charged
- Transaction type in credit history:
sms_charge(withsms_program_id: null)
SMS Encoding
Message encoding is automatically detected and affects the number of SMS parts: The response includessmsParts and encoding so the caller knows the actual cost breakdown.