GoRunner docs
Search or askSearch⌘K

Cancel a run

Since v2026.10.4

POST/api/embed/v1/accounts/{accountId}/runs/{runId}/cancel

Stops one of an account’s runs, as Cancel on the Runs page does.

Needs a partner key: Authorization: Bearer gre_…, from Platform › Partner keys. Call it from your server only.

Embed · Self-hosted with an Embed license

Parameters

Path

accountIdRequired · string

Your ID for the customer’s account: 1 to 255 bytes of UTF-8, case-sensitive. URL-encode it: it may contain /.

runIdRequired · UUID

The run’s ID.

Headers

Idempotency-KeyOptional · string

Up to 255 characters. The same request with the same key within 24 hours answers the first result again, with Idempotency-Replayed: true.

What happens

A run waiting in line leaves it and never runs. A held run is settled. A running one is asked to stop and reads cancelling until its worker has. A finished run is left as it is: cancelled: false, with its status.

Only runs this API lists can be reached. The account’s audit log gets an embed.run.cancel row.

Responses

  • 200OK

    The run as it stands now.

  • The account ID isn’t allowed as written. details.field names it.

  • No such account, or no such run in it.

  • The account is deleted. Restore it first, within 30 days.

  • A request with this Idempotency-Key is still running. Retry shortly.

  • This Idempotency-Key was already used with a different request.

  • Something failed on the installation’s side. Try again.

Any call can also answer: 401 UNAUTHORIZED · 403 EMBED_NOT_LICENSED · 403 IP_NOT_ALLOWED · 413 PAYLOAD_TOO_LARGE · 415 INVALID_CONTENT_TYPE · 429 RATE_LIMITED · 503 BUSY. See Errors.

Request

GORUNNER="https://automations.example.com"
GORUNNER_EMBED_KEY="YOUR_PARTNER_KEY"  # gre_…
ACCOUNT_ID="acct-bakery"
RUN_ID="your-run-id"

URL="$GORUNNER/api/embed/v1/accounts/$ACCOUNT_ID/"
URL="${URL}runs/$RUN_ID/cancel"
curl -X POST "$URL" \
  -H "Authorization: Bearer $GORUNNER_EMBED_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Response · 200 OK

json
{
  "data": {
    "run": {
      "id": "8f0c41d2-6b7e-4c1a-9d3f-2a5b7c9e1f04",
      "status": "cancelling"
    },
    "cancelled": true
  }
}
Every field

It takes no body.

Response · 200 OK

dataobject
runobject
idUUID
statusstring

The run’s status now, as EmbedRun says it, or cancelling while a running run stops.

cancelledboolean

Whether this call stopped it; false for a run that had already finished.