> ## Documentation Index
> Fetch the complete documentation index at: https://doc.evolution-api.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Websocket

> Set Websocket



## OpenAPI

````yaml openapi-v2 POST /websocket/set/{instance}
openapi: 3.0.3
info:
  title: Evolution API
  version: 2.1.1
servers:
  - url: https://{server-url}
    variables:
      server-url:
        default: evolution-example
        description: The URL of your EvolutionAPI server
    description: Your instance domain
security: []
paths:
  /websocket/set/{instance}:
    post:
      tags:
        - Websocket Controller
      summary: Set Websocket
      description: Set Websocket
      operationId: setWebsocket
      parameters:
        - name: instance
          in: path
          required: true
          description: Name of the instance
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - websocket
              properties:
                websocket:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    events:
                      type: array
                      items:
                        type: string
                        enum:
                          - APPLICATION_STARTUP
                          - QRCODE_UPDATED
                          - MESSAGES_SET
                          - MESSAGES_UPSERT
                          - MESSAGES_UPDATE
                          - MESSAGES_DELETE
                          - SEND_MESSAGE
                          - CONTACTS_SET
                          - CONTACTS_UPSERT
                          - CONTACTS_UPDATE
                          - PRESENCE_UPDATE
                          - CHATS_SET
                          - CHATS_UPSERT
                          - CHATS_UPDATE
                          - CHATS_DELETE
                          - GROUPS_UPSERT
                          - GROUP_UPDATE
                          - GROUP_PARTICIPANTS_UPDATE
                          - CONNECTION_UPDATE
                          - LABELS_EDIT
                          - LABELS_ASSOCIATION
                          - CALL
                          - TYPEBOT_START
                          - TYPEBOT_CHANGE_STATUS
                      description: Events to be sent to the websocket
      responses:
        '200':
          description: Ok
          content: {}
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Your authorization key header

````