All pages
Powered by GitBook
1 of 1

Loading...

Delete campaign

It allows the deletion of a campaign.

API Description

Request structure

Route

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

/campaigns/delete

Headers and authentication

See .

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 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.

  • Overview → Using Project APIs
    support@batch.com

    Delete

    post

    Deletes an existing campaign

    Authorizations
    AuthorizationstringRequired

    API Key Authentication

    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.

    How to authenticate

    In order to authenticate your requests, add your REST API Key in the Authorization header and prefix it by Bearer. Example: Authorization: Bearer bcd38d9rfb38ra28.

    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
    200

    Request successful, campaign deleted

    application/json
    Responseobject
    400

    The request is malformed

    application/json
    401

    The Rest API Key is not valid for this project

    application/json
    404

    Not found

    application/json
    429

    Too Many Requests

    application/json
    500

    Unexpected error

    application/json
    503

    Batch's services are under maintenance. Please try again later

    application/json
    post
    /campaigns/delete
    {}
    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"
    }