WhatsAppGateway
Sign in Read the docs

WhatsApp Business API

Send a message.
Know it landed.

One HTTP call puts a message in front of your customer on WhatsApp. We queue it, retry it up to 3 times, and hand back a delivery state you can act on โ€” sent, delivered, read.

Templates & free text ยท Automatic retries ยท Read receipts

POST /api/v1/messages 202
{
  "to": "+919140327455",
  "template": { "name": "verification_code" },
  "clientRef": "signup-8842"
}
  1. 19:01:02.418 queued accepted, waiting for capacity
  2. 19:01:02.627 sent accepted by WhatsApp
  3. 19:01:04.133 delivered on their phone ยท 1.7s
  4. 19:01:11.980 read opened ยท 9.6s

Retries you don't write

A message that fails goes back in the queue and is tried again. Your code sends once.

Safe to retry

Send your own reference and a repeated request returns the original message, never a duplicate.

Receipts, not hope

Every message carries a state and a timestamp, from accepted through to delivered and read.

How it works

Three steps to your first message

  1. 01

    Create a key

    Issue a key from the dashboard and scope it to send, read, or both. Keys are shown once and revocable at any time.

  2. 02

    Post a message

    A recipient and a template โ€” or free text, inside the 24-hour window. You get a 202 and an id back immediately.

  3. 03

    Follow it home

    Fetch the id to see where it got to, or watch the whole stream in the dashboard with failure reasons attached.

The whole integration
// Send an OTP and keep the id.
  const res = await fetch("https://smsgateway.swiftcoder.in/api/v1/messages", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.WA_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      to: "+919140327455",
      template: {
        name: "verification_code",
        components: [{ type: "body", parameters: [{ type: "text", text: code }] }],
      },
      clientRef: `signup-${user.id}`,
    }),
  });

  const { id, status } = await res.json();

Prefer Python, PHP or plain cURL? Every endpoint is written up in the API reference.

What you get

Built for the parts you'd rather not build

A queue that holds the line

Traffic spikes and quiet capacity are our problem. Messages wait in order and go out as soon as there is room.

Idempotency by reference

Attach your own clientRef. A timed-out request can be replayed without sending a second message.

Honest delivery states

Queued, sent, delivered, read, failed โ€” with WhatsApp's own error code attached when something goes wrong.

Templates, handled

Send an approved template by name with its parameters, and open a conversation with anyone โ€” not just people who wrote first.

Bulk in one call

Up to 500 messages per request, each validated on its own. One bad number never rejects the batch.

Keys with scopes

Separate keys per service, each limited to sending or reading, revocable the moment one leaks.

A dashboard that explains

Daily volume, success rate, and the failure reasons ranked โ€” plus one-click retry on anything that didn't make it.

Where it's used

Messages people are waiting for

One-time codes

Sign-in and verification on the app your customer already has open.

Order and delivery updates

Dispatched, out for delivery, arriving now โ€” sent as they happen.

Reminders and alerts

Appointments, payment due dates, and anything your system needs acknowledged.

Pricing

Pay for what you send

No seat licences and no monthly minimum. Start free, and the rate falls as volume rises.

Starter

โ‚น0 to begin

For a side project or a proof of concept.

  • 1,000 messages included
  • Full API access
  • Delivery and read receipts
  • Email support
Get a key

Scale

Talk to us

For high volume and custom terms.

  • Negotiated per-message rate
  • Multiple sending numbers
  • Custom retention
  • Direct line to an engineer
Start a conversation

Questions

Before you integrate

What does a successful send actually mean?

A 202 means we've accepted the message, not that it has arrived. Watch the state: delivered means it reached their phone, and that is the point most integrations should treat as success. read depends on a setting the recipient controls, so plenty of messages that were read never report it.

Can I message anyone, any time?

Free text only reaches someone who messaged you in the last 24 hours โ€” that is WhatsApp's rule, not ours. To start a conversation, send an approved template instead. Most notification traffic is templates.

Do I need to write retry logic?

No. A transient failure โ€” a rate limit, a moment when WhatsApp is unreachable โ€” is requeued and tried again up to 3 times. A permanent refusal fails straight away rather than burning retries on an answer that will not change.

What if my request times out?

Send a clientRef and replay it. The same reference returns the original message rather than sending a second one, so a retry can never message the same person twice.

How do I know what went wrong?

Errors return a stable code and a plain-language message, and a failed message keeps both lastError and WhatsApp's own numeric code. The dashboard ranks failure reasons so you can see a pattern rather than one-off noise.

Your first message is a curl away.