> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnicommerce.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage a Bot's routines

> Requires agents:invoke and assistant.use. Use a signed-in member session or a member's CLI token. Organization OAuth and Computer credentials cannot access personal Bots.

Create, edit, link, pause, resume, delete, test, or run a batch of routines. New personal routines start paused. Reuse the same requestId only when retrying the same request. Inspect every ordered result before retrying failed targets.



## OpenAPI

````yaml /openapi.json post /api/v1/bots/{botId}/routines
openapi: 3.1.0
info:
  title: OmniCommerce API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://omnicommerce.sg/terms
  description: >-
    OmniCommerce API surface for agents and developer integrations. Includes
    public endpoints (merchant discovery, product search, compare, catalog, ACO
    retrieval) and authenticated endpoints (product management via API key
    Bearer tokens).
servers:
  - url: https://omnicommerce.ai
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: ads
    description: ads
    x-group: Ads
  - name: agentic-checkout
    description: Merchant-fulfilled agentic checkout
    x-group: Agentic Checkout
  - name: agents
    description: agents
    x-group: Agents
  - name: analytics
    description: Sales performance across marketplaces
    x-group: Analytics
  - name: aops
    description: Agent operating procedures
    x-group: AOPs
  - name: bots
    description: bots
    x-group: Bots
  - name: branding
    description: branding
    x-group: Branding
  - name: campaigns
    description: Campaign briefs, offer windows, and marketplace runs
    x-group: Campaigns
  - name: catalog
    description: catalog
    x-group: Catalog
  - name: commerce
    description: commerce
    x-group: Commerce
  - name: developer-platform
    description: Authenticated developer platform APIs
    x-group: Developer Platform
  - name: documents
    description: Knowledge base document uploads
    x-group: Knowledge Base
  - name: email
    description: email
    x-group: Email
  - name: follow-ups
    description: follow-ups
    x-group: Follow Ups
  - name: inventory
    description: Inventory quantities, planning signals, and marketplace listing absence
    x-group: Inventory
  - name: looks
    description: AI-styled product looks
    x-group: Looks
  - name: oauth
    description: OAuth token endpoints
    x-group: OAuth
  - name: orders
    description: Workspace and agentic orders
    x-group: Orders
  - name: organizations
    description: Organization management
    x-group: Organizations
  - name: price-books
    description: Marketplace list-price markup rules
    x-group: Price Books
  - name: products
    description: Product CRUD, bulk import, enrichment, publish, and delist
    x-group: Products
  - name: promotions
    description: Central promotions and marketplace sync
    x-group: Promotions
  - name: public-agent
    description: Public agent discovery and catalog APIs
    x-group: Public Agent
  - name: returns
    description: returns
    x-group: Returns
  - name: review-queue
    description: review-queue
    x-group: Review Queue
  - name: reviews
    description: Marketplace product reviews and seller replies
    x-group: Reviews
  - name: scripts
    description: scripts
    x-group: Scripts
  - name: settlements
    description: settlements
    x-group: Settlements
  - name: ucp
    description: Universal Commerce Protocol
    x-group: UCP
  - name: wiki
    description: wiki
    x-group: Wiki
paths:
  /api/v1/bots/{botId}/routines:
    post:
      tags:
        - bots
      summary: Manage a Bot's routines
      description: >-
        Requires agents:invoke and assistant.use. Use a signed-in member session
        or a member's CLI token. Organization OAuth and Computer credentials
        cannot access personal Bots.


        Create, edit, link, pause, resume, delete, test, or run a batch of
        routines. New personal routines start paused. Reuse the same requestId
        only when retrying the same request. Inspect every ordered result before
        retrying failed targets.
      operationId: post_v1_bots_by_botid_routines
      parameters:
        - name: botId
          in: path
          required: true
          schema:
            type: string
        - name: organizationId
          in: query
          required: false
          description: >-
            Required with session authentication. Otherwise use the
            authenticated organization.
          schema:
            type: string
            maxLength: 120
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                requestId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                mutation:
                  oneOf:
                    - type: object
                      properties:
                        routines:
                          minItems: 1
                          maxItems: 20
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                minLength: 1
                                maxLength: 120
                              instruction:
                                type: string
                                minLength: 1
                                maxLength: 20000
                                description: >-
                                  The agreed job, sources/targets, expected
                                  output, approval boundary and missing-source
                                  behavior.
                              triggers:
                                maxItems: 10
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          const: schedule
                                        expression:
                                          type: string
                                          minLength: 1
                                          maxLength: 120
                                          description: >-
                                            Five-field cron, e.g. 0 9 * * * for
                                            daily at 09:00.
                                        timezone:
                                          type: string
                                          minLength: 1
                                          maxLength: 80
                                          description: >-
                                            Confirmed IANA time zone, e.g.
                                            Asia/Singapore.
                                        id:
                                          type: string
                                          minLength: 1
                                          maxLength: 160
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                          maxLength: 140
                                      required:
                                        - type
                                        - expression
                                        - timezone
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                          maxLength: 160
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                          maxLength: 140
                                        type:
                                          type: string
                                          const: event
                                        eventType:
                                          type: string
                                          enum:
                                            - telegram.message.received
                                            - customer.message.received
                                            - product.created
                                            - product.updated
                                            - product.deleted
                                            - product.delisted
                                            - product.price.changed
                                            - product.inventory.changed
                                            - product.enrichment.started
                                            - product.enrichment.completed
                                            - product.listing.error
                                            - product.listing.recovery
                                            - product.geo.created
                                            - product.geo.updated
                                            - product.ai_visibility.measured
                                            - agent.action.approved
                                            - order.created
                                            - order.updated
                                            - order.deleted
                                            - order.status.changed
                                            - look.created
                                            - look.deleted
                                            - review.created
                                            - review.updated
                                            - review.status.changed
                                            - campaign.started
                                            - campaign.window.started
                                            - campaign.window.completed
                                            - campaign.window.failed
                                            - campaign.offer.failed
                                            - campaign.completed
                                            - promotion.usage.updated
                                            - promotion.delivery.updated
                                            - promotion.monitoring.updated
                                            - ad.delivery.updated
                                            - ad.performance.updated
                                            - ad.balance.updated
                                            - ad.sync.updated
                                            - account_statement.created
                                            - account_statement.updated
                                            - account_statement.status.changed
                                            - account_statement.reconciliation.changed
                                            - account_statement.transactions.synced
                                            - account_statement.transactions.failed
                                            - account_statement.sync.queued
                                            - account_statement.sync.started
                                            - account_statement.sync.completed
                                            - account_statement.sync.failed
                                            - account_statement.sync.unavailable
                                            - slack.reaction.added
                                            - user_teams.channel_message.posted
                                            - user_teams.chat_message.received
                                            - user_teams.mention.received
                                            - user_teams.thread_reply.received
                                        conditions:
                                          default: ''
                                          type: string
                                          maxLength: 4000
                                        collaborationSource:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              minLength: 1
                                              maxLength: 160
                                            reaction:
                                              type: string
                                              maxLength: 100
                                            channelId:
                                              type: string
                                              maxLength: 160
                                            senderId:
                                              type: string
                                              maxLength: 160
                                            keywords:
                                              maxItems: 20
                                              type: array
                                              items:
                                                type: string
                                                maxLength: 160
                                            includeOwn:
                                              type: boolean
                                          required:
                                            - id
                                          additionalProperties: false
                                      required:
                                        - type
                                        - eventType
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                          maxLength: 160
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                          maxLength: 140
                                        type:
                                          type: string
                                          const: email
                                        mode:
                                          type: string
                                          const: connected
                                        connectionIds:
                                          minItems: 1
                                          maxItems: 10
                                          type: array
                                          items:
                                            type: string
                                            minLength: 1
                                            maxLength: 160
                                        direction:
                                          type: string
                                          enum:
                                            - received
                                            - sent
                                            - both
                                        subjectContains:
                                          maxItems: 20
                                          type: array
                                          items:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                        fromAddress:
                                          type: string
                                          format: email
                                          pattern: >-
                                            ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                                      required:
                                        - type
                                        - mode
                                        - connectionIds
                                      additionalProperties: false
                                description: >-
                                  Choose up to ten triggers. Use an empty list
                                  for work run on demand.
                            required:
                              - name
                              - instruction
                              - triggers
                            additionalProperties: false
                        action:
                          type: string
                          const: create
                      required:
                        - routines
                        - action
                      additionalProperties: false
                    - type: object
                      properties:
                        routines:
                          minItems: 1
                          maxItems: 20
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                minLength: 1
                                maxLength: 120
                              instruction:
                                type: string
                                minLength: 1
                                maxLength: 20000
                                description: >-
                                  The agreed job, sources/targets, expected
                                  output, approval boundary and missing-source
                                  behavior.
                              triggers:
                                maxItems: 10
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          const: schedule
                                        expression:
                                          type: string
                                          minLength: 1
                                          maxLength: 120
                                          description: >-
                                            Five-field cron, e.g. 0 9 * * * for
                                            daily at 09:00.
                                        timezone:
                                          type: string
                                          minLength: 1
                                          maxLength: 80
                                          description: >-
                                            Confirmed IANA time zone, e.g.
                                            Asia/Singapore.
                                        id:
                                          type: string
                                          minLength: 1
                                          maxLength: 160
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                          maxLength: 140
                                      required:
                                        - type
                                        - expression
                                        - timezone
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                          maxLength: 160
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                          maxLength: 140
                                        type:
                                          type: string
                                          const: event
                                        eventType:
                                          type: string
                                          enum:
                                            - telegram.message.received
                                            - customer.message.received
                                            - product.created
                                            - product.updated
                                            - product.deleted
                                            - product.delisted
                                            - product.price.changed
                                            - product.inventory.changed
                                            - product.enrichment.started
                                            - product.enrichment.completed
                                            - product.listing.error
                                            - product.listing.recovery
                                            - product.geo.created
                                            - product.geo.updated
                                            - product.ai_visibility.measured
                                            - agent.action.approved
                                            - order.created
                                            - order.updated
                                            - order.deleted
                                            - order.status.changed
                                            - look.created
                                            - look.deleted
                                            - review.created
                                            - review.updated
                                            - review.status.changed
                                            - campaign.started
                                            - campaign.window.started
                                            - campaign.window.completed
                                            - campaign.window.failed
                                            - campaign.offer.failed
                                            - campaign.completed
                                            - promotion.usage.updated
                                            - promotion.delivery.updated
                                            - promotion.monitoring.updated
                                            - ad.delivery.updated
                                            - ad.performance.updated
                                            - ad.balance.updated
                                            - ad.sync.updated
                                            - account_statement.created
                                            - account_statement.updated
                                            - account_statement.status.changed
                                            - account_statement.reconciliation.changed
                                            - account_statement.transactions.synced
                                            - account_statement.transactions.failed
                                            - account_statement.sync.queued
                                            - account_statement.sync.started
                                            - account_statement.sync.completed
                                            - account_statement.sync.failed
                                            - account_statement.sync.unavailable
                                            - slack.reaction.added
                                            - user_teams.channel_message.posted
                                            - user_teams.chat_message.received
                                            - user_teams.mention.received
                                            - user_teams.thread_reply.received
                                        conditions:
                                          default: ''
                                          type: string
                                          maxLength: 4000
                                        collaborationSource:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              minLength: 1
                                              maxLength: 160
                                            reaction:
                                              type: string
                                              maxLength: 100
                                            channelId:
                                              type: string
                                              maxLength: 160
                                            senderId:
                                              type: string
                                              maxLength: 160
                                            keywords:
                                              maxItems: 20
                                              type: array
                                              items:
                                                type: string
                                                maxLength: 160
                                            includeOwn:
                                              type: boolean
                                          required:
                                            - id
                                          additionalProperties: false
                                      required:
                                        - type
                                        - eventType
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                          maxLength: 160
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                          maxLength: 140
                                        type:
                                          type: string
                                          const: email
                                        mode:
                                          type: string
                                          const: connected
                                        connectionIds:
                                          minItems: 1
                                          maxItems: 10
                                          type: array
                                          items:
                                            type: string
                                            minLength: 1
                                            maxLength: 160
                                        direction:
                                          type: string
                                          enum:
                                            - received
                                            - sent
                                            - both
                                        subjectContains:
                                          maxItems: 20
                                          type: array
                                          items:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                        fromAddress:
                                          type: string
                                          format: email
                                          pattern: >-
                                            ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                                      required:
                                        - type
                                        - mode
                                        - connectionIds
                                      additionalProperties: false
                                description: >-
                                  Choose up to ten triggers. Use an empty list
                                  for work run on demand.
                              enabledTools:
                                maxItems: 256
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 200
                                description: >-
                                  Minimum tool names from
                                  list_available_toolkits needed for this job.
                                  Use an empty array when the supplied
                                  event/context is sufficient.
                              enabledToolkits:
                                maxItems: 256
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 200
                                description: >-
                                  Toolkit IDs from list_available_toolkits
                                  needed as a whole. Prefer individual tools
                                  when sufficient. Use an empty array otherwise.
                            required:
                              - name
                              - instruction
                              - triggers
                              - enabledTools
                              - enabledToolkits
                            additionalProperties: false
                        action:
                          type: string
                          const: create_linked
                      required:
                        - routines
                        - action
                      additionalProperties: false
                    - type: object
                      properties:
                        updates:
                          minItems: 1
                          maxItems: 20
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                minLength: 1
                                maxLength: 120
                              instruction:
                                type: string
                                minLength: 1
                                maxLength: 20000
                                description: >-
                                  The agreed job, sources/targets, expected
                                  output, approval boundary and missing-source
                                  behavior.
                              triggers:
                                maxItems: 10
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          const: schedule
                                        expression:
                                          type: string
                                          minLength: 1
                                          maxLength: 120
                                          description: >-
                                            Five-field cron, e.g. 0 9 * * * for
                                            daily at 09:00.
                                        timezone:
                                          type: string
                                          minLength: 1
                                          maxLength: 80
                                          description: >-
                                            Confirmed IANA time zone, e.g.
                                            Asia/Singapore.
                                        id:
                                          type: string
                                          minLength: 1
                                          maxLength: 160
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                          maxLength: 140
                                      required:
                                        - type
                                        - expression
                                        - timezone
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                          maxLength: 160
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                          maxLength: 140
                                        type:
                                          type: string
                                          const: event
                                        eventType:
                                          type: string
                                          enum:
                                            - telegram.message.received
                                            - customer.message.received
                                            - product.created
                                            - product.updated
                                            - product.deleted
                                            - product.delisted
                                            - product.price.changed
                                            - product.inventory.changed
                                            - product.enrichment.started
                                            - product.enrichment.completed
                                            - product.listing.error
                                            - product.listing.recovery
                                            - product.geo.created
                                            - product.geo.updated
                                            - product.ai_visibility.measured
                                            - agent.action.approved
                                            - order.created
                                            - order.updated
                                            - order.deleted
                                            - order.status.changed
                                            - look.created
                                            - look.deleted
                                            - review.created
                                            - review.updated
                                            - review.status.changed
                                            - campaign.started
                                            - campaign.window.started
                                            - campaign.window.completed
                                            - campaign.window.failed
                                            - campaign.offer.failed
                                            - campaign.completed
                                            - promotion.usage.updated
                                            - promotion.delivery.updated
                                            - promotion.monitoring.updated
                                            - ad.delivery.updated
                                            - ad.performance.updated
                                            - ad.balance.updated
                                            - ad.sync.updated
                                            - account_statement.created
                                            - account_statement.updated
                                            - account_statement.status.changed
                                            - account_statement.reconciliation.changed
                                            - account_statement.transactions.synced
                                            - account_statement.transactions.failed
                                            - account_statement.sync.queued
                                            - account_statement.sync.started
                                            - account_statement.sync.completed
                                            - account_statement.sync.failed
                                            - account_statement.sync.unavailable
                                            - slack.reaction.added
                                            - user_teams.channel_message.posted
                                            - user_teams.chat_message.received
                                            - user_teams.mention.received
                                            - user_teams.thread_reply.received
                                        conditions:
                                          default: ''
                                          type: string
                                          maxLength: 4000
                                        collaborationSource:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              minLength: 1
                                              maxLength: 160
                                            reaction:
                                              type: string
                                              maxLength: 100
                                            channelId:
                                              type: string
                                              maxLength: 160
                                            senderId:
                                              type: string
                                              maxLength: 160
                                            keywords:
                                              maxItems: 20
                                              type: array
                                              items:
                                                type: string
                                                maxLength: 160
                                            includeOwn:
                                              type: boolean
                                          required:
                                            - id
                                          additionalProperties: false
                                      required:
                                        - type
                                        - eventType
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          minLength: 1
                                          maxLength: 160
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                          maxLength: 140
                                        type:
                                          type: string
                                          const: email
                                        mode:
                                          type: string
                                          const: connected
                                        connectionIds:
                                          minItems: 1
                                          maxItems: 10
                                          type: array
                                          items:
                                            type: string
                                            minLength: 1
                                            maxLength: 160
                                        direction:
                                          type: string
                                          enum:
                                            - received
                                            - sent
                                            - both
                                        subjectContains:
                                          maxItems: 20
                                          type: array
                                          items:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                        fromAddress:
                                          type: string
                                          format: email
                                          pattern: >-
                                            ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                                      required:
                                        - type
                                        - mode
                                        - connectionIds
                                      additionalProperties: false
                                description: >-
                                  Choose up to ten triggers. Use an empty list
                                  for work run on demand.
                              routineId:
                                type: string
                                maxLength: 164
                              version:
                                type: string
                                minLength: 1
                                maxLength: 100
                            required:
                              - routineId
                              - version
                            additionalProperties: false
                        action:
                          type: string
                          const: update
                      required:
                        - updates
                        - action
                      additionalProperties: false
                    - oneOf:
                        - type: object
                          properties:
                            routineIds:
                              minItems: 1
                              maxItems: 20
                              type: array
                              items:
                                type: string
                                maxLength: 164
                            action:
                              type: string
                              enum:
                                - pause
                                - resume
                                - delete
                          required:
                            - routineIds
                            - action
                          additionalProperties: false
                        - type: object
                          properties:
                            routineIds:
                              minItems: 1
                              maxItems: 20
                              type: array
                              items:
                                type: string
                                maxLength: 164
                            action:
                              type: string
                              const: run
                            inputs:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties:
                                type: string
                                maxLength: 16000
                          required:
                            - routineIds
                            - action
                          additionalProperties: false
                        - type: object
                          properties:
                            routineIds:
                              minItems: 1
                              maxItems: 20
                              type: array
                              items:
                                type: string
                                maxLength: 164
                            action:
                              type: string
                              const: preview
                            inputs:
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties:
                                type: string
                                maxLength: 16000
                            sampleEvent:
                              type: object
                              properties:
                                eventType:
                                  type: string
                                  enum:
                                    - telegram.message.received
                                    - customer.message.received
                                    - product.created
                                    - product.updated
                                    - product.deleted
                                    - product.delisted
                                    - product.price.changed
                                    - product.inventory.changed
                                    - product.enrichment.started
                                    - product.enrichment.completed
                                    - product.listing.error
                                    - product.listing.recovery
                                    - product.geo.created
                                    - product.geo.updated
                                    - product.ai_visibility.measured
                                    - agent.action.approved
                                    - order.created
                                    - order.updated
                                    - order.deleted
                                    - order.status.changed
                                    - look.created
                                    - look.deleted
                                    - review.created
                                    - review.updated
                                    - review.status.changed
                                    - campaign.started
                                    - campaign.window.started
                                    - campaign.window.completed
                                    - campaign.window.failed
                                    - campaign.offer.failed
                                    - campaign.completed
                                    - promotion.usage.updated
                                    - promotion.delivery.updated
                                    - promotion.monitoring.updated
                                    - ad.delivery.updated
                                    - ad.performance.updated
                                    - ad.balance.updated
                                    - ad.sync.updated
                                    - account_statement.created
                                    - account_statement.updated
                                    - account_statement.status.changed
                                    - account_statement.reconciliation.changed
                                    - account_statement.transactions.synced
                                    - account_statement.transactions.failed
                                    - account_statement.sync.queued
                                    - account_statement.sync.started
                                    - account_statement.sync.completed
                                    - account_statement.sync.failed
                                    - account_statement.sync.unavailable
                                    - slack.reaction.added
                                    - user_teams.channel_message.posted
                                    - user_teams.chat_message.received
                                    - user_teams.mention.received
                                    - user_teams.thread_reply.received
                                payload:
                                  type: object
                                  propertyNames:
                                    type: string
                                  additionalProperties: true
                              required:
                                - eventType
                                - payload
                              additionalProperties: false
                          required:
                            - routineIds
                            - action
                          additionalProperties: false
                    - type: object
                      properties:
                        action:
                          type: string
                          const: link
                        routineIds:
                          minItems: 1
                          maxItems: 20
                          type: array
                          items:
                            type: string
                            maxLength: 164
                            pattern: ^aop:[a-zA-Z0-9_-]+$
                      required:
                        - action
                        - routineIds
                      additionalProperties: false
              required:
                - requestId
                - mutation
              additionalProperties: false
      responses:
        '200':
          description: Results in request order, including individual failures.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  routineIds:
                    type: array
                    items:
                      type: string
                  succeededCount:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  failedCount:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  results:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            index:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            routineId:
                              type:
                                - string
                                - 'null'
                            success:
                              type: boolean
                              const: true
                            result: {}
                          required:
                            - index
                            - routineId
                            - success
                            - result
                          additionalProperties: false
                        - type: object
                          properties:
                            index:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            routineId:
                              type:
                                - string
                                - 'null'
                            success:
                              type: boolean
                              const: false
                            error:
                              type: string
                          required:
                            - index
                            - routineId
                            - success
                            - error
                          additionalProperties: false
                required:
                  - success
                  - routineIds
                  - succeededCount
                  - failedCount
                  - results
                additionalProperties: false
        '400':
          description: Invalid request or organization mismatch.
        '401':
          description: Authentication required.
        '403':
          description: The caller lacks access to this personal Bot.
        '404':
          description: Bots or the requested run are unavailable.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Bearer API key for server-to-server access. Session auth is also
        supported in first-party UI flows.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.