Delete a campaign

Delete a campaign by id or exact name. Its unsent steps are cancelled first, so nothing it queued goes out afterwards; sent messages stay in the history. Cannot be undone; pause a campaign to keep it.

DELETEhttps://app.trygtm.com/api/v1/campaigns/{campaign}
Scope
write

Path parameters

campaignstringrequired
The campaign to delete, by id or exact name (case-insensitive).

Headers

Idempotency-Keystringoptional
A key unique to this write, up to 255 characters. A retry carrying the same key returns the first response instead of running again. Kept for 24 hours.

Request

curl -X DELETE https://app.trygtm.com/api/v1/campaigns/Q4%20logistics%20leaders \
  -H "Authorization: Bearer $TRYGTM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Response

{
  "data": {
    "detail": "Campaign “Q4 logistics leaders” deleted. 12 unsent steps cancelled.",
    "campaign": {
      "id": "3b7f0c52-91aa-4e0d-8c11-5a2d6e4f7b90",
      "name": "Q4 logistics leaders"
    }
  }
}

Was this page helpful?