Skip to main content
POST
Create an AI Routine

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>

Requires an Organization API key. Target user membership ID.

Body

application/json
destination
object
required

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

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.

prompt
string
required

Natural language prompt Omni runs on each scheduled run.

schedule
string
required

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

timezone
string
required

IANA timezone identifier used to evaluate the schedule.

branchId
string<uuid> | null

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

description
string | null

Display-only notes about the routine, or null.

topicName
string | null

Topic scoping query generation, or null.

Response

Routine created successfully

id
string<uuid>

The unique identifier for the newly created routine.

Example:

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