AI Routines

List routine summaries for the calling user. A conditional routine includes its condition text and type; retrieve the individual routine to inspect its persisted semantic query. Results are newest first by default; pass sortField=name with sortDirection=asc or desc to sort by name. Includes routines paused by the owner or disabled by Omni, but excludes deleted routines. Use pageInfo.nextCursor from one response as the cursor query parameter on the next request. Organization API keys can pass ?userId=<userId> to list routines for a specific organization member.

get/api/v1/ai/routines

Request

  • Base URL
    https://omniapp.co (the document declares no server; this is the origin it was published from)
  • URL
    https://omniapp.co/api/v1/ai/routines
  • Auth
    HTTP bearer

Query parameters

cursorstring

Cursor for pagination (from previous response nextCursor)

Example:eyJpZCI6IjEyMzQ1In0
pageSizeinteger

Number of results per page (1-100, integer)

Example:20
sortDirection'asc' | 'desc'

Sort direction for results

Example:desc
sortFieldstring

Field to sort results by

userIdstring uuid

Target user ID (for org-scoped API keys)

Response

Paginated list of routines.

Example response

{
  "records": [
    {
      "condition": {
        "conditionPrompt": "there are failed orders",
        "conditionType": "RESULTS_PRESENT"
      },
      "destination": {
        "recipientEmails": [
          "alice@example.com",
          "bob@example.com"
        ],
        "type": "email",
        "userGroupIds": [
          "X9kQ2mPz"
        ]
      },
      "lastRun": {
        "label": "Delivered",
        "state": "COMPLETE"
      }
    }
  ]
}

Changes

    • breaking

      added to the // response property oneOf list for the response status

    • info

      added webhook discriminator mapping keys to the // response property for the response status

    • breaking

      the //////// response's property format changed from uuid to no format for status