---
title: "Get an AI Routine"
method: GET
path: "/v1/ai/routines/{routineId}"
tags: ["AI Routines"]
---

# Get an AI Routine

`GET /v1/ai/routines/{routineId}`

## Request

- Base URL: `https://blobsrus.omniapp.co/api`
- URL: `https://blobsrus.omniapp.co/api/v1/ai/routines/{routineId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Retrieve details for a specific AI Routine by ID, including its persisted condition query and the status of its most recent completed run.

## Path parameters

- `routineId` string, uuid, required

## Query parameters

- `userId` string, uuid

## Response `200`

Routine details

- Routine
  - `branchId` string, uuid, nullable, required: Branch of the shared model the prompt runs against, or null.
  - `condition` RoutineCondition, nullable, required: The delivery condition. Null for a routine that delivers on every scheduled run.
    - `conditionPrompt` string, nullable, required: The routine's delivery condition, in plain language.
    - `conditionType` 'RESULTS_CHANGED' | 'RESULTS_UNCHANGED' | 'RESULTS_PRESENT' | 'RESULTS_MISSING', required: How Omni evaluates the condition: - `RESULTS_PRESENT` - Delivers when the condition query returns rows - `RESULTS_MISSING` - Condition query doesn't return rows - `RESULTS_CHANGED` - Condition query's results differ from the previous scheduled run - `RESULTS_UNCHANGED` - Condition query's results are unchanged from the previous scheduled run
  - `createdAt` string, required: ISO 8601 timestamp when the routine was created.
  - `description` string, nullable, required: Display-only notes about the routine, or null.
  - `destination` union, required: Single delivery destination for the routine.
    - RoutineEmailDestinationResponse: Email delivery configuration for the routine, as stored.
      - `recipientEmails` string[], required: Email addresses that receive each scheduled run of the routine.
      - `type` 'email', required: Selects email delivery — each scheduled run is sent to the listed email recipients and user groups.
      - `userGroupIds` string[], required: User group IDs whose active members receive each scheduled run. Omni expands each group to the members' current email addresses when the routine runs.
    - RoutineSlackDestinationResponse: Slack delivery configuration for the routine, as stored.
      - `channelIds` string[], required: The Slack channel that receives each scheduled run. Empty when the routine delivers to a user.
      - `recipientId` string, required
      - `slackRecipientType` 'channel' | 'users', required: **Deprecated**. `channelIds` being non-empty means a channel. Whether `recipientId` is a Slack channel or a user (delivered as a direct message).
      - `type` 'slack', required: Selects Slack delivery — each scheduled run is posted to one Slack channel or sent as a direct message to one user.
      - `userIds` string[], required: The Slack user that receives each scheduled run as a direct message. Empty when the routine delivers to a channel.
    - RoutineWebhookDestination: Webhook delivery configuration for the routine. Each scheduled run posts `{name, markdown, url}` as `application/json` to `url`, where `url` links to the run's conversation in Omni and is left out of the payload for organizations that white-label deliveries.
      - `type` 'webhook', required: Selects webhook delivery.
      - `url` string, required: The webhook URL to deliver the content to. Must be a public HTTPS URL: IP addresses in private, loopback, link-local or reserved ranges, and `.internal`, `.local` or `.localhost` hosts, are rejected.
  - `disabled` boolean, required: Whether the owner has paused the routine.
  - `id` string, uuid, required: The unique identifier of the routine.
  - `lastRun` RoutineLastRun, nullable, required: Most recent completed run, or null if the routine has never completed a run.
    - `completedAt` string, nullable, required: ISO 8601 timestamp the last completed run finished.
    - `label` string, required: User-visible status of the last completed run.
    - `state` string, required: Machine-readable status of the last completed run.
  - `modelId` string, uuid, required: The shared model the prompt runs against.
  - `name` string, required: Customer-visible name of the routine. Used as the email subject for email destinations, shown on Slack deliveries, and sent as `name` in webhook payloads.
  - `prompt` string, required: Natural language prompt Omni runs on each scheduled run.
  - `recipientCount` integer, required: Number of distinct deliverable recipients. For email, user groups are expanded to members and duplicates removed; for Slack, the channel or the listed users. A webhook destination always counts as 1.
  - `schedule` string, required: Six-field cron expression (minute, hour, day-of-month, month, day-of-week, year; use `?` for an unspecified day field).
  - `systemDisabled` boolean, required: Whether Omni disabled the routine because it could no longer run successfully or safely.
  - `systemDisabledReason` string, nullable, required: Reason Omni disabled the routine, or null.
  - `timezone` string, required: IANA timezone identifier used to evaluate the schedule.
  - `topicName` string, nullable, required: Topic scoping query generation, or null.
  - `updatedAt` string, required: ISO 8601 timestamp when the routine was last updated.

## Other responses

- `400`: Invalid routine ID.
- `401`: Missing or invalid API key.
- `403`: AI routines or AI query generation are not enabled for the organization, the acting user lacks routines access (the Use routines role permission) on every model, or a user-scoped API key tried to access another user's routine.
- `404`: Routine not found
- `429`: Too Many Requests - Rate limit exceeded (60 requests/minute)
- `500`: Internal Server Error

## Changes

- **2026-11-03** `43290040f88f`: 2 breaking, 7 warning, 10 info
  - added the new path request parameter `routineId`
  - added `#/components/schemas/RoutineEmailDestinationResponse, #/components/schemas/RoutineSlackDestinationResponse, #/components/schemas/RoutineWebhookDestination` to the `destination` response property `oneOf` list for the response status `200`
  - deleted the `path` request parameter `id`
  - removed the optional property `error` from the response with the `401` status
  - …15 more

[Operation history](https://skmtc.dev/omni/apis/omni-api/changes/v1/ai/routines/:routineId/get.md)

---

[API](https://skmtc.dev/omni/apis/omni-api.md) - [All operations](https://skmtc.dev/omni/apis/omni-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omni/apis/omni-api/revisions/43290040f88f?raw)
