Create an AI Routine
Create a new AI Routine that runs a saved prompt on a schedule. The response can delivered to a destination like email, Slack, or a webhook; it’s also possible to not deliver the results.
To run a routine when a condition is met, provide a condition in the request body.
Each scheduled run executes once using the routine owner’s permissions, and every recipient receives the same result.
Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Query Parameters
Body
Optional automation agent to run the routine through. Must be an agent the routine owner can run, in an organization with agents enabled for that owner.
Retrieve an agent's ID by opening it in the Omni UI and looking at the URL. The string after /agent/ is the ID.
Can't used with condition or on personalized routines.
Omit to run as the Omni Agent.
"0b1f6c1e-2d3a-4f5b-8c7d-9e0a1b2c3d4e"
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.
At run time, Omni checks the pinned LLM against the owner's LLM audience, or against each recipient's audience for a personalized routine, and falls back to the organization default for whoever it excludes.
Omit or pass null to use the organization default.

