Skip to content

Postman and Insomnia

Try the API from Postman or Insomnia without writing code. Each collection covers the same requests: send a message, read its timeline, then pools, Verify, contacts, templates, campaigns, webhooks, the blacklist and your plan.

22 ready requests in the order you'd try them, from the first send to campaigns, webhooks and your plan.

The files are generated at each docs build, and every request in them is checked against the API contract, so they match this reference.

  • Pair a phone, or use a test key. A key that starts with sf_test_ sends through the sandbox, so no SMS leaves a phone.
  • Create an API key with the scopes for the folders you want to run. messages:send and messages:read cover the first folder.
  1. Click Import and drop smsfabric.postman_collection.json.

  2. Open the collection, go to Variables and set apiKey in the Current value column. Current values stay on your machine; initial values sync to your workspace.

  3. Run Messages › Send a message. A 201 with status: "queued" means the message is on its way to a phone.

Every request sends X-Api-Key: {{apiKey}}. The sends add Idempotency-Key: {{$guid}}, so a retry with the same key never sends twice (idempotency).

After a create request, Postman stores the new id for the requests that follow:

Variable Set by
messageId Send a message, Send through a pool, Schedule a message
poolId Create a pool
verificationId Send a code
templateId Create a template
campaignId Create a campaign
webhookId Create a webhook
scheduledAt Set to one hour from now before Schedule a message runs
  1. Click Import, choose From file and pick smsfabric.insomnia.json.

  2. Open Manage environments, select Base Environment and set apiKey.

  3. Run Messages › Send a message.

Insomnia doesn’t store ids from responses. Copy the id from a response into the matching environment variable (messageId, poolId, verificationId, templateId, campaignId or webhookId) before you run a request that uses it. For Schedule a message, set scheduledAt to a UTC time in the future, written as YYYY-MM-DDTHH:MM:SSZ.

Variable Value
baseUrl https://api.smsfabric.com
apiKey Your API key. Empty in both files.
  • Check a code: replace 123456 with the digits the phone received.
  • Create a webhook: replace https://example.com/hooks/smsfabric with your own HTTPS endpoint.
  • Send through a pool: put at least one phone in the pool first, with PATCH /v1/devices/:id and { "poolId": "…" }.
  • Create a campaign makes a draft for contacts tagged vip. Nothing is sent until you call POST /v1/campaigns/:id/start, which the collection leaves out on purpose.
  • Template text such as {{first_name|there}} is SMSFabric’s own variable syntax and is sent as written. In Postman, don’t create a variable named first_name, or Postman fills it in before the request leaves.