Skip to content

Delete an automation

Remove an automation and its graph.

http
DELETE /v1/automations/{id}

Requires a Full access API key.

Path parameters

ParameterTypeRequiredDescription
idstringYesThe automation id (auto_…).

Example

bash
curl -X DELETE "https://api.sendgrail.com/v1/automations/$AUTOMATION_ID" \
  -H "Authorization: Bearer $SENDGRAIL_API_KEY"
js
await fetch(`https://api.sendgrail.com/v1/automations/${id}`, {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${process.env.SENDGRAIL_API_KEY}` },
});

Response

json
{
  "object": "automation",
  "id": "auto_5PmT9wRx2AqK",
  "deleted": true
}

What deleting does

Deleting removes the automation, its graph, and its run history — the runs go with it, so a run id from a deleted automation no longer resolves.

If contacts are mid-flight, prefer stopping over deleting: stopping keeps in-flight runs and the history intact and just closes the door to new ones, while deleting throws the whole thing away. Delete when you're done with an automation for good; stop when you only want it to pause.

An automation from another team answers 404; a sending-access key answers 403. See Errors.

Transactional email on your own domain.