Delete campaign

It allows the deletion of a campaign.

API Description

Delete

post

Deletes an existing campaign

Authorizations
Header parameters
X-Batch-Projectstringrequired

The unique project key, identifying a project on the Batch platform

Example: project_0664hxvwffvbpn278gxdyhsadddqgna6
Body
idstringrequired

The campaign id of the campaign to delete

Responses
application/json
objectoptional
post
POST /2.4/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"
}
{}

Request structure

Route

The Campaign API exposes a POST endpoint that allows to delete a campaign:

https://api.batch.com/2.4/campaigns/delete

Headers and authentication

See Overview → Using Project APIs.

Responses

Success

If the POST to the API endpoint is successful you will receive an HTTP 204 confirmation.

Failure

If the POST data does not meet the API requirements you will receive an actionable error message. Contact us at support@batch.com 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.

Last updated

Was this helpful?