GoRunner docs
Search or askSearch⌘K

Get a new webhook address

POST/api/workflows/{id}/webhook/rotate

Retires a workflow’s webhook address and gives it a new one.

Needs an API token with the Write permission for workflows (workflow:write).

Warning The old address stops working the moment this answers. Anything still sending to it gets 404.

Parameters

Path

idRequired · UUID

The workflow’s ID.

Headers

Idempotency-KeyOptional · string

Up to 255 characters. A retry with the same key within 24 hours answers the first new address again, instead of retiring that one too.

After rotating

Point every sender at the new address. You can read the token again with Get a workflow, with the Run permission for workflows.

A self-registering trigger isn’t told the new address. Publish again to sign it up anew. It takes no body.

Responses

  • 200OK

    The new token. Its address is /api/webhooks/{webhookToken} on the API’s address. Without the Run permission for workflows, the answer leaves it out.

  • id isn’t a UUID, or Idempotency-Key is over 255 characters.

  • The token lacks the Write permission for workflows.

  • No workflow with this ID in the token’s workspace.

  • The workflow doesn’t start from a webhook, so it has no address.

  • Another write to this workflow took too long, or a request with this Idempotency-Key is still in progress. Try again.

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

  • Nothing changed: the old address still works.

Any call can also answer: 401 UNAUTHORIZED · 401 TOKEN_ENDED · 403 TOKEN_SURFACE_OFF · 403 FEATURE_OFF · 403 EMBED_NOT_ALLOWED · 403 EMBED_NOT_AVAILABLE · 403 ACCOUNT_SUSPENDED · 413 PAYLOAD_TOO_LARGE · 415 INVALID_CONTENT_TYPE · 429 RATE_LIMITED · 503 BUSY · 503 PAUSED · 503 SERVICE_UNAVAILABLE. See Errors.

Request

GORUNNER="https://api.gorunner.io"
GORUNNER_TOKEN="grt_…"  # needs Write for workflows
WORKFLOW_ID="your-workflow-id"

URL="$GORUNNER/api/workflows/$WORKFLOW_ID/webhook/"
URL="${URL}rotate"
curl -X POST "$URL" \
  -H "Authorization: Bearer $GORUNNER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

Response · 200 OK

json
{
  "data": {
    "id": "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31",
    "webhookToken": "9d1e7c42-3b5a-4f68-8e20-6a7b9c0d1e2f"
  }
}
Every field

It takes no body.

Response · 200 OK

dataobject
idUUID

The workflow id.

webhookTokenstring

The NEW token. The public URL is the API’s public base + /api/webhooks/ + this value, and that endpoint is unauthenticated. The previous token is already dead.