> ## 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.

# Detach workflow

> Dev networks only: a staging or prod network returns 409 — detach on its dev network and promote with POST /v1/copilots/{id}/deploy.



## OpenAPI

````yaml /api-reference/openapi.json delete /v1/copilots/{id}/workflows/{workflowId}
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/{workflowId}:
    delete:
      tags:
        - Networks
      summary: Detach workflow
      description: >-
        Dev networks only: a staging or prod network returns 409 — detach 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
        - name: workflowId
          in: path
          required: true
          schema:
            type: string
            example: 4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641
      responses:
        '200':
          description: The network after the detach
          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
                  detached:
                    type: boolean
                    description: >-
                      True even when the workflow was not attached — the call is
                      idempotent.
        '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.

````