v1

latestOpenAPI 3.1.02026-07-2618690613.4 KB
AI Routines

Update an AI Routine

Update an existing AI Routine. All request fields are optional, and only supplied fields are changed. Supplying destination replaces the full recipient configuration.

put/v1/ai/routines/{routineId}

Path parameters

idstring uuid required

The UUID of the routine.

Query parameters

userIdstring uuid

Requires an Organization API key. Target user membership ID.

Request body

namestring required

Display name for the routine

descriptionstring nullable

Optional description of what the routine does

promptstring required

The AI prompt that will be executed when the routine runs

schedulestring required

Cron expression or human-readable schedule (e.g., "daily", "weekly", "0 9 * * 1")

modelIdstring uuid nullable

Optional model ID to scope the routine to a specific data model

isActiveboolean

Whether the routine is active and will execute on schedule

Response

Routine updated successfully

branchIdstring uuid nullable required

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

createdAtstring required

ISO 8601 timestamp when the routine was created.

descriptionstring nullable required

Display-only notes about the routine, or null.

disabledboolean required

Whether the owner has paused the routine.

idstring uuid required

The unique identifier of the routine.

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.

recipientCountinteger required

Number of distinct deliverable recipients after expanding user groups and removing duplicates.

schedulestring required

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

systemDisabledboolean required

Whether Omni disabled the routine because it could no longer run successfully or safely.

systemDisabledReasonstring nullable required

Reason Omni disabled the routine, or null.

timezonestring required

IANA timezone identifier used to evaluate the schedule.

topicNamestring nullable required

Topic scoping query generation, or null.

updatedAtstring required

ISO 8601 timestamp when the routine was last updated.

Example response

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