v1

latestOpenAPI 3.1.02026-07-2618690613.4 KB
AI Routines

Create an AI Routine

Create a new AI Routine that will run on the specified schedule.

Each scheduled run executes once using the routine owner's permissions, and every recipient receives the same result.

post/v1/ai/routines

Query parameters

userIdstring uuid

Requires an Organization API key. Target user membership ID.

Request body

branchIdstring uuid nullable

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

descriptionstring nullable

Display-only notes about the routine, or null.

modelIdstring uuid required

The shared model the prompt runs against.

namestring required

Customer-visible name of the routine, used as the email subject.

promptstring required

Natural language prompt Omni runs on each scheduled run.

schedulestring required

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

timezonestring required

IANA timezone identifier used to evaluate the schedule.

topicNamestring nullable

Topic scoping query generation, or null.

Example request

{
  "destination": {
    "recipientEmails": [
      "blob.ross@blobsrus.com",
      "blob.the.builder@blobsrus.com"
    ],
    "type": "email",
    "userGroupIds": [
      "550e8400-e29b-41d4-a716-446655440000"
    ]
  }
}

Response

Routine created successfully

idstring uuid

The unique identifier for the newly created routine.

Example response

{
  "id": "880e8400-e29b-41d4-a716-446655440003"
}