PATCH /v1/routines/{routine}
`paused: true` stops every trigger of the routine (API runs still work); `false` resumes them. Resuming a routine paused because its publishing key was revoked fails until a new version is published with a valid key. Also replaces `metadata`.

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)

Path Parameters

routine string required path
A routine ID (`rtn_…`) or name. Names are unique per project; `runs`, `hooks`, `validate` and `import` are reserved and cannot be routine names.
Example: "nightly-digest"

Request Body required

application/json
paused boolean
metadata object
Up to 16 string key-value pairs you attach to an object for your own use. Keys are 1 to 40 characters of `A-Z a-z 0-9 _ . : -`; values are at most 500 characters. B3OS never interprets them.

Responses

200 The routine.
application/json
id string REQUIRED
object string REQUIRED
Enum: routine
name string REQUIRED
description string | null REQUIRED
status string REQUIRED
`paused` when triggers are stopped; API runs still work unless `paused_reason` is `run_as_revoked`.
Enum: active, paused
paused_reason string | null REQUIRED
Enum: manual, run_as_revoked, null
version object REQUIRED
id string REQUIRED
number integer REQUIRED
created_at string (date-time) REQUIRED
triggers object[] REQUIRED
Array of:
id string REQUIRED
The trigger's `id` in the definition.
type string REQUIRED
Enum: cron, interval, webhook, action
status string REQUIRED
Enum: active, paused
next_fire_at string (date-time) | null REQUIRED
Next scheduled fire (cron and interval), or `null`.
hook object | null REQUIRED
The inbound URL of a webhook trigger, or `null`.
id string REQUIRED
url string (uri) REQUIRED
Give this URL to the provider.
verify string REQUIRED
Enum: b3os, github, stripe, slack, standard_webhooks, hmac_sha256
secret string
The `b3os` scheme's signing secret. Present only in the response of the publish that created the hook (and of a rotation).
subscription_id string | null REQUIRED
The trigger subscription of an action trigger (`GET /v1/actions/subscriptions/{subscription_id}`), or `null`.
run_as object REQUIRED
The identity runs execute as (the key that published the active version, with its scopes at publish time).
key string | null REQUIRED
The API key ID; `null` when a dashboard user published.
scopes string[] REQUIRED
Array of: string
created_at string (date-time) REQUIRED
updated_at string (date-time) REQUIRED
metadata object REQUIRED
Up to 16 string key-value pairs you attach to an object for your own use. Keys are 1 to 40 characters of `A-Z a-z 0-9 _ . : -`; values are at most 500 characters. B3OS never interprets them.
400 The request failed validation (`invalid_request`, `invalid_url`).
401 Missing, malformed, expired or revoked credentials (`unauthorized`).
403 The key that published the active version is revoked (`run_as_revoked`).
404 No such routine in this project (`routine_not_found`).
413 The request body exceeds this operation's limit.
415 The Content-Type is not accepted by this operation.
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
503 The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X PATCH 'https://beta-api.b3os.org/v1/routines/nightly-digest' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "paused": true}'
const response = await fetch('https://beta-api.b3os.org/v1/routines/nightly-digest', {  method: 'PATCH',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({    "paused": true  })});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.patch('https://beta-api.b3os.org/v1/routines/nightly-digest', headers=headers, json={  "paused": true})print(response.json())
200 Response
{  "id": "rtn_01m5t6vhkw4a8fa4tb5w4ffz37",  "object": "routine",  "name": "nightly-digest",  "description": null,  "status": "paused",  "paused_reason": "manual",  "version": {    "id": "ver_01m5t6ncrsssrysy1p2fbn2pgf",    "number": 2,    "created_at": "2026-10-25T19:20:00.000Z"  },  "triggers": [    {      "id": "nightly",      "type": "cron",      "status": "paused",      "next_fire_at": null,      "hook": null,      "subscription_id": null    }  ],  "run_as": {    "key": "key_01m5t5gb92a5zncjx654gevx4p",    "scopes": [      "vision:run",      "infer:run"    ]  },  "created_at": "2026-10-25T19:10:00.000Z",  "updated_at": "2026-10-25T19:30:00.000Z",  "metadata": {}}
Ask a question... ⌘I