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. The membership ID of the user to act as.

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, shown on Slack deliveries, and sent as name in webhook payloads.

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. 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"

agentId
string<uuid>

Optional agent the routine runs through, by the agent's ID (the ID in the agent's URL in Omni). Must be an agent the routine owner can run, in an organization with agents enabled for that owner; otherwise the request returns 403 (agents not enabled) or 404 (no such agent for the owner).

Can't be sent together with condition. Can't be set on a routine that is, or would be, personalized for each recipient.

Omit to run as the organization's main AI agent.

Example:

"0b1f6c1e-2d3a-4f5b-8c7d-9e0a1b2c3d4e"

llm
object

The LLM the routine runs on. Must be an approved LLM in AI Hub > General > LLM settings that the routine owner has access to. Use the List available LLMs endpoint to retrieve a list of available LLMs.

Omit or pass null to use the organization default.

Example:
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 if the request supplied one.