Skip to main content
POST
Send Campaigns

Endpoint

Campaigns must be published in the Connectly Flow Builder before you call this endpoint. Sending to an unpublished campaign returns a 409 error.

Request body

entries array (required)

Each object in entries represents one recipient. You can mix entries for different campaigns in the same request.

options object (optional)

sender string (optional)

The business channel to send from: your WhatsApp number in E.164 format or its phone number ID, or your RCS sender name to send over RCS. Omit it to use your default channel: a campaign whose flow is for RCS only sends from your RCS sender, and any other campaign sends on WhatsApp.

Campaigns with an A/B Split

You send a campaign that starts with an A/B Split the same way as any other campaign. The request has no variant field.
  • Connectly picks the variant. Each customer is assigned to a variant by the weights set on the split in the Flow Builder.
  • The same customer always gets the same variant. The assignment is based on the customer, so sending again, in the same request or a later one, never moves them to another variant.
  • Send the variables of every variant. Every entry must include all the variables used by any variant, because you don’t know in advance which variant the customer will get. If variant A uses name and variant B uses name and coupon, send both for every customer.
  • A missing or empty variable rejects the entry. That customer is not sent anything. The entry is counted in rejectedCount, and error.message names the variable (for example Missing required value for variable coupon). The other entries in the request still go out.
  • Variable values are strings. Send numbers and dates as strings, for example "10", not 10.
Campaigns that start with an A/B Split send on WhatsApp and on RCS alike.

Examples

The smallest valid entry. Use this for campaigns that have no variable placeholders.
Variables are defined in the campaign flow in the Connectly UI. Pass the same key names here.
Connectly creates a separate sendout for each unique campaignName + campaignVersion combination. This request produces three sendouts: campaign_A at v1.0, campaign_A at its latest active version, and campaign_B at v1.0.
promo_ab_test starts with an A/B Split. Variant A uses name, and variant B uses name and coupon. Every entry sends both, whichever variant the customer gets.
By default, the API prevents sending the same campaign to the same customer twice. Override with allow_multiple for use cases like recurring alerts.

Response

The API always returns HTTP 200 with a data array. Each element corresponds to a unique campaignName + campaignVersion sendout generated by the request.
If you call the API again for the same campaign and recipient group, status returns "updated" rather than "created" β€” no duplicate sendout is created.
Success response

Error responses

Entry-level errors appear inside the data array with status: "error" β€” they don’t cause the whole request to fail. HTTP-level errors indicate request-wide failures.
Triggered when required flow variables are absent or the entry payload is otherwise invalid.

Rate limiting

This endpoint is limited to 200 requests per second. Exceeding this returns HTTP 429 Too Many Requests. Use exponential backoff in your client if you expect high-volume sendouts.