Answer: You add an API trigger on the web, not the CLI: open the scheduled task for editing, then in the Trigger row click + and select API, and copy the Fire URL and generate a token. The trigger takes effect as soon as you generate the token, so you don't need to click Save changes. Status: Confirmed Entry: tool/claude-code/agents-and-automation/add-api-trigger Revision: 2 Digest: sha256:f9ef2f4ef6e93d33 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:31Z Last changed: 2026-11-20T12:24:30Z (save requirement: — → You don't need to click **Save changes**) Last verified: 2026-11-20T12:24:30Z Next check: 2026-11-21T12:24:30Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of where to add | Add an API trigger on the web | [1] | 2026-11-20 CLI limitation | You can't add an API trigger or manage its token from the CLI. | [1] | 2026-11-20 trigger menu action | click **+** and select **API** | [1] | 2026-11-20 token display | The token is shown once and can't be retrieved later | [1] | 2026-11-20 activation | The API trigger takes effect as soon as you generate the token. | [1] | 2026-11-20 save requirement | You don't need to click **Save changes** | [1] | 2026-11-20 auth header | `Authorization: Bearer` | [1] | 2026-11-20 Sources: [1] Anthropic. "Automate work with scheduled tasks". https://code.claude.com/docs/en/routines.md Role: primary. Accessed: 2026-11-20T12:24:30Z Quote: "Add an API trigger on the web, either while you [create the task](#create-from-the-web) or later with the steps below." (Supports: where to add) Quote: "You can't add an API trigger or manage its token from the CLI." (Supports: CLI limitation) Quote: "In the **Trigger** row, click **+** and select **API** from the menu that opens." (Supports: trigger menu action) Quote: "The token is shown once and can't be retrieved later, so store it somewhere secure such as your alerting tool's secret store." (Supports: token display) Quote: "The API trigger takes effect as soon as you generate the token." (Supports: activation) Quote: "You don't need to click **Save changes**, so close the dialog when you're done." (Supports: save requirement) Quote: "Send the token in the `Authorization: Bearer` header when you POST to the URL." (Supports: auth header) Published: 2026-11-20T02:51:59Z Snapshot SHA-256: 9377bc3e62c3bed0f909f35a4dedffee77fb9250f8d02f0650333901aa97c0e3 (captured 2026-11-20T12:24:28Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:24:30Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:24:30Z Last attempt: 2026-11-20T12:24:30Z Notes and limitations: Extracted automatically from a single official source (section "Add an API trigger"). Related: https://latestn.com/tool/claude-code/agents-and-automation/add-command-or-tool-mod How do I add a command or tool to a Claude Code mod using the mods API? https://latestn.com/tool/claude-code/agents-and-automation/add-hooks-to-plugin How do I add hooks to a Claude Code plugin and when do plugin hooks fire? https://latestn.com/tool/claude-code/agents-and-automation/add-skill-to-plugin How do I add a skill to a Claude Code plugin? https://latestn.com/tool/claude-code/admin-and-enterprise/verify-session-token-from-service How do I verify the CLAUDE_CODE_SESSION_ACCESS_TOKEN JWT from my own service in a self-hosted Claude Code environment? https://latestn.com/tool/claude-code/admin-and-enterprise/view-code-review-usage Where can I view Claude Code Review usage for my organization? https://latestn.com/tool/claude-code/admin-and-enterprise/wsl-managed-devices How do I use Claude Code Desktop in WSL on a managed device? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:24:30Z | changed | save requirement: — → You don't need to click **Save changes** | [1] 2026-11-20T12:24:30Z | changed | activation: — → The API trigger takes effect as soon as you generate the token. | [1] 2026-11-20T12:24:30Z | changed | token display: — → The token is shown once and can't be retrieved later | [1] 2026-11-20T12:24:30Z | changed | when it takes effect: The API trigger takes effect as soon as you generate the token. → — | [1] 2026-11-20T12:24:30Z | changed | token visibility: The token is shown once and can't be retrieved later → — | [1] 2026-11-20T12:24:30Z | changed | token generation: Click **Generate token** → — | [1] 2026-11-20T12:24:30Z | changed | where to add: on the web → Add an API trigger on the web | [1] 2026-11-13T03:05:31Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/add-api-trigger/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/agents-and-automation/add-api-trigger POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/add-api-trigger with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/add-api-trigger?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I add an API trigger to a Claude Code scheduled task? Revision 2, last verified 2026-11-20T12:24:30Z. https://latestn.com/tool/claude-code/agents-and-automation/add-api-trigger (accessed 2026-11-21T09:59:57Z). @misc{LatestN_tool_claude_code_agents_and_automation_add_api_trigger_r2, title = {How do I add an API trigger to a Claude Code scheduled task?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/add-api-trigger}}, note = {Revision 2; digest sha256:f9ef2f4ef6e93d33; last verified 2026-11-20T12:24:30Z; accessed 2026-11-21T09:59:57Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/agents-and-automation/add-api-trigger