Skip to Content
My App
Api

Campaign

Create, start, pause and monitor drip / marketing campaigns and their recipients.

GET
/campaigns/statistics

Authorization

http
headerAuthorizationBearer <token>

Response Body

application/json
  1. response
data*string|array<string>
meta*string
Example Request
curl -X GET 'https://aexrux.com/api/v1/campaigns/statistics'
Example Response
{  "data": "string",  "meta": "string"}
GET
/campaigns

Authorization

http
headerAuthorizationBearer <token>

Response Body

application/json
  1. response
data*array<array<unknown>>
meta*
Example Request
curl -X GET 'https://aexrux.com/api/v1/campaigns'
Example Response
{  "data": [    [      null    ]  ],  "meta": {    "count": 0  }}
POST
/campaigns

Routes through the web WaCampaignsController::store — the SINGLE real dispatch path. now campaigns fire immediately; scheduled/recurring are armed for the heartbeat sweeper. (The mobile-app controller only persists rows and never dispatches, so we deliberately don't use it.) The public schedule_type=later maps to the web vocabulary scheduled, and recipient phone numbers ride in as manual_numbers — the web path materialises a workspace Contact for each, so sends are always scoped to the caller's own workspace.

Authorization

http
headerAuthorizationBearer <token>

Request Body

application/json
  1. body

Create a campaign — a multi-recipient send (template, custom message or flow) with optional A/B testing. Scramble reads these rules to document the request body.

Mirrors the input keys the existing App\CampaignController::store accepts (campaign_name / device_id / campaign_type / schedule_type / template_id(s) / flow_id / custom_message / send_date+send_time / timezone / ab_* / contacts), exposed under public-facing names. Recipients are supplied as a list of phone numbers in international format.

campaign_name*string

Campaign label shown in the dashboard. Required.

Lengthlength <= 255
device_id*string

Sending device — the device's phone number or id. Required.

campaign_type*string

What the campaign sends. Required.

Value in"custom""template""flow"
schedule_type*string

When to send: now, later (needs send_date+send_time), or recurring. Required.

Value in"now""later""recurring"
template_id?|

WaTemplate id (required for non-A/B template campaigns).

template_id_a?|

A/B testing: the two competing WaTemplate ids.

template_id_b?integer|null
flow_id?|

Flow id (required for flow campaigns).

custom_message?|

Free-text message body (required for custom campaigns).

Lengthlength <= 4096
send_date?|

Date to send on (Y-m-d) — required when schedule_type=later.

Formatdate-time
send_time?|

Time to send at (HH:MM) — required when schedule_type=later.

Lengthlength <= 16
timezone?|

IANA timezone for send_date/send_time. Defaults to UTC.

Lengthlength <= 64
ab_testing?|

Enable A/B testing (template campaigns only).

ab_split?|

Percentage of recipients sent variant A (10-90). Defaults to 50.

Range10 <= value <= 90
contacts*array<>

Recipient phone numbers in international format. At least one required.

Items1 <= items

Response Body

application/json
  1. response
data*array<unknown>
meta*string
Example Request
curl -X POST 'https://aexrux.com/api/v1/campaigns' \  -H 'Content-Type: application/json' \  -d '{  "campaign_name": "string",  "device_id": "string",  "campaign_type": "custom",  "schedule_type": "now",  "contacts": [    "string"  ]}'
Example Response
{  "data": [    null  ],  "meta": "string"}
GET
/campaigns/{id}

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Response Body

application/json
  1. response
data*array<unknown>
meta*
Example Request
curl -X GET 'https://aexrux.com/api/v1/campaigns/0'
Example Response
{  "data": [    null  ],  "meta": {    "counts": "string",    "metrics": "string"  }}
DELETE
/campaigns/{id}

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Response Body

application/json
  1. response
data*
meta*string
Example Request
curl -X DELETE 'https://aexrux.com/api/v1/campaigns/0'
Example Response200
{  "data": {    "deleted": true,    "message": "string"  },  "meta": "string"}
POST
/campaigns/{id}/stop

Authorization

http
headerAuthorizationBearer <token>

Path Parameters

id*integer

Response Body

application/json
  1. response
data*array<unknown>
meta*string
Example Request
curl -X POST 'https://aexrux.com/api/v1/campaigns/0/stop'
Example Response200
{  "data": [    null  ],  "meta": "string"}