Complete HTTP API Reference
A clean, JSON-based REST API for sending SMS, retrieving message status, managing webhooks, and querying account balance. Designed for rapid integration — most developers send their first message within an hour.
API Endpoint & Authentication
All API requests are made over HTTPS. The API base URL is versioned to ensure backwards compatibility as we add new capabilities.
https://api.sbstelecom.co.uk/v1Authorization: Bearer YOUR_API_KEY- Include your API key in the Authorization header as a Bearer token
- API keys are created and managed in the client portal
- Keys can be scoped to send-only, read-only, or full access
- IP whitelisting per API key is available for additional security
- Keys should be rotated periodically and never committed to source control
Send Your First Message
curl -X POST https://api.sbstelecom.co.uk/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+447911123456",
"from": "SBSTELECOM",
"text": "Your verification code: 847291",
"type": "otp"
}'
// Response
{
"messageId": "msg_01HX8K2P4NQR9VTZE",
"status": "queued",
"to": "+447911123456",
"from": "SBSTELECOM",
"createdAt": "2025-03-22T10:42:15Z"
}API Endpoint Reference
/v1/messagesSubmit a new outbound SMS message. Returns a message ID and initial status. Supports single and batch submissions.
- to — E.164 destination number
- from — Sender ID or originating number
- text — Message body content
- type — Message type: sms, otp, flash
- webhook_url — Delivery receipt callback URL (optional)
/v1/messages/{id}Retrieve the current status and details of a previously submitted message by its unique message ID.
- id — The message ID returned on submission
- Returns: status, timestamps, carrier, route
/v1/balanceQuery the current account balance. Returns available credit in GBP and the currency of your account.
- No request parameters required
- Returns: balance, currency, account ID
/v1/messages/batchSubmit a batch of messages in a single API call. Supports up to 1,000 recipients per batch request.
- messages — Array of message objects
- Each object: to, from, text, type
- Returns: array of message IDs and statuses
Standard Response Structure
All API responses use a consistent JSON structure. Successful responses return HTTP 2xx status codes. Error responses include a machine-readable error code and a human-readable message.
200 OKRequest successful, data returned201 CreatedMessage submitted successfully400 Bad RequestInvalid request parameters401 UnauthorizedInvalid or missing API key422 UnprocessableValidation error — see errors array429 Rate LimitedToo many requests, apply backoff500 Server ErrorPlatform error — retry with backoff// 422 Validation Error
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"errors": [
{
"field": "to",
"message": "Invalid E.164 phone number format"
}
]
},
"requestId": "req_01HX8K2P4N"
}
// 401 Unauthorized
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API key"
},
"requestId": "req_01HX8K3Q7M"
}Ready to Start Building?.
Request API credentials and start sending messages in your sandbox environment today.