Skip to main content
POST

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Query Parameters

userId
string<uuid>

Organization API key required. Target user membership ID.

Body

application/json
modelId
string<uuid>
required

The UUID of the model the prompt runs against. Must be a shared model, or a shared-extension model usable as a workbook base.

Example:

"770e8400-e29b-41d4-a716-446655440002"

name
string
required

Customer-visible name of the routine. Used as the email subject for email destinations, and shown on Slack deliveries.

Required string length: 1 - 512
Example:

"Weekly user signups"

prompt
string
required

Natural language prompt Omni runs on each scheduled run. Run a skill as part of the routine by including a skill's /identifier, which will resolve as the routine owner when the routine fires.

Minimum string length: 1
Example:

"How many users signed up last week?"

schedule
string
required

Six-field cron expression (minute, hour, day-of-month, month, day-of-week, year; use ? for an unspecified day field).

Minimum frequency is once per hour; contact Omni support if you need more frequent scheduling.

Minimum string length: 1
Example:

"0 9 ? * MON *"

timezone
string
required

IANA timezone identifier used to evaluate the schedule.

Example:

"America/New_York"

destination
object
required

Single delivery destination for the routine — email or Slack. To send results to multiple destinations, create one routine per destination.

branchId
string<uuid> | null

Branch of the shared model the prompt runs against, or null.

description
string

Optional human-readable notes about the routine. Display-only — never used as model input.

Maximum string length: 2000
Example:

"Weekly signups summary for the growth team."

topicName
string

Topic name to scope query generation. If omitted, the AI picks the best topic.

Maximum string length: 256
Example:

"users"

condition
object

Delivers only when this condition is met. Omni authors and verifies a semantic query from the condition text before creating the routine.

Omit for a routine that delivers on every scheduled run.

Response

Routine created successfully

id
string<uuid>
required

The unique identifier for the newly created routine.

Example:

"880e8400-e29b-41d4-a716-446655440003"

condition
object

The generated condition, present only when the request supplied one.