Skip to main content
DELETE
/
campaigns
/
{campaignId}
curl --request DELETE \
  --url 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "message": "Campaign deleted successfully"
}
curl --request DELETE \
  --url 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "message": "Campaign deleted successfully"
}

Authorizations

Authorizations
string | header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

campaignId
string
required
The id of the campaign to delete.

Response

Returns a confirmation that the campaign was deleted.
success
boolean
Indicates whether the request was successful.
message
string
Confirmation message.Example: "Campaign deleted successfully"

Error Responses

400 - Cannot delete non-draft campaign
object
Returned when the campaign is not in draft status.
{
  "success": false,
  "error": {
    "message": "Only draft campaigns can be deleted",
    "code": "ONLY_DRAFT_CAMPAIGNS_CAN_BE_DELETED",
    "status": 400
  }
}
404 - Campaign not found
object
Returned when no campaign with the given ID exists on the project.
{
  "success": false,
  "error": {
    "message": "Campaign not found",
    "code": "CAMPAIGN_NOT_FOUND",
    "status": 404
  }
}