// 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 http://localhost:3001/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://api.eksms.com/v1/messages?limit=20&offset=0" \
  -H "X-API-Key: eksms_live_..."

Retrieve a message

GET/v1/messages/:id

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

Batch & billing

GET/v1/messages/batch/:batchId

Returns every recipient row created by one send request.

GET/v1/billing/balance

Returns your current credit balance in NPR.

GET/v1/billing/ledger

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

Back to Introduction