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

# Update network

> Replaces whichever of `agents` ([{agentId}]), `workflows` ([{workflowId}]), or `sdk_ui` is provided. Validates that every referenced agent/workflow belongs to the caller's org. Dev networks only: a staging or prod network returns 409 — edit its dev network and promote it with POST /v1/copilots/{id}/deploy.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/copilots/{id}
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}:
    patch:
      tags:
        - Networks
      summary: Update network
      description: >-
        Replaces whichever of `agents` ([{agentId}]), `workflows`
        ([{workflowId}]), or `sdk_ui` is provided. Validates that every
        referenced agent/workflow belongs to the caller's org. Dev networks
        only: a staging or prod network returns 409 — edit its dev network and
        promote it 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
              properties:
                agents:
                  type: array
                  description: REPLACES the attached agents. Order is routing order.
                  items:
                    type: object
                    properties:
                      agentId:
                        type: string
                  example:
                    - agentId: 6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10
                workflows:
                  type: array
                  description: REPLACES the attached workflows.
                  items:
                    type: object
                    properties:
                      workflowId:
                        type: string
                  example:
                    - workflowId: 4c2f9e18-7a63-4d05-b1e8-93a7c0f2d641
                sdk_ui:
                  type:
                    - object
                    - 'null'
                  description: Chat-widget configuration. REPLACES the stored value.
                  example:
                    theme: light
                    title: Acme support
                handoff_prompt:
                  type: string
                  example: Route billing questions to the support agent.
                followup_instructions:
                  type: array
                  items:
                    type: object
                  example:
                    - type: text
                      content: Offer the order-status workflow.
      responses:
        '200':
          description: The network after the update
          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
        '400':
          description: Invalid body or unknown agent/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.

````