// api reference

API reference

Read endpoints for messages, batches, and billing. All list endpoints paginate with limit and offset and return the standard envelope with a meta block.

Interactive spec

The complete, always-current OpenAPI/Swagger reference (request/response schemas, try-it-out) is at https://sms-api.ekrasunya.com/docs.

List messages

GET/v1/messages

Returns your messages newest-first. Query params: limit (default 20, max 100) and offset. Requires messages:read.
curl "https://sms-api.ekrasunya.com/v1/messages?limit=20&offset=0" \
  -H "X-API-Key: eksms_..."

Retrieve a message

GET/v1/messages/:id

Returns a single message with its current delivery status, network, cost, and timestamps.
curl https://sms-api.ekrasunya.com/v1/messages/a1b2c3d4-... \
  -H "X-API-Key: eksms_..."

Batch & billing

GET/v1/messages/batch/:batchId

Returns every recipient row created by one send request.

GET/v1/billing/balance

Returns your current balance in credits.

GET/v1/billing/ledger

Returns your append-only credit ledger (top-ups, debits, refunds), paginated.

Back to Introduction