Send message API

Let your own software send WhatsApp messages from your agent's number.

6 min read

What it is

The Send-message API lets your own code, such as your shop or billing system, send WhatsApp templates, and replies inside 24 hours, from an agent's number. Your code decides when. Each message also shows in the agent's Inbox. You find it on the Receive from your software tab of CRM & Software. This guide is for the person who sets it up. Developers can read the full API reference, which is public.

Full API reference

Before you start

  • Only the account owner can create or revoke keys.
  • The agent needs a WhatsApp Business number connected. Without one the card says to connect one in Channels.
  • You need at least one approved template to send. Without a recent message from the customer, the first message must be a template.
  • If the tab carries a small badge or says it is not available for this agent, the API is not switched on for you yet.

Create a key

  1. 1Open Automation, then CRM & Software, then Receive from your software.
  2. 2Under Send-message API, type a Key name, for example My shop.
  3. 3Press Create key.
  4. 4Press Copy key and store it safely on your server. It is shown only once. Then press Done.
  5. 5Give the key to your developer. Keep it out of any website or app.
  • A key belongs to one agent and sends only from that agent's number.
  • An agent can have two active keys, so you can swap one without downtime.
  • Each key shows Last used, or Not used yet.

Lost a key? You cannot see it again. Create a new one and revoke the old one.

How your software sends a message

  • Every request carries the key in the Authorization header as a Bearer key.
  • List your templates, and how many values each needs, with a GET to templates.
  • Send a template with a POST to messages/template: the customer's number and the values.
  • Send a plain reply with a POST to messages/text. This works only inside 24 hours of the customer's last message. Outside it, the request is refused and nothing is sent.
  • Add an Idempotency-Key header with a new value for each message. The same key again returns the first message and sends nothing, so a retry cannot send twice.
  • Check a message with a GET to messages/ and its id. It moves from queued to sent, delivered and read, or ends failed. Unconfirmed means WhatsApp has not yet said whether it arrived; check again later.
  • Limits: 60 sends a minute and 300 reads a minute per key. WhatsApp's own limits on your number apply on top.
  • The card's How to send a message section has a ready example you can copy.

There are no status webhooks. Read the status with the GET above.

Revoke a key

  1. 1Find the key on the card and press Revoke.
  2. 2Confirm Revoke key. Software using it stops working at once. This cannot be undone.

Still need help with this setup? Contact BodhX support

Send message API · BodhX AI