Campaigns
Send Campaigns
Trigger one or more campaign flows to multiple recipients with variables, versioning, and per-entry status reporting π©
POST
Send Campaigns
Endpoint
| Parameter | Location | Description |
|---|---|---|
businessId | Path | Your Connectly business ID. |
X-API-Key | Header | Your API key. |
Request body
entries array (required)
Each object in entries represents one recipient. You can mix entries for different campaigns in the same request.
| Field | Type | Required | Description |
|---|---|---|---|
client | string | Yes | Recipientβs WhatsApp number in E.164 format (e.g. +16505551234), or a BSUID-prefixed identifier (e.g. bsuid:US.13491208655302741918). |
campaignName | string | Yes | Exact campaign name copied from the Flow Builder. |
variables | object | No | Key-value pairs substituted into the flowβs variable placeholders for this recipient. |
campaignVersion | string | No | Specific campaign version to target. If omitted, resolved by options.if_version_unspecified. |
scheduledAt | string | No | ISO 8601 datetime for future delivery (e.g. "2024-03-15T10:00:00Z"). Alpha β contact your Account Manager before using. |
options object (optional)
| Field | Values | Description |
|---|---|---|
if_version_unspecified | reuse_last_active | How to resolve the version when campaignVersion is not set. reuse_last_active targets the latest published version (default). |
if_duplicate_check_unspecified | allow_one / allow_multiple | allow_one (default) prevents sending the same campaign to the same customer twice. Set allow_multiple to override this β for example, for recurring service alerts. |
Examples
Minimal entry β no variables
Minimal entry β no variables
The smallest valid entry. Use this for campaigns that have no variable placeholders.
Entry with variables
Entry with variables
Variables are defined in the campaign flow in the Connectly UI. Pass the same key names here.
Multiple campaigns in one request
Multiple campaigns in one request
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.Allow duplicate sends
Allow duplicate sends
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 HTTP200 with a data array. Each element corresponds to a unique campaignName + campaignVersion sendout generated by the request.
| Field | Type | Description |
|---|---|---|
campaignId | string | Unique identifier for the campaign. |
campaignName | string | Name of the campaign. |
campaignVersion | string | Version used for this sendout. |
sendoutId | string | Unique identifier for the sendout. |
status | string | created, updated, or error. |
acceptedCount | integer | Number of entries accepted into the sendout. |
rejectedCount | integer | Number of entries rejected. |
error | object | null | Error detail if status is error, otherwise null. |
If you call the API again for the same campaign and recipient group,
status returns "updated" rather than "created" β no duplicate sendout is created.Error responses
Entry-level errors appear inside thedata array with status: "error" β they donβt cause the whole request to fail. HTTP-level errors indicate request-wide failures.
| HTTP status | Meaning |
|---|---|
400 | Request body is malformed or an entry is invalid. |
401 | Missing or invalid API key. |
404 | One or more referenced campaigns do not exist. |
409 | Campaign is not in a state that accepts sendouts (e.g. not yet published). |
429 | Rate limit exceeded. |
500 | Internal server error. |
Campaign not found
Campaign not found
Campaign version not found
Campaign version not found
Missing or invalid variables
Missing or invalid variables
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 HTTP429 Too Many Requests. Use exponential backoff in your client if you expect high-volume sendouts.