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

# Execute action batch

> Execute an orchestration action as a batch



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /orchestration/actions/execute-batch
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /orchestration/actions/execute-batch:
    post:
      tags:
        - Orchestration - Actions
      summary: Execute action batch
      description: Execute an orchestration action as a batch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  allOf:
                    - type: object
                      properties:
                        config:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties: {}
                        retry:
                          type: object
                          properties:
                            maximumAttempts:
                              type: number
                            initialInterval:
                              type: number
                            backoffCoefficient:
                              type: number
                      required:
                        - config
                    - anyOf:
                        - type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - native
                            actionSlug:
                              type: string
                          required:
                            - kind
                            - actionSlug
                        - type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - connector
                            connectorUuid:
                              type: string
                            integrationSlug:
                              type: string
                            actionSlug:
                              type: string
                          required:
                            - kind
                            - integrationSlug
                            - actionSlug
                        - type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - tool
                            toolUuid:
                              type: string
                            templateSlug:
                              type: string
                            releaseUuid:
                              type: string
                            waitUntilFinished:
                              type: boolean
                          required:
                            - kind
                        - type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - agent
                            agentUuid:
                              type: string
                            templateSlug:
                              type: string
                            releaseUuid:
                              type: string
                            waitUntilFinished:
                              type: boolean
                          required:
                            - kind
                  title: Action
                  description: Action to execute.
                records:
                  type: array
                  items:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  title: Records
                  description: Records to process.
                webhookUrl:
                  title: Webhook URL
                  description: URL to call when the batch completes.
                  type: string
                  format: uri
                webhookSecret:
                  title: Webhook secret
                  description: >-
                    Secret used to sign webhook deliveries. When provided, Cargo
                    includes an X-Cargo-Signature header (sha256=<hex-hmac>) so
                    you can verify the payload.
                  type: string
              required:
                - action
                - records
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  batch:
                    type: object
                    properties:
                      uuid:
                        type: string
                      workspaceUuid:
                        type: string
                      workflowUuid:
                        type: string
                      userUuid:
                        anyOf:
                          - type: string
                          - type: 'null'
                      releaseUuid:
                        anyOf:
                          - type: string
                          - type: 'null'
                      nodes:
                        anyOf:
                          - type: array
                            items:
                              allOf:
                                - type: object
                                  properties:
                                    uuid:
                                      type: string
                                      format: uuid
                                      pattern: >-
                                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                                    slug:
                                      type: string
                                      pattern: ^\w+$
                                    name:
                                      type: string
                                    config:
                                      type: object
                                      propertyNames:
                                        type: string
                                      additionalProperties: {}
                                    description:
                                      type: string
                                    retry:
                                      type: object
                                      properties:
                                        maximumAttempts:
                                          type: number
                                        initialInterval:
                                          type: number
                                        backoffCoefficient:
                                          type: number
                                      additionalProperties: false
                                    childrenUuids:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    fallbackChildUuid:
                                      type: string
                                    fallbackOnFailure:
                                      type: boolean
                                    position:
                                      type: object
                                      properties:
                                        x:
                                          type: number
                                        'y':
                                          type: number
                                      required:
                                        - x
                                        - 'y'
                                      additionalProperties: false
                                  required:
                                    - uuid
                                    - slug
                                    - config
                                    - childrenUuids
                                    - fallbackOnFailure
                                    - position
                                  additionalProperties: false
                                - anyOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - native
                                        actionSlug:
                                          type: string
                                      required:
                                        - kind
                                        - actionSlug
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - connector
                                        connectorUuid:
                                          type: string
                                        integrationSlug:
                                          type: string
                                        actionSlug:
                                          type: string
                                      required:
                                        - kind
                                        - integrationSlug
                                        - actionSlug
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - tool
                                        toolUuid:
                                          type: string
                                        templateSlug:
                                          type: string
                                        releaseUuid:
                                          type: string
                                        waitUntilFinished:
                                          type: boolean
                                      required:
                                        - kind
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - agent
                                        agentUuid:
                                          type: string
                                        templateSlug:
                                          type: string
                                        releaseUuid:
                                          type: string
                                        waitUntilFinished:
                                          type: boolean
                                      required:
                                        - kind
                                      additionalProperties: false
                          - type: 'null'
                      temporalWorkflowId:
                        type: string
                      traceUuid:
                        anyOf:
                          - type: string
                          - type: 'null'
                      data:
                        anyOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: segment
                              segmentUuid:
                                type: string
                            required:
                              - kind
                              - segmentUuid
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: change
                              changeUuid:
                                type: string
                              changeKinds:
                                type: array
                                items:
                                  type: string
                              segmentUuid:
                                type: string
                            required:
                              - kind
                              - changeUuid
                              - changeKinds
                              - segmentUuid
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: filter
                              modelUuid:
                                type: string
                              filter: {}
                              sort: {}
                              limit:
                                type: number
                            required:
                              - kind
                              - modelUuid
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: recordIds
                              modelUuid:
                                type: string
                              ids:
                                type: array
                                items:
                                  type: string
                            required:
                              - kind
                              - modelUuid
                              - ids
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: watchedRecords
                              modelUuid:
                                type: string
                              filter: {}
                              changeKinds:
                                type: array
                                items:
                                  type: string
                              s3Filename:
                                type: string
                              meta:
                                type: object
                                propertyNames:
                                  type: string
                                additionalProperties: {}
                            required:
                              - kind
                              - modelUuid
                              - changeKinds
                              - s3Filename
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: records
                              s3Filename:
                                type: string
                            required:
                              - kind
                              - s3Filename
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: file
                              s3Filename:
                                type: string
                              mappings:
                                type: object
                                propertyNames:
                                  type: string
                                additionalProperties:
                                  type: string
                            required:
                              - kind
                              - s3Filename
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: runs
                              filter: {}
                              reset: {}
                            required:
                              - kind
                              - filter
                              - reset
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: group
                              s3Filename:
                                type: string
                              parentBatchUuid:
                                type: string
                              parentRunUuid:
                                type: string
                              parentNodeUuid:
                                type: string
                            required:
                              - kind
                              - s3Filename
                              - parentRunUuid
                              - parentNodeUuid
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: schedule
                              modelUuid:
                                type: string
                              segmentUuid:
                                type: string
                              changeKinds:
                                type: array
                                items:
                                  type: string
                              changeUuid:
                                type: string
                              skip:
                                type: boolean
                              totalRecordsCount:
                                type: number
                              updatedRecordsCount:
                                type: number
                              removedRecordsCount:
                                type: number
                              addedRecordsCount:
                                type: number
                              unchangedRecordsCount:
                                type: number
                            required:
                              - kind
                              - modelUuid
                              - segmentUuid
                              - changeKinds
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: form
                              s3Filename:
                                type: string
                              webhookUrl:
                                type: string
                              parentRunUuid:
                                type: string
                              parentNodeUuid:
                                type: string
                              parentBatchUuid:
                                type: string
                              parentAgentUuid:
                                type: string
                              parentChatUuid:
                                type: string
                              parentMessageUuid:
                                type: string
                            required:
                              - kind
                              - s3Filename
                            additionalProperties: false
                      errorMessage:
                        anyOf:
                          - type: string
                          - type: 'null'
                      status:
                        type: string
                        enum:
                          - pending
                          - syncing
                          - skipped
                          - querying
                          - running
                          - success
                          - error
                          - cancelling
                          - cancelled
                      runsStatus:
                        anyOf:
                          - type: string
                            enum:
                              - healthy
                              - unhealthy
                          - type: 'null'
                      runsCount:
                        type: number
                      executedRunsCount:
                        type: number
                      failedRunsCount:
                        type: number
                      creditsUsedCount:
                        type: number
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      finishedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - uuid
                      - workspaceUuid
                      - workflowUuid
                      - userUuid
                      - releaseUuid
                      - nodes
                      - temporalWorkflowId
                      - traceUuid
                      - data
                      - errorMessage
                      - status
                      - runsStatus
                      - runsCount
                      - executedRunsCount
                      - failedRunsCount
                      - creditsUsedCount
                      - createdAt
                      - updatedAt
                      - finishedAt
                    additionalProperties: false
                    title: Batch
                    description: Created batch details.
                required:
                  - batch
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````