Skip to main content
The Campaigns API feeds a BluBash Ongoing Campaign from your system. Each contact you send joins the campaign audience and receives the configured message, right away or at the scheduled time. Use it for sign-up welcomes, post-purchase messages, reminders, and lead nurturing.
Campaigns are sent through WhatsApp. An Ongoing Campaign has no fixed list: contacts join over time, manually, through the API, or through the RD Station Marketing integration. In the API, the Ongoing Campaign corresponds to the EVERGREEN type.

Base URL

Authentication

Send the workspace API Key in the X-API-Key header. See API introduction →.
The Campaigns feature must be included in the workspace plan. Without it, write operations return 403 with the message Campaigns feature is not available in your current plan.

Prerequisites

The API does not create campaigns. It only adds contacts and controls the messages of an Ongoing Campaign that already exists in BluBash.
1

Create the Ongoing Campaign

In Campaigns, create a campaign of the Ongoing Campaign type. Choose the WhatsApp channel, the message (template or text), and the send limit. See Create a campaign →.
2

Copy the endpoint

Open the campaign, go to the Integrations tab, and expand Campaign API. Copy the Audience endpoint. The campaignId is the part between /campaigns/ and /audience.
3

Keep the campaign active

You cannot add contacts to a paused, cancelled, or failed campaign.

Endpoints


Add contacts to the audience

Adds one or more contacts to the campaign and sets the schedule for each one. Each entry in the items array is one contact.
To add a single contact, send items with one element. The same endpoint handles single and batch requests.

Request body

string
IANA time zone (for example, America/New_York) applied to items whose datetime has no UTC offset and that do not set schedule.timezone.
array
required
List of contacts with the schedule for each one. At least one item is required.

Contact resolution

When you send identifier instead of contact_id, BluBash looks for the contact in this order:
  1. By the channel identifier (for example, the normalized WhatsApp number).
  2. If not found and email is present, by email, case-insensitive.
    • If the contact found has no identifier on the channel, the identifier is linked to it.
    • If the contact found has a different identifier on the channel, the API returns 400, to avoid merging different people.
  3. If still not found, it creates a new contact with name, email, and identifier.

Scheduling rules

If the datetime has no offset and no time zone is set, the request returns 400.

Request example

Response fields

array
required
One result per item sent, in the same order as the request.

Response example


Cancel a queued message

Cancels the send of a specific message that is still queued. Other campaign messages are not affected.
Only messages with the QUEUED status can be cancelled. SENDING, SENT, or FAILED messages cannot.

Response


List campaign messages

Returns a paginated list of the campaign messages, each with its current status.

Query parameters

number
default:"50"
Number of results per page.
number
default:"0"
Number of results to skip, for pagination.

Get a message

Returns the details and current status of one campaign message.

Message statuses


1

Set up the campaign in BluBash

Create the Ongoing Campaign and copy the endpoint from the Integrations tab.
2

Add contacts

Call POST /api/v1/campaigns/{campaignId}/audience with the items array, for example on every new sign-up in your system.
3

Choose the schedule

Use schedule.type = immediate for an immediate send or schedule.type = absolute with datetime for a scheduled send.
4

Cancel if needed

To stop a queued message, call POST /api/v1/campaigns/{campaignId}/messages/{messageId}/cancel.
5

Track delivery

Use GET /api/v1/campaigns/{campaignId}/messages to check the status. In BluBash, contacts added through the API appear with the API source in the campaign details.
When the contact replies to the campaign message, the conversation continues on the WhatsApp channel. The AI agent or your team takes over according to the channel setup.

Code examples


Error reference

Next steps

Manage campaigns

Track sends, pause, and resume campaigns.

Channels API

Connect the AI agent to your system’s chat.