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

# Attach workflow

> Attaches the workflow to the network (idempotent). Dev networks only: a staging or prod network returns 409 — attach on its dev network and promote with POST /v1/copilots/{id}/deploy.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/copilots/{id}/workflows
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/copilots/{id}/workflows:
    post:
      tags:
        - Networks
      summary: Attach workflow
      description: >-
        Attaches the workflow to the network (idempotent). Dev networks only: a
        staging or prod network returns 409 — attach on its dev network and
        promote with POST /v1/copilots/{id}/deploy.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            example: a5e91c07-3f24-4b68-9d15-8c72e0b4a396
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - workflowId
              properties:
                workflowId:
                  type: string
                  example: 4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641
      responses:
        '200':
          description: The network after the attach
          content:
            application/json:
              schema:
                type: object
                properties:
                  copilot:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      agents:
                        type: array
                        description: >-
                          Attached agents, as stored: `[{ agentId }]`, in
                          routing order.
                        items:
                          type: object
                      workflows:
                        type: array
                        description: 'Attached workflows, as stored: `[{ workflowId }]`.'
                        items:
                          type: object
                      sdk_ui:
                        type: object
                        nullable: true
                        description: The chat-widget configuration the SDK reads.
                      handoff_prompt:
                        type: string
                        nullable: true
                        description: The routing prompt the handoff classifier runs.
                      followup_instructions:
                        type: array
                        nullable: true
                        description: >-
                          Instruction blocks appended when the network handles a
                          follow-up turn.
                        items:
                          type: object
                  attached:
                    type: boolean
                    description: >-
                      False when the workflow was already attached — the call is
                      idempotent.
        '400':
          description: Invalid body or unknown workflow
        '404':
          description: Not found
        '409':
          description: Not a dev network — promote with /deploy instead
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````