Postman

Importable v2.1 collections for the public API surface.

Available collections

Channel File Covers
SMS docs/api/sendoka-sms.postman_collection.json single + batch send, list, get, cancel, 10DLC provisioning (brand → campaign → number)
Email docs/api/sendoka-email.postman_collection.json single + batch send, scheduled, template, CC/BCC/Reply-To, attachments, tracking, list, get, cancel, suppressions

Import

  1. Postman → File → Import → drop the JSON file
  2. Open the collection's Variables tab
  3. Edit:
    • baseUrl → your deploy (http://localhost:3000, https://YOUR-HOST)
    • apiKeysok_test_... for safe smoke tests (no AWS spend, suppression + idempotency gates still run) or sok_live_... for real sends
    • fromNumber / toNumber → defaults are +15555550100 / +15555550199 (RFC 5733 reserved test numbers)
    • smsId / brandId / campaignId → fill in from previous responses as you chain requests

Built-in helpers

  • Pre-request script auto-generates a fresh {{idempotencyKey}} per request, so retries within the 24h window replay the cached response instead of double-sending.
  • Bearer auth is set on the collection — every request inherits it, no per-request header needed.

Working flow for live (sok_live_*)

  1. Provision (10DLC) → brand — wait for status: verified (re-PATCH with empty body to poll)
  2. Provision (10DLC) → campaign — bind brandId, wait for verified
  3. Provision (10DLC) → phone number — bind campaignId, wait for verified
  4. Update collection variable fromNumber to the provisioned E.164
  5. Run any Send request

The sms-verify-poll cron flips verification statuses every 5 minutes; alternatively re-PATCH with an empty body to force a re-check.

Working flow for test (sok_test_*)

  1. Set apiKey to a test key
  2. Run Send SMS — minimal — returns { id: "msg_...", status: "sent" } with a simulated provider id
  3. All gates run except sender-registration and AWS publish, so you can exercise suppression, idempotency, template rendering, and scheduled sends without provisioning anything

Coming soon

Webhook-replay collection will land here next.