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

# Register a workflow in a deployment



## OpenAPI

````yaml api-reference/endpoints/deployments/api-reference/openapi.json post /api/v1/workers/deployments/{deployment_id}/workflows
openapi: 3.1.0
info:
  title: Polos Orchestrator API
  description: API for the Polos durable execution platform for AI agents
  contact:
    name: Polos Team
    url: https://github.com/polos-dev/polos
  license:
    name: ''
  version: 1.0.0
servers:
  - url: /
    description: Current server
security: []
tags:
  - name: Health
    description: Health check endpoints
  - name: Projects
    description: Project management endpoints
  - name: Agents
    description: Agent definition management
  - name: Tools
    description: Tool definition management
  - name: Workflows
    description: Workflow management
  - name: Executions
    description: Workflow execution management
  - name: Traces
    description: Observability traces
  - name: Events
    description: Event publishing and streaming
  - name: Event Triggers
    description: Event-based workflow triggers
  - name: Schedules
    description: Scheduled workflow execution
  - name: Workers
    description: Worker registration and management
  - name: Deployments
    description: Deployment management
paths:
  /api/v1/workers/deployments/{deployment_id}/workflows:
    post:
      tags:
        - Deployments
      summary: Register a workflow in a deployment
      operationId: register_deployment_workflow
      parameters:
        - name: deployment_id
          in: path
          description: Deployment ID
          required: true
          schema:
            type: string
        - name: X-Project-ID
          in: header
          description: Project ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterDeploymentWorkflowRequest'
        required: true
      responses:
        '200':
          description: Workflow registered in deployment
        '400':
          description: Invalid workflow type
        '404':
          description: Project not found
        '500':
          description: Internal server error
      security:
        - bearer_auth: []
        - cookie_auth: []
components:
  schemas:
    RegisterDeploymentWorkflowRequest:
      type: object
      description: Request to register a workflow in a deployment
      required:
        - workflow_id
        - workflow_type
      properties:
        scheduled:
          type:
            - boolean
            - 'null'
          description: Whether the workflow is scheduled
        trigger_on_event:
          type:
            - boolean
            - 'null'
          description: Whether to trigger on events
        workflow_id:
          type: string
          description: Workflow ID
        workflow_type:
          type: string
          description: Workflow type (workflow, agent, tool)
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
    cookie_auth:
      type: apiKey
      in: cookie
      name: polos_auth

````