Skip to main content
Documentation for version v74

Activate mailing

Description

Activates a mailing.

Can be used to activate and launch a mailing instantly.
Also you can override mailing audience source for a different database or segment.

If run_now = true, the specified mailing launches instantly.

override_source_type and override_source_id are valid only if run_now = true.

override_limit parameter sets sending limitations for the current run.

If no override options are set - campaigns will use their default audience sources and sending limitations.

Request URL

Method: POST

https://example.com/api/v1.1/campaigns/activate/

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
idint12YesMailing ID
run_nowbooltrueNoLaunch mailing instantly
override_source_typeenum"list" or "segment"NoOverride audience source
override_source_idint5NoNew audience source ID
override_limitint300NoOverride mailing limitations
contentJSON object{"field":"value"}NoAdditional content for API content filter node and template apicontent variables
attachJSON array[]NoAttach file(s) to mailing messages

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 82,
"override_source_id": 1,
"override_source_type": "list",
"run_now": true
}

Response example

{
"data": null,
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text