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

# Commit Workflow

> Commit a workflow.

This deploys the workflow and updates its version, delegating to the shared
``WorkflowsManagementService.publish_workflow`` so the build/validate/lock/
commit orchestration lives in one place (also used by the MCP publish tool
and the internal publish route).



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json post /workspaces/{workspace_id}/workflows/{workflow_id}/commit
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /workspaces/{workspace_id}/workflows/{workflow_id}/commit:
    post:
      tags:
        - workflows
      summary: Commit Workflow
      description: >-
        Commit a workflow.


        This deploys the workflow and updates its version, delegating to the
        shared

        ``WorkflowsManagementService.publish_workflow`` so the
        build/validate/lock/

        commit orchestration lives in one place (also used by the MCP publish
        tool

        and the internal publish route).
      operationId: workflows-commit_workflow
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
        - name: workflow_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                pattern: wf_[0-9a-zA-Z]+
              - type: string
                pattern: wf-[0-9a-f]{32}
            title: Workflow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowCommitResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    WorkflowCommitResponse:
      properties:
        workflow_id:
          type: string
          pattern: wf_[0-9a-zA-Z]+
          title: Workflow Id
        status:
          type: string
          enum:
            - success
            - failure
          title: Status
        message:
          type: string
          title: Message
        errors:
          anyOf:
            - items:
                $ref: '#/components/schemas/ValidationResult'
              type: array
            - type: 'null'
          title: Errors
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - workflow_id
        - status
        - message
      title: WorkflowCommitResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationResult:
      oneOf:
        - $ref: '#/components/schemas/DSLValidationResult'
        - $ref: '#/components/schemas/SecretValidationResult'
        - $ref: '#/components/schemas/ExprValidationResult'
        - $ref: '#/components/schemas/TemplateActionExprValidationResult'
        - $ref: '#/components/schemas/ActionValidationResult'
      title: ValidationResult
      discriminator:
        propertyName: type
        mapping:
          action:
            $ref: '#/components/schemas/ActionValidationResult'
          action_template:
            $ref: '#/components/schemas/TemplateActionExprValidationResult'
          dsl:
            $ref: '#/components/schemas/DSLValidationResult'
          expression:
            $ref: '#/components/schemas/ExprValidationResult'
          secret:
            $ref: '#/components/schemas/SecretValidationResult'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DSLValidationResult:
      properties:
        type:
          type: string
          const: dsl
          title: Type
          default: dsl
        status:
          type: string
          enum:
            - success
            - error
          title: Status
        msg:
          type: string
          title: Msg
          default: ''
        detail:
          anyOf:
            - items:
                $ref: '#/components/schemas/ValidationDetail'
              type: array
            - type: 'null'
          title: Detail
        ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Ref
      type: object
      required:
        - status
      title: DSLValidationResult
      description: Result of validating a generic input.
    SecretValidationResult:
      properties:
        type:
          type: string
          const: secret
          title: Type
          default: secret
        status:
          type: string
          enum:
            - success
            - error
          title: Status
        msg:
          type: string
          title: Msg
          default: ''
        detail:
          anyOf:
            - $ref: '#/components/schemas/SecretValidationDetail'
            - type: 'null'
        ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Ref
      type: object
      required:
        - status
      title: SecretValidationResult
      description: Result of validating credentials.
    ExprValidationResult:
      properties:
        type:
          type: string
          const: expression
          title: Type
          default: expression
        status:
          type: string
          enum:
            - success
            - error
          title: Status
        msg:
          type: string
          title: Msg
          default: ''
        detail:
          anyOf:
            - items:
                $ref: '#/components/schemas/ValidationDetail'
              type: array
            - type: 'null'
          title: Detail
        ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Ref
        expression:
          anyOf:
            - type: string
            - type: 'null'
          title: Expression
        expression_type:
          $ref: '#/components/schemas/ExprType'
      type: object
      required:
        - status
        - expression_type
      title: ExprValidationResult
      description: Result of visiting an expression node.
    TemplateActionExprValidationResult:
      properties:
        type:
          type: string
          const: action_template
          title: Type
          default: action_template
        status:
          type: string
          enum:
            - success
            - error
          title: Status
        msg:
          type: string
          title: Msg
          default: ''
        detail:
          anyOf:
            - items:
                $ref: '#/components/schemas/ValidationDetail'
              type: array
            - type: 'null'
          title: Detail
        ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Ref
        expression:
          anyOf:
            - type: string
            - type: 'null'
          title: Expression
        expression_type:
          $ref: '#/components/schemas/ExprType'
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Loc
      type: object
      required:
        - status
        - expression_type
        - loc
      title: TemplateActionExprValidationResult
      description: Result of visiting an expression node.
    ActionValidationResult:
      properties:
        type:
          type: string
          const: action
          title: Type
          default: action
        status:
          type: string
          enum:
            - success
            - error
          title: Status
        msg:
          type: string
          title: Msg
          default: ''
        detail:
          anyOf:
            - items:
                $ref: '#/components/schemas/ValidationDetail'
              type: array
            - type: 'null'
          title: Detail
        ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Ref
        action_type:
          type: string
          title: Action Type
        validated_args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Validated Args
      type: object
      required:
        - status
        - action_type
      title: ActionValidationResult
      description: Result of validating a registry action's arguments.
    ValidationDetail:
      properties:
        type:
          type: string
          title: Type
        msg:
          type: string
          title: Msg
        loc:
          anyOf:
            - items:
                anyOf:
                  - type: integer
                  - type: string
              type: array
            - type: 'null'
          title: Loc
      type: object
      required:
        - type
        - msg
      title: ValidationDetail
    SecretValidationDetail:
      properties:
        environment:
          type: string
          title: Environment
        secret_name:
          type: string
          title: Secret Name
      type: object
      required:
        - environment
        - secret_name
      title: SecretValidationDetail
      description: Detail of a secret validation result.
    ExprType:
      type: string
      enum:
        - generic
        - action
        - secret
        - function
        - input
        - env
        - local_vars
        - literal
        - typecast
        - iterator
        - ternary
        - trigger
        - template_action_step
        - template_action_input
        - variable
      title: ExprType
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````