Campaigns — Lifecycle
Control when and how a campaign executes: schedule it for later, start it immediately, mark it complete, or cancel it.
Auth: Bearer token — workspace member. All routes resolve the workspace from the campaign row.
Campaign Status Flow
| Status | Description |
|---|---|
draft | Initial state. Campaign can be edited and actions added |
scheduled | Waiting for the scheduled time. Can be cancelled |
active | Currently executing actions. Can be cancelled |
completed | All actions finished |
cancelled | Campaign was cancelled before completion |
Schedule Campaign
POST /wallethero-api/campaigns/:id/schedule
Moves a draft campaign to scheduled and sets the time it will run.
Auth: Bearer token — workspace member.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | Campaign identifier |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
scheduled_at | string (ISO 8601) | Yes | Datetime to run the campaign at |
Example Request
curl -X POST "https://api.wallethero.app/wallethero-api/campaigns/CAMPAIGN_ID/schedule" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "scheduled_at": "2026-01-20T09:00:00Z" }'Response (200)
{
"data": { "id": "CAMPAIGN_ID", "status": "scheduled", "scheduled_at": "2026-01-20T09:00:00Z" }
}SDK
const campaign = await wh.campaigns.schedule("CAMPAIGN_ID", "2026-01-20T09:00:00Z");Start Campaign Now
POST /wallethero-api/campaigns/:id/start-now
Starts the campaign immediately, bypassing any schedule. Moves it to active.
Auth: Bearer token — workspace member.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | Campaign identifier |
Example Request
curl -X POST "https://api.wallethero.app/wallethero-api/campaigns/CAMPAIGN_ID/start-now" \
-H "Authorization: Bearer YOUR_TOKEN"Response (200)
{
"data": { "id": "CAMPAIGN_ID", "status": "active", "started_at": "2026-01-16T10:00:00Z" }
}SDK
const campaign = await wh.campaigns.startNow("CAMPAIGN_ID");Complete Campaign
POST /wallethero-api/campaigns/:id/complete
Marks the campaign as completed.
Auth: Bearer token — workspace member.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | Campaign identifier |
Example Request
curl -X POST "https://api.wallethero.app/wallethero-api/campaigns/CAMPAIGN_ID/complete" \
-H "Authorization: Bearer YOUR_TOKEN"Response (200)
{
"data": { "id": "CAMPAIGN_ID", "status": "completed", "completed_at": "2026-01-16T10:15:00Z" }
}SDK
const campaign = await wh.campaigns.complete("CAMPAIGN_ID");Cancel Campaign
POST /wallethero-api/campaigns/:id/cancel
Cancels a scheduled or active campaign. Already-completed actions cannot be undone.
Auth: Bearer token — workspace member.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | Campaign identifier |
Example Request
curl -X POST "https://api.wallethero.app/wallethero-api/campaigns/CAMPAIGN_ID/cancel" \
-H "Authorization: Bearer YOUR_TOKEN"Response (200)
{
"data": { "id": "CAMPAIGN_ID", "status": "cancelled" }
}SDK
const campaign = await wh.campaigns.cancel("CAMPAIGN_ID");