API keys connect your own systems (your online store, CRM or order software) to Broadycast. With a key, a server can send messages and close conversations. A typical use is sending a customer an approved template when they place an order.
Before you start
- You need to be the organization owner or an admin.
- API and webhooks must be included in your plan. If it isn’t, the screen says “API and webhooks isn’t in your plan”.
- The workspace needs a connected channel. Keys belong to a channel: a key only acts on behalf of the selected channel.
Creating a key
- Open Settings › API keys. If you have more than one channel, choose the Channel the key will act for at the top.
- Select New key.
- In Key name, say where it’s used (for example “Shopify sync”). Add a Description if you like.
- Choose when it Expires: 30 days, 90 days, 6 months, 1 year or never.
- Select Create key.
- The full key is shown only now. Copy it into a password manager or your server’s secrets, then select I’ve saved it somewhere safe.
Give each integration its own key. If one leaks, you only revoke that one and your other systems keep working. Keys without an expiry aren’t recommended: a leaked key works until you revoke it.
Your first request
Send the key in the X-API-Key header of every request. The Your first request box on the screen has an example you can copy and try right away with Copy code. It sends a text message to one person:
A POST /api/v1/public/send-message request with destination (the number in international format, e.g. +905551234567), contentType (text) and content (the message text) in the body.
The server address is in the example on screen. Replace $BROADYCAST_KEY with your own key.
What you can do
| Endpoint | What it does | Credits |
|---|---|---|
/api/v1/public/send-message | What it doesSends text, an image, audio, video or a document into an open WhatsApp conversation. The person must have written to you in the last 24 hours. | CreditsFree |
/api/v1/public/send-template-message | What it doesSends an approved WhatsApp template; no 24-hour window needed. You fill in the template’s variables in the request. | CreditsUses credits |
/api/v1/public/instagram/send-message | What it doesSends a message to someone on Instagram. | CreditsUses credits |
/api/v1/public/close-session | What it doesCloses a conversation. | CreditsFree |
For how credits work, see Credits, plans and payment. For the 24-hour rule, see Sending messages and the 24-hour window.
Managing keys
The Keys list shows each key’s first characters, its status (Active, Revoked, Expired), when it was Last used and when it Expires.
- Revoke: requests with the key are rejected right away. Systems using it will need a new key.
- Delete: the key leaves the list. This can’t be undone.
To receive incoming messages and message statuses on your own server, use a webhook rather than a key; see Webhooks.
Common errors
Frequently asked
X-API-Key header.send-template-message endpoint.