curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/update-campaign \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"id": 123,
"agent_id": 123,
"campaign_name": "<string>",
"description": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"max_retry": 49,
"max_delay": "<string>",
"campaign_status": "draft",
"conditions": [
{
"rules": [
{
"field": "<string>",
"operator": "==",
"value": "<string>"
}
],
"join": "OR"
}
]
}
'Update an existing campaign.
curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/update-campaign \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"id": 123,
"agent_id": 123,
"campaign_name": "<string>",
"description": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"max_retry": 49,
"max_delay": "<string>",
"campaign_status": "draft",
"conditions": [
{
"rules": [
{
"field": "<string>",
"operator": "==",
"value": "<string>"
}
],
"join": "OR"
}
]
}
'/update-campaign
Content-Type: application/json
Authentication: Required (workspace auth)
id and any fields you want to change.
{
"id": 42,
"agent_id": 123,
"campaign_name": "Winter Sale Campaign - Updated",
"description": "Updated description for winter offer campaign",
"start_date": "2025-12-05",
"end_date": "2026-01-05",
"max_retry": 5,
"max_delay": "{\"d\":1,\"h\":2,\"m\":30}",
"campaign_status": "inprogress",
"conditions": [
{
"rules": [
{ "field": "status", "operator": "==", "value": "active" },
{ "field": "region", "operator": "==", "value": "US" }
]
},
{
"join": "OR",
"rules": [
{ "field": "priority", "operator": "==", "value": "high" }
]
}
]
}
id is required — it identifies the campaign to update.campaign_status accepts a string value: draft, inprogress, hold, or pause.max_delay must be passed as a JSON string with keys d (days), h (hours), and m (minutes) as numbers.start_date and end_date must be in YYYY-MM-DD format (e.g., "2025-12-05").max_retry cannot be greater than 50.conditions field accepts an array of groups. Each group contains rules that are evaluated together.
Structure:
| Field | Type | Required | Description |
|---|---|---|---|
join | string | No | "OR" or "AND" — how this group connects with the previous group. Omit for the first group. |
rules | array | Yes | Array of condition rules within this group. Rules within a group are always joined with AND. |
| Field | Type | Required | Description |
|---|---|---|---|
field | string | Yes | The field name to evaluate (from agent’s metadata input fields) |
operator | string | Yes | One of the allowed operators (see table below) |
value | string | Yes | The value to match against |
| Operator | Description |
|---|---|
== | Equals (case-insensitive) |
!= | Not equals |
> | Greater than (numeric) |
>= | Greater than or equal (numeric) |
< | Less than (numeric) |
<= | Less than or equal (numeric) |
contains | Value contains the substring |
startsWith | Value starts with the string |
endsWith | Value ends with the string |
join field ("OR" or "AND")."conditions": [
{
"rules": [
{ "field": "status", "operator": "==", "value": "active" }
]
}
]
"conditions": [
{
"rules": [
{ "field": "status", "operator": "==", "value": "active" },
{ "field": "region", "operator": "==", "value": "US" }
]
}
]
"conditions": [
{
"rules": [
{ "field": "status", "operator": "==", "value": "active" },
{ "field": "region", "operator": "==", "value": "US" }
]
},
{
"join": "OR",
"rules": [
{ "field": "priority", "operator": "==", "value": "high" }
]
}
]
"conditions": null.
curl -X POST https://www.tryunleashx.com/api/v1/global/update-campaign \
-H "Content-Type: application/json" \
-H "token: <api_key>" \
-d '{
"id": 42,
"campaign_name": "Winter Sale Campaign - Updated",
"start_date": "2025-12-05",
"end_date": "2026-01-05",
"max_retry": 5,
"max_delay": "{\"d\":1,\"h\":2,\"m\":30}",
"campaign_status": "inprogress",
"conditions": [
{
"rules": [
{ "field": "status", "operator": "==", "value": "active" }
]
}
]
}'
API token for authentication
Campaign ID to update
Updated voice agent to use for this campaign
Updated campaign name (must remain unique within workspace)
Updated description
Updated start date in YYYY-MM-DD format (e.g. 2025-12-05)
Updated end date in YYYY-MM-DD format (e.g. 2026-01-05)
Updated maximum retry attempts (cannot be greater than 50)
x <= 50Delay between retries as a JSON string. Keys: d (days), h (hours), m (minutes) with numeric values. Example: {"d":1,"h":2,"m":30}
Updated campaign status.
draft, inprogress, hold, pause Condition groups with AND/OR logic. Each group contains rules joined by AND. Groups are joined by the 'join' field (OR or AND).
Show child attributes
Campaign updated successfully
Was this page helpful?