---
title: "Trigger AI Routine"
method: POST
path: "/v1/ai/routines/{routineId}/trigger"
tags: ["AI Routines"]
---

# Trigger AI Routine

`POST /v1/ai/routines/{routineId}/trigger`

Run an existing routine immediately, in addition to its schedule — e.g. to get an off-cycle result or verify a routine produces the email you expect.

Executes once using the routine owner's permissions and delivers the AI response to every recipient configured on the routine. Returns as soon as the run has started; the result arrives asynchronously via the routine's normal email delivery.

If a run is already in progress, the endpoint returns `409` rather than starting a second one. Manual runs that hit broken configuration will return `400` but not pause the schedule.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `userId` string, uuid

## Response `202`

The run has started.

- object
  - `id` string, uuid, required — The ID of the run (scheduled job) that was started.

## Other responses

- `400` — Bad request. Possible causes: - Invalid routine ID - Routine cannot run as configured (e.g. its model, branch, or owner is no longer accessible)
- `401` — Missing or invalid API key.
- `403` — AI routines or AI query generation are not enabled for the organization, or a user-scoped API key tried to run another user's routine.
- `404` — The routine does not exist or cannot be triggered (deleted, paused, or disabled by Omni).
- `409` — A run is already in progress for this routine.

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/revisions/6b02f7349d0e/schema)
