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

# Update Workflow



## OpenAPI

````yaml /openapi-v1.json put /api/v1/workflows/{workflow_id}
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/workflows/{workflow_id}:
    put:
      tags:
        - Workflows
      summary: Update Workflow
      operationId: core_api_v1_controllers_workflows_update_workflow
      parameters:
        - in: path
          name: workflow_id
          schema:
            format: uuid
            title: Workflow Id
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowUpdateInput'
        required: true
      responses:
        '200':
          description: OK
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    WorkflowUpdateInput:
      additionalProperties: false
      properties:
        revision:
          description: >-
            Current revision from get_workflow; a stale revision returns a
            conflict.
          minimum: 1
          title: Revision
          type: integer
        name:
          anyOf:
            - maxLength: 160
              minLength: 1
              type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - maxLength: 2000
              type: string
            - type: 'null'
          title: Description
        draft:
          anyOf:
            - $ref: '#/components/schemas/WorkflowGraphInput'
            - type: 'null'
          description: Full replacement graph when provided.
        allowed_agent_ids:
          anyOf:
            - items:
                format: uuid
                type: string
              maxItems: 100
              type: array
            - type: 'null'
          title: Allowed Agent Ids
      required:
        - revision
      title: WorkflowUpdateInput
      type: object
    WorkflowGraphInput:
      additionalProperties: false
      properties:
        nodes:
          items:
            $ref: '#/components/schemas/WorkflowNode'
          maxItems: 50
          minItems: 1
          title: Nodes
          type: array
        edges:
          items:
            $ref: '#/components/schemas/WorkflowEdge'
          maxItems: 98
          title: Edges
          type: array
        input_schema:
          additionalProperties: true
          title: Input Schema
          type: object
        execution:
          default: async
          description: >-
            sync runs inline and returns the output to the caller (max 20 s, no
            Wait).
          enum:
            - async
            - sync
          title: Execution
          type: string
      required:
        - nodes
      title: WorkflowGraphInput
      type: object
    WorkflowNode:
      additionalProperties: false
      properties:
        id:
          pattern: ^[a-zA-Z][a-zA-Z0-9_-]{0,79}$
          title: Id
          type: string
        type:
          maxLength: 100
          minLength: 1
          title: Type
          type: string
        version:
          default: 1
          minimum: 1
          title: Version
          type: integer
        name:
          default: ''
          maxLength: 120
          title: Name
          type: string
        config:
          additionalProperties: true
          title: Config
          type: object
        position:
          anyOf:
            - $ref: '#/components/schemas/WorkflowPosition'
            - type: 'null'
      required:
        - id
        - type
      title: WorkflowNode
      type: object
    WorkflowEdge:
      additionalProperties: false
      properties:
        source:
          title: Source
          type: string
        target:
          title: Target
          type: string
        port:
          default: next
          title: Port
          type: string
      required:
        - source
        - target
      title: WorkflowEdge
      type: object
    WorkflowPosition:
      properties:
        x:
          title: X
          type: number
        'y':
          title: 'Y'
          type: number
      required:
        - x
        - 'y'
      title: WorkflowPosition
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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