Update campaign
It allows to update some parameters of a campaign.
API Description
Update an existing campaign
The unique project key, identifying a project on the Batch platform
project_0664hxvwffvbpn278gxdyhsadddqgna6
Campaign id received from the create API
Campaign object as describe in the create query. An update on a campaign will overwrite its contents. It is not possible to update a completed or running campaign if not recurrent
Request structure
The Campaign API exposes a POST endpoint that allows to update a campaign:
https://api.batch.com/2.4/campaigns/update
Headers and authentication
See Overview → Using Project APIs.
Post data
The body of the request must contain a valid JSON payload describing the campaign.
Exemple of a request body:
identifier block
Campaign identifier is received in the API Campaign create response.
Campaign block
See API Campaigns create for details about parameters.
Responses
Success
If the POST to the API endpoint is successfull you will receive an HTTP 200 confirmation.
Failure
If the POST data does not meet the API requirements you will receive an actionable error message. Contact us at [email protected] if you need further support.
AUTHENTICATION_INVALID
(Http status code: 401, Error code: 10)API_MISUSE
(Http status code: 403, Error code: 12)ROUTE_NOT_FOUND
(Http status code: 404, Error code: 20)MISSING_PARAMETER
(Http status code: 400, Error code: 30)MALFORMED_PARAMETER
(Http status code: 400, Error code: 31)MALFORMED_JSON_BODY
(Http status code: 400, Error code: 32)SERVER_ERROR
(Http status code: 500, Error code: 1)MAINTENANCE_ERROR
(Http status code: 503, Error code: 2)TOO_MANY_REQUESTS
(Http status code: 429, Error code: 60) If you get a "too many requests" response, please wait for at least 5 seconds before trying again. Further requests might still return this error.
Last updated
Was this helpful?