routines-fire changedapi/claude-code/routines-fire
Nearest release: v2.1.330, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+31added
Lines−31removed
From line
18
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits12to this page, all time
The whole hunk
from line 18, old and new numbered
/
from line 18
1818
1919The routine fire endpoint belongs to the Claude Code product surface, which differs from the Claude Platform APIs and SDKs in a few ways:
2020
21| Aspect | This endpoint | Claude Platform APIs |
22| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
23| Authentication | `Authorization: Bearer` with a per-routine token (`sk-ant-oat01-...`) created at [claude.ai/code/routines](https://claude.ai/code/routines) | A Claude API key from Claude Console, sent as `Authorization: Bearer` |
24| Token scope | One routine only; no read access | Workspace-level |
25| SDK support | None | Available in all [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) |
26| Billing | Claude Code subscription usage on claude.ai | Claude Platform usage |
27| Path namespace | `/v1/claude_code/...` | `/v1/...` |
28| Stability | Experimental | Stable or standard beta |
21| Aspect | This endpoint | Claude Platform APIs |
22| ----- | ----- | ----- |
23| Authentication | `Authorization: Bearer` with a per-routine token (`sk-ant-oat01-...`) created at [claude.ai/code/routines](https://claude.ai/code/routines) | A Claude API key from Claude Console, sent as `Authorization: Bearer` |
24| Token scope | One routine only; no read access | Workspace-level |
25| SDK support | None | Available in all [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) |
26| Billing | Claude Code subscription usage on claude.ai | Claude Platform usage |
27| Path namespace | `/v1/claude_code/...` | `/v1/...` |
28| Stability | Experimental | Stable or standard beta |
2929
3030## Before you start
3131
from line 69
6969
7070### Headers
7171
72| Name | Required | Description |
73| ------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
74| `Authorization` | Yes | `Bearer <token>`. The per-routine token created in the Claude Code web UI, prefixed `sk-ant-oat01-`. |
75| `anthropic-version` | Yes | The [API version](https://platform.claude.com/docs/en/api/versioning), such as `2026-10-21`. The endpoint accepts every version from `2023-06-01` on and behaves the same in each. |
76| `Content-Type` | When body is present | `application/json`. |
72| Name | Required | Description |
73| ----- | ----- | ----- |
74| `Authorization` | Yes | `Bearer <token>`. The per-routine token created in the Claude Code web UI, prefixed `sk-ant-oat01-`. |
75| `anthropic-version` | Yes | The [API version](https://platform.claude.com/docs/en/api/versioning), such as `2026-10-21`. The endpoint accepts every version from `2023-06-01` on and behaves the same in each. |
76| `Content-Type` | When body is present | `application/json`. |
7777
7878The endpoint accepts requests with and without an `anthropic-beta: experimental-cc-routine-2026-04-01` header.
7979
8080### Path parameters
8181
82| Name | Type | Description |
83| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
82| Name | Type | Description |
83| ----- | ----- | ----- |
8484| `routine_id` | string | The routine’s identifier. Despite the parameter name, the value is prefixed `trig_` rather than `routine_`. Included in the URL the modal window shows when you add an API trigger. |
8585
8686### Request body
8787
88| Field | Type | Required | Description |
89| ------ | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
90| `text` | string | No | Initial context for this run, such as an alert body, a failing log line, or a git diff. The value is freeform text and is not parsed; if you send JSON or another structured payload, the routine receives it as a literal string. Passed to the routine alongside its saved prompt. Maximum 65,536 characters. |
88| Field | Type | Required | Description |
89| ----- | ----- | ----- | ----- |
90| `text` | string | No | Initial context for this run, such as an alert body, a failing log line, or a git diff. The value is freeform text and is not parsed; if you send JSON or another structured payload, the routine receives it as a literal string. Passed to the routine alongside its saved prompt. Maximum 65,536 characters. |
9191
9292The body is optional. Unknown fields in the body are ignored.
9393
from line 103
103103}
104104```
105105
106| Field | Type | Description |
107| ------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------ |
108| `type` | string | Always `routine_fire`. |
109| `claude_code_session_id` | string | The ID of the Claude Code session created for this run. |
106| Field | Type | Description |
107| ----- | ----- | ----- |
108| `type` | string | Always `routine_fire`. |
109| `claude_code_session_id` | string | The ID of the Claude Code session created for this run. |
110110| `claude_code_session_url` | string | A link to the session on claude.ai. Open it in a browser to watch the run, review changes, or continue the conversation. |
111111
112112### Errors
from line 123
123123}
124124```
125125
126| HTTP status | Error type | Cause |
127| ----------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
128| 400 | `invalid_request_error` | Missing or unsupported `anthropic-version` header, `text` exceeds 65,536 characters, or the routine is paused (see [Edit and control routines](https://code.claude.com/docs/en/routines#edit-and-control-routines)). |
129| 401 | `authentication_error` | No bearer token in the `Authorization` header, or the token does not match this routine. |
130| 403 | `permission_error` | The account or organization does not have access to this endpoint. |
131| 404 | `not_found_error` | The routine does not exist. |
132| 429 | `rate_limit_error` | An hourly fire limit for the routine or the account has been reached. The response includes a `Retry-After` header indicating when the window resets. |
133| 500 | `api_error` | An unexpected server error. Retry with exponential backoff; if the error persists, contact support with the request ID. |
134| 503 | `overloaded_error` | The service is temporarily overloaded. Retry after a short delay. The Claude Platform returns 529 for this error type; this endpoint returns 503. |
126| HTTP status | Error type | Cause |
127| ----- | ----- | ----- |
128| 400 | `invalid_request_error` | Missing or unsupported `anthropic-version` header, `text` exceeds 65,536 characters, or the routine is paused (see [Edit and control routines](https://code.claude.com/docs/en/routines#edit-and-control-routines)). |
129| 401 | `authentication_error` | No bearer token in the `Authorization` header, or the token does not match this routine. |
130| 403 | `permission_error` | The account or organization does not have access to this endpoint. |
131| 404 | `not_found_error` | The routine does not exist. |
132| 429 | `rate_limit_error` | An hourly fire limit for the routine or the account has been reached. The response includes a `Retry-After` header indicating when the window resets. |
133| 500 | `api_error` | An unexpected server error. Retry with exponential backoff; if the error persists, contact support with the request ID. |
134| 503 | `overloaded_error` | The service is temporarily overloaded. Retry after a short delay. The Claude Platform returns 529 for this error type; this endpoint returns 503. |
135135
136136## Authentication
137137
No line in this hunk matches that.