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

# Connection State

> Gets the state of the connection



## OpenAPI

````yaml openapi-v2 GET /instance/connectionState/{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:
  /instance/connectionState/{instance}:
    get:
      tags:
        - Instance Controller
      summary: Connection State
      description: Gets the state of the connection
      operationId: connectionState
      parameters:
        - name: instance
          in: path
          required: true
          description: Name of the instance to get status connect
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  instance:
                    type: object
                    properties:
                      instanceName:
                        type: string
                        description: The name of the instance.
                      state:
                        type: string
                        description: The state of the instance.
                example:
                  instance:
                    instanceName: teste-docs
                    state: open
        '404':
          description: Instance not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: The HTTP status of the response
                  error:
                    type: string
                    description: The error message indicating the type of error
                  response:
                    type: object
                    properties:
                      message:
                        type: array
                        items:
                          type: string
                        description: List of detailed error messages
                example:
                  status: 404
                  error: Not Found
                  response:
                    message:
                      - The "invalid-instance" instance does not exist
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Your authorization key header

````