Set a workflow’s tags
PUT/
Sets a workflow’s tags, replacing the ones it has.
Needs an API token with the Write permission for workflows (workflow:write).
Parameters
Path
idRequired · UUIDThe workflow’s ID.
Body
tagsRequired · array of stringsEvery tag it should have: up to 50, of up to 50 characters each.
[], or leaving it out, removes them all. Repeats are removed ignoring case; the first spelling stays.
Safe on a live workflow
Tags aren’t part of the definition. Setting them makes no version, doesn’t change definitionRev and never clashes with an editor’s save.
To add tags without removing any, use Change many workflows at once with addTags.
Responses
- 200OK
Done. The answer doesn’t hold the tags.
idisn’t a UUID, the body isn’t JSON, or there are over 50 tags or a tag is over 50 characters.- 403
FORBIDDENThe token lacks the Write permission for workflows.
- 404
NOT_FOUNDNo workflow with this ID in the token’s workspace.
Nothing changed. Try again.
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"
curl -X PUT "$GORUNNER/api/workflows/$WORKFLOW_ID/tags" \
-H "Authorization: Bearer $GORUNNER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tags": [
"prod",
"billing"
]
}'const GORUNNER = "https://api.gorunner.io";
const TOKEN = process.env.GORUNNER_TOKEN;
const WORKFLOW_ID = process.env.WORKFLOW_ID;
const res = await fetch(
`${GORUNNER}/api/workflows/${WORKFLOW_ID}/` +
`tags`,
{
method: "PUT",
headers: {
Authorization: `Bearer ${TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
tags: ["prod", "billing"],
}),
},
);
const { data } = await res.json();import os, requests
GORUNNER = "https://api.gorunner.io"
TOKEN = os.environ["GORUNNER_TOKEN"]
WORKFLOW_ID = os.environ["WORKFLOW_ID"]
res = requests.put(
f"{GORUNNER}/api/workflows/{WORKFLOW_ID}/tags",
headers={"Authorization": f"Bearer {TOKEN}"},
json={
"tags": ["prod", "billing"],
},
)
data = res.json()["data"]Response · 200 OK
{
"data": {
"id": "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31",
"updated": true
}
}Every field
Body
tagsRequired · array of stringsThe complete replacement set. Omitting the field, or sending null, is treated as an empty list and clears all tags (an empty BODY is unreadable: a 400).
Response · 200 OK
dataobjectidUUIDupdatedboolean