RPA Campaigns (Bot Automation)
What is Campaign RPA?
Section titled “What is Campaign RPA?”DEP provides a dedicated set of pages and API endpoints under /rpa/* designed for browser RPA tools (UiPath, Power Automate, Selenium, Playwright). RPA pages use simple HTML widgets without virtual comboboxes, autocomplete, or asynchronous dropdowns — every interactive element has a stable data-testid that is stable.
What this is NOT
Section titled “What this is NOT”- Not a replacement for the human campaign portal. The
/campaigns/*portal keeps evolving; the RPA surface only covers a small stable subset. - Not a scheduling interface. Campaigns that are sent have a DRAFT status. The bot schedules via
standard endpoints
POST /api/campaigns/{id}/schedules. - Not a multi-tenant aggregator. The bot authenticates as a single user belonging to one tenant via standard JWT cookies.
Quick Start
Section titled “Quick Start”To send an SMS campaign to a new audience:
- Login. POST to
/auth/login(or use the standard portal login form). Save the cookieaccess_token. - Upload the audience. multipart POST form to
/api/v1/rpa/audienceswithname(string) andcsv(file). Receive a response containing{ audience_id, processing_status, result_url, status_url }. - Receive a response containing GET
status_urlup toprocessing_status == "ready". Recommended polling interval: 2 seconds, maximum timeout: 60 seconds. - Send campaign. POST JSON to
/api/v1/rpa/campaigns. - (Optional) Schedule it. POST to the standard endpoint
/api/campaigns/{campaign_id}/schedules.
URL and Endpoints
Section titled “URL and Endpoints”| Route | Method | Purpose |
|---|---|---|
/rpa/audiences/new | GET / POST | Audience upload form |
/rpa/audiences/{id}/result | GET | Audience status page (polling) |
/rpa/campaigns/new | GET / POST | Campaign dispatch form (all channels) |
/rpa/campaigns/{id}/result | GET | Campaign status page (polling) |
/api/v1/rpa/audiences | POST | Audience upload API (multipart) |
/api/v1/rpa/campaigns | POST | Campaign creation API (JSON) |
All routes /rpa/* require a cookie access_token that is valid.
Uploading an Audience
Section titled “Uploading an Audience”Request: Content-Type: multipart/form-data
| Column | Type | Required | Description |
|---|---|---|---|
name | string | yes | Audience display name. Does not have to be unique, but the same name will result in an error AMBIGUOUS at resolution. |
csv | file | yes | CSV with a header row containing the columns phone_number. The delimiter is auto-detected (,, ;, or tab). |
Success response (HTTP 201):
{ "audience_id": "550e8400-e29b-41d4-a716-446655440000", "processing_status": "processing", "result_url": "/rpa/audiences/550e8400-e29b-41d4-a716-446655440000/result", "status_url": "/api/audiences/550e8400-e29b-41d4-a716-446655440000"}Creating a Campaign
Section titled “Creating a Campaign”Request: Content-Type: application/json
Common Columns
Section titled “Common Columns”| The column | Type | Required | Description |
|---|---|---|---|
name | string | yes | Campaign name |
audience | string | yes | Name or UUID of the audience |
channel | string | yes | "sms", "whatsapp", or "rbm" |
Per-Channel Examples
Section titled “Per-Channel Examples”{ "name": "Promo bulan ini", "audience": "Daftar kontak Q2", "channel": "sms", "sms_sender": "MAHADATA", "sms_channel": 0, "sms_body": "Halo {{1}}, dapatkan diskon spesial hari ini!"}{ "name": "Welcome blast", "audience": "Daftar kontak Q2", "channel": "whatsapp", "waba": "1234567890", "phone_number_id": "9876543210", "template": "welcome_message", "variables_json": "{\"1\":\"first_name\",\"2\":\"order_id\"}"}{ "name": "RBM promo", "audience": "Daftar kontak Q2", "channel": "rbm", "rbm_agent": "Agent-001", "sms_failover_body": "Promo spesial untuk Anda!"}SMS Custom Columns
Section titled “SMS Custom Columns”| Column | Type | Required | Description |
|---|---|---|---|
sms_sender | string | yes | Name or UUID of the SMS sender |
sms_channel | int | yes | 0=Normal, 1=Alert, 2=OTP |
sms_body | string | yes | GSM-7, max 580 septets, may contain {{1}} |
WhatsApp-Specific Columns
Section titled “WhatsApp-Specific Columns”| The column | Type | Required | Description |
|---|---|---|---|
waba | string | yes | Meta WABA ID (from Meta Business Manager) |
phone_number_id | string | yes | Meta Phone Number ID (not the phone number) |
template | string | yes | Template name or UUID |
variables_json | string | conditional | JSON mapping variable positions to audience CSV columns |
RCS-Specific Columns
Section titled “RCS-Specific Columns”| The column | Type | Required | Description |
|---|---|---|---|
rbm_agent | string | yes | RCS agent name or UUID |
sms_failover_body | string | not | SMS fallback content if RCS delivery fails |
Scheduling
Section titled “Scheduling”The campaign endpoint combines create → activate → schedule/run in a single bot turn.
Default if no schedule field is included. The server activates and runs the campaign immediately. Response: schedule_status: "sent".
{ "schedule_at": "2026-06-15T09:00:00Z"}ISO 8601 timestamp with a timezone offset. schedule_timezone optional (default UTC).
{ "schedule_cron": "0 9 * * MON", "schedule_timezone": "Asia/Jakarta"}5-field cron (MENIT JAM HARI BULAN HARI_MINGGU). schedule_timezone required, must be an IANA name.
Mutually exclusive: schedule_at and schedule_cron cannot both be included.
Cron examples
Section titled “Cron examples”| Cron | Timezone | Meaning |
|---|---|---|
0 9 * * MON | Asia/Jakarta | Every Monday at 9 AM WIB |
0 9 1 * * | UTC | The 1st of every month at 9 UTC |
*/30 * * * * | UTC | Every 30 minutes |
0 0 * * SUN | America/New_York | Midnight every Sunday New York time |
Maker-Checker
Section titled “Maker-Checker”If the tenant enables maker-checker, RPA submissions enter the approval queue:
- RPA response returns
status: "DRAFT"andschedule_status: "pending_approval". - A human checker (or a separate bot with the Checker role) approves via the approval queue UI.
- Once approved, the status changes to
ACTIVE.
Validation Error
Section titled “Validation Error”| Code | Meaning | Bot Actions |
|---|---|---|
REQUIRED | Required field is empty | Fill in the field |
UNKNOWN | Name does not match any resource | Check the spelling; use a UUID |
AMBIGUOUS | Name matches more than 1 resource | Use a UUID |
WRONG_TENANT | UUID belongs to another tenant | Use a resource that belongs to your tenant |
INACTIVE | Resource exists but is paused/rejected | Wait or choose another one |
INVALID_GSM7 | SMS content contains non-GSM-7 characters | Remove the characters; common causes: emoji, smart quotes |
OUT_OF_RANGE | sms_channel is not 0, 1, or 2 | Use 0, 1, or 2 |
INVALID_JSON | variables_json cannot be parsed | Fix the JSON syntax |
UNKNOWN_COLUMN | variables_json maps a variable to a column that does not exist in the audience CSV | Use a header column name that actually exists in the CSV |
INVALID_CHANNEL | Channel is not sms/whatsapp/rbm | Use one of the three |
MUTUALLY_EXCLUSIVE | schedule_at and schedule_cron both included | Choose only one |
IN_THE_PAST | schedule_at more than 60 seconds in the past | Use a future timestamp |
INVALID_TIMESTAMP | schedule_at not valid ISO 8601 | Use ISO 8601 with a timezone offset, e.g. 2026-06-15T09:00:00Z |
INVALID_TIMEZONE | Timezone is not a valid IANA name | Use names like Asia/Jakarta, UTC |
See also
Section titled “See also”- Creating a Broadcast Campaign — human portal guide
- Campaign Status Cycle