[POST] .../v1/campaign/edit
Edits campaign. Use this method to update an existing campaign before or during its lifecycle without changing the recipient rules saved at creation time. The method returns row_affected and can change name, message, run date, immediate-run flag, integration and Telegram image; recipient contacts are recalculated only when main campaign data changes while the campaign is New or Waiting. The request body is required, id must be positive, name is limited to 150 characters, message to 3000 characters and integration can be changed only while the campaign status is New. The caller must have marketing campaign edit permission; missing body, invalid id, missing campaign, denied access, no editable fields, invalid or inactive integration, integration handler mismatch, invalid image, no recipients, scheduler update failures, database errors and persistent handler errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| connected_integration_id | String | Optional | Connected integration ID. Takes precedence over integration_key when both fields are provided. |
| file | String | Optional | Base64-encoded image file. |
| id | Int64 | Required | Campaign ID. |
| message | String | Optional | Mailing message text. |
| name | String | Optional | Mailing name. |
| run_date | Int64 | Optional | Mailing run date as Unix time in seconds. |
| run_immediately | Boolean | Optional | Indicates whether the mailing starts immediately after creation: true - starts immediately and run_date is ignored, false - starts on the date specified in run_date. |
Request Example
{
"id": 1,
"name": "January loyalty campaign",
"message": "Updated campaign message.",
"run_date": 1712436400,
"run_immediately": false,
"connected_integration_id": "c98210addc4f4e1bb50b17a8c1299a37"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1,
"ids": null
}
}