Skip to main content
The BluBash REST API connects your system to the platform. With it, you forward messages to the AI agent through an API channel and feed ongoing WhatsApp campaigns with contacts from your CRM, website, or ERP.

Available APIs

Channels API

Send your users’ messages (text, image, audio, video, or document) to BluBash through an API channel and get the AI agent’s reply in the same call.

Campaigns API

Add contacts to an Ongoing Campaign, schedule sends per contact, cancel queued messages, and check delivery status.

Base URL

Authentication

Every request needs the workspace API Key in the X-API-Key header. Header names are case-insensitive: x-api-key also works.

Get the API Key

The BluBash interface does not have a screen to generate API keys. Request the workspace API Key from BluBash support. To use the Channels API, also ask for the API channel setup, which support handles.
Treat the API Key like a password. Do not put it in code that runs in the browser or in your customer’s app, or in public repositories. Make calls from your server.

Idempotency

The Channels API accepts the optional X-Idempotency-Key header. Send a unique value per operation so that a retry of the same request does not create duplicate messages.
Use one UUID per logical operation or a hash of the request content. Reuse the same key only when retrying exactly the same operation.

Response codes

Best practices

  • Always use the same identifier for the same contact. In the Channels API, the contactIdentifier. In the Campaigns API, the identifier or contact_id. Different identifiers create duplicate contacts.
  • Handle errors by code. 4xx errors need a fix; 5xx errors can be retried.
  • Retry with exponential backoff. Wait longer between attempts and cap the number of retries.
  • Validate in a test setup first. Use a test channel and a test campaign before pointing production traffic.
  • Store the returned IDs. Keep contactId, conversationId, and messageId to trace service and delivery.

How the API connects to the rest of BluBash

  • Contacts created through the API appear in Contacts, with the tags and additional fields sent in the payload.
  • API channel conversations are handled by the AI agent configured for the channel. See What are AI agents →.
  • Contacts added through the API to an Ongoing Campaign appear with the API source in the campaign details. See Manage campaigns →.

Support

To get the API Key, set up the API channel, or ask integration questions, contact BluBash support at suporte@blubash.io.