It allows the deletion of a campaign.
The Campaign API exposes a POST endpoint that allows to delete a campaign:
/campaigns/delete
See .
If the POST to the API endpoint is successful you will receive an HTTP 204 confirmation.
If the POST data does not meet the API requirements you will receive an actionable error message. Contact us at 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)
SERVER_ERROR (Http status code: 500, Error code: 0)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.
Deletes an existing campaign
Authentication is required in order to interact with Batch's APIs.
Batch implements authentication using API Keys, that we call the "REST API Key". You can find it on your dashboard.
Please make sure that you keep this key secret. You should never use it in client apps to call APIs from there as it would easily be extractable.
In order to authenticate your requests, add your REST API Key in the Authorization header and prefix it by Bearer. Example: Authorization: Bearer bcd38d9rfb38ra28.
The unique project key, identifying a project on the Batch platform
project_0664hxvwffvbpn278gxdyhsadddqgna6The campaign id of the campaign to delete
Request successful, campaign deleted
The request is malformed
The Rest API Key is not valid for this project
Not found
Too Many Requests
Unexpected error
Batch's services are under maintenance. Please try again later
{}POST /2.8/campaigns/delete HTTP/1.1
Host: api.batch.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-Batch-Project: text
Content-Type: application/json
Accept: */*
Content-Length: 55
{
"id": "orchestration_0664hyh918hr1gnzka9py5t62nrc0e1f"
}