Skip to main content

SMS Provider API Reference

Canonical reference for HTTP requests and responses of each SMS provider integration.

Purpose​

Every directory below a provider name mirrors an API endpoint path. Within each endpoint directory, GET.md, POST.md, or DELETE.md documents:

  • The exact HTTP method, URL, and authentication mechanism
  • The JSON request body (every field, its type, and whether it's required)
  • The JSON response body (every field, its meaning, and edge cases)
  • How the provider code maps the response to SmsStatus / SmsDelivery objects
  • Verification status: VERIFIED (backed by real API responses) or MOCK ONLY (inferred from code and unit tests)

The "Source References" tables name the class file that holds each symbol. Their approximate line numbers date from the recordings and the pre-split single-file sources, so treat them as hints only — the class and method names are the reliable part.

How to verify an endpoint​

  1. Set SMS_VERBOSE=true and SMS_TESTMODE=false in conf.php
  2. Invoke the operation via scripts/sms.php:
    ./scripts/sms.php sms --message "test" --to 0400000000
    ./scripts/sms.php balance
    ./scripts/sms.php senderids
  3. Check the PHP error log for the HTTP request/response dump
  4. Update the corresponding .md file and mark it VERIFIED

Directory conventions​

{provider} / {endpoint-path} / {HTTPVERB}.md

Examples:

FileMeaning
cellcast/gateway/POST.mdPOST /api/v1/gateway
cellcast/report/message/GET.mdGET /api/v2/report/message/{id}
5centsmsv5/sms/POST.mdPOST /api/v5/sms
5centsmsv5/sms/{id}/GET.mdGET /api/v5/sms/{id}
5centsmsv5/sms/DELETE.mdDELETE /api/v5/sms/{id}

Path segments with dynamic parameters (like {id}) are represented as literal directory names — they document the endpoint pattern, not a specific invocation.

Providers​

Cellcast​

Base URL: https://api.cellcast.com (v1 and v2 endpoints).
Auth: Authorization: Bearer <SMS_CELLCAST_APIKEY> header.

EndpointMethodFileStatus
/api/v1/gatewayPOSTgateway/POST.mdMOCK ONLY
/api/v1/gateway/cancelScheduleQuickMessagePOSTgateway/cancelScheduleQuickMessage/POST.mdVERIFIED
/api/v1/customNumberGETcustomNumber/GET.mdVERIFIED
/api/v1/customNumber/addPOSTcustomNumber/add/POST.mdMOCK ONLY
/api/v1/customNumber/verifyCustomNumberPOSTcustomNumber/verifyCustomNumber/POST.mdMOCK ONLY
/api/v1/apiClient/accountGETaccount/GET.mdVERIFIED
/api/v1/business/addPOSTbusiness/add/POST.mdMOCK ONLY
/api/v1/businessGETbusiness/GET.mdVERIFIED (undocumented by Cellcast)
/api/v2/report/message/{id}GETreport/message/GET.mdMOCK ONLY

5CentSMS v5​

Base URL: https://www.5centsms.com.au/api/v5.
Auth: key-id and key-secret fields in the JSON request body (not headers).

EndpointMethodFileStatus
/api/v5/smsPOSTsms/POST.mdVERIFIED
/api/v5/smsGETsms/GET.mdVERIFIED
/api/v5/sms/{id}GETsms/{id}/GET.mdVERIFIED
/api/v5/sms/{id}DELETEsms/DELETE.mdVERIFIED
/api/v5/balanceGETbalance/GET.mdVERIFIED
/api/v5/senderidGETsenderid/GET.mdVERIFIED
/api/v5/senderidPOSTsenderid/POST.mdVERIFIED
/api/v5/senderid/{id}DELETEsenderid/DELETE.mdVERIFIED

See also​

  • tests/sms-mock-overrides-cellcast.json — Cellcast mock server overrides
  • tests/sms-mock-overrides-cellcast-stbarnabas.json — Cellcast mock variant with StBarnabas sender ID
  • tests/sms/sms-mock-proxy.php — Intercepting proxy for test scenarios
  • scripts/sms.php — CLI for invoking SMS operations against live providers