Skip to content

Stop an automation

Turn a running automation off.

http
POST /v1/automations/{id}/stop

Requires a Full access API key.

Path parameters

ParameterTypeRequiredDescription
idstringYesThe automation id (auto_…).

Example

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

const automation = await res.json();

Response

json
{
  "object": "automation",
  "id": "auto_5PmT9wRx2AqK",
  "status": "disabled"
}

Stop is disable, spelled for the common case

Stopping sets status to disabled — the same state PATCH { "status": "disabled" } reaches. It exists as its own verb because "stop this automation" is a thing you reach for in a hurry, and a dedicated endpoint is clearer than a body edit at the moment you want to pull the plug.

Once disabled the trigger stops firing, so no new runs start. In-flight runs — a contact paused on a delay, another on a wait_for_event — are not torn down by stopping; the automation simply won't take on anyone new. To re-enable, PATCH the automation back to enabled, which re-checks the complete graph.

Stopping is also the first move when you want to edit a live automation, whose graph is frozen while enabled: stop it, edit the graph, enable it again.

Stopping an already-disabled automation is a no-op that returns the same body. See Errors for a 404 (another team) or 403 (a sending key).

Transactional email on your own domain.