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

# Associate Workflow

> Associate a workflow with an agent.

Validation checks:
- Agent exists and user owns it
- Workflow exists and user owns it
- Workflow belongs to same tenant as agent
- Workflow is active (not archived)
- Workflow tools are available to agent (optional)



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json post /unified/agents/{agent_id}/workflow
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /unified/agents/{agent_id}/workflow:
    post:
      tags:
        - unified-agent-config
        - unified-agent-config
      summary: Associate Workflow
      description: |-
        Associate a workflow with an agent.

        Validation checks:
        - Agent exists and user owns it
        - Workflow exists and user owns it
        - Workflow belongs to same tenant as agent
        - Workflow is active (not archived)
        - Workflow tools are available to agent (optional)
      operationId: associate_workflow_unified_agents__agent_id__workflow_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: workflow_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
        - name: validate_tools
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Validate Tools
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Associate Workflow Unified Agents  Agent Id  Workflow
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````