Get started

Send your first message

Go from a new workspace to a delivered WhatsApp template message in about five minutes.

  1. 1Connect a WhatsApp number
  2. 2Create an API key
  3. 3Find your channel ID
  4. 4Send a template message
  5. 5Track delivery

1. Connect a WhatsApp number

Create a free workspace and connect your WhatsApp Business number under Settings → Channels. The API sends through the channels connected to your workspace, so this is the only setup that happens in the dashboard.

Plan

The REST API and webhooks are included on the Growth and Business plans. On other plans API calls return 403.

2. Create an API key

Go to Settings → Developer → API keys and create a key. Keys start with wp_live_ (or wp_test_) and are shown once — store it in a secret manager or environment variable.

Every request also sends x-tenant-id: your workspace subdomain (the your-workspace in your-workspace.inaiy.com). It is shown with a copy button under Settings → Developer → Connection details. More on authentication.

.env
INAIY_API_KEY=wp_live_xxxxxxxxxxxxxxxxxxxx

3. Find your channel ID

Open Settings → Developer. Under Channels every connected WhatsApp number, Instagram account and Messenger Page is listed with its ID — copy the one you want to send from and pass it as channelId.

.env
INAIY_CHANNEL_ID=662fa1b2c3d4e5f6a7b8c9d0

4. Send a template message

Outside the 24-hour customer service window WhatsApp only allows approved templates. hello_world is pre-approved on every number, so it is the safest first message. Pass a phone number and set createContactIfMissing so the contact is created for you.

curl -X POST "https://api.inaiy.com/api/public/v1/messages" \
  -H "x-tenant-id: your-workspace" \
  -H "x-api-key: $INAIY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"template","channelId":"662fa1b2c3d4e5f6a7b8c9d0","phone":"+919876543210","createContactIfMissing":true,"contactName":"Priya","template":{"name":"hello_world","language":"en_US"}}'

The API answers 202 Accepted straight away. Sending is asynchronous:

Response 202
{
  "success": true,
  "data": {
    "id": "6650a1b2c3d4e5f6a7b8c9d0",
    "status": "queued",
    "conversationId": "664fa1b2c3d4e5f6a7b8c9d0",
    "type": "template"
  },
  "meta": {
    "apiVersion": "v1"
  }
}

5. Track delivery

Subscribe a webhook to message.sent, message.delivered, message.read and message.failed, or poll GET /messages/{id}. Replies from the customer arrive as message.received.

Inside the 24-hour window

Once the customer replies you can send free-form text, media and interactive messages for 24 hours. See the request body examples on Send a message.