GoRunner docs
Search or askSearch⌘K

Change many workflows at once

POST/api/workflows/bulk

Does one thing to up to 200 workflows: put them live, pause, delete, tag or move them.

Needs an API token with the Write permission for workflows (workflow:write), and each op its own: Delete for delete, Publish for activate and pause.

Parameters

Body

idsRequired · array of UUIDs

Up to 200 workflow IDs. One that isn’t a UUID fails on its own.

opRequired · string

activate, pause, delete, addTags or move.

tagsOptional · array of strings

With addTags: at least one tag to add.

folderIdOptional · UUID or null

With move: the folder, or null for none.

What each op does

activate
Publishes each, with the same checks as Publish a workflow. One that fails names its step.
pause
Takes each live workflow offline. A workflow that isn’t live fails that ID.
delete
Deletes each for good, with its runs.
addTags
Adds the tags to each one’s own, up to 50 in all.
move
Files each in folderId. A folder in another workspace fails that ID.

It takes no Idempotency-Key. Sending it again is safe for activate, addTags and move. A second delete or pause fails those IDs: they are gone, or no longer live.

Responses

  • 200OK

    Each ID is in succeeded or in failed, with its reason. Read failed: a 200 doesn’t mean all worked.

  • The body isn’t JSON, there are no IDs or more than 200, op is unknown, or addTags has no tag, over 50 tags, or a tag over 50 characters.

  • The token lacks Write, which every op needs, or the one its op adds: Delete for delete, Publish for activate and pause.

  • A token made inside a partner’s product sent move while folders are switched off there.

Any call can also answer: 401 UNAUTHORIZED · 401 TOKEN_ENDED · 403 TOKEN_SURFACE_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

curl -X POST "$GORUNNER/api/workflows/bulk" \
  -H "Authorization: Bearer $GORUNNER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "op": "addTags",
    "ids": [
      "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31",
      "6e9a1c3f-8b2d-4a57-9e0c-3f7b5d1a8c42"
    ],
    "tags": [
      "prod"
    ]
  }'

Response · 200 OK

json
{
  "data": {
    "op": "addTags",
    "succeeded": [
      "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31"
    ],
    "failed": [
      {
        "id": "6e9a1c3f-8b2d-4a57-9e0c-3f7b5d1a8c42",
        "error": "workflow not found"
      }
    ]
  }
}
Every field

Body

idsRequired · array of UUIDs

Workflow ids. An entry that is not a UUID is reported in failed, not rejected outright.

opRequired · string

One of activate, pause, delete, addTags, move.

tagsOptional · array of strings

Required (and only read) when op is addTags. Must contain at least one non-blank tag or the whole request is a 400, and so must at most 50 distinct tags of at most 50 characters each.

folderIdOptional · UUID or null

Only read when op is move. null moves the workflows out of any folder. A folder from another workspace fails per id.

Response · 200 OK

dataobject

Per-id outcome of a bulk operation. A 200 says the request was well formed, NOT that every workflow succeeded — always inspect failed.

opstring

One of activate, pause, delete, addTags, move.

succeededarray of UUIDs

Always present, possibly empty.

failedarray of objects

Always present, possibly empty. One entry per id that did not apply, each with its own reason.

idstring

The id as sent — not necessarily a valid UUID.

errorstring

Why this one failed, e.g. "Workflow not found.", "too many tags (max 50)", or a publish refusal’s sentence.

stepstring

An activate refused for one step: that step’s display name.