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

# Create API Connection

> Cria uma nova conexão de API externa para uso como ferramenta pelo bot RAG.



## OpenAPI

````yaml openapi-v2 POST /api-tools/connection/create/{instance}
openapi: 3.0.3
info:
  title: ZapThinker API
  version: 2.1.1
servers:
  - url: https://api.zapthinker.com
security: []
paths:
  /api-tools/connection/create/{instance}:
    post:
      tags:
        - API Tools Controller
      summary: Create an API connection
      description: >-
        Cria uma nova conexão de API externa para uso como ferramenta pelo bot
        RAG.
      operationId: createApiConnection
      parameters:
        - name: instance
          in: path
          required: true
          description: Nome da instância
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  description: Nome da conexão
                description:
                  type: string
                baseUrl:
                  type: string
                  minLength: 1
                  description: URL base da API
                authType:
                  type: string
                  enum:
                    - none
                    - apiKey
                    - bearer
                    - basic
                    - custom
                authConfig:
                  type: object
                  description: Configuração de autenticação
                headers:
                  type: object
                  description: Headers customizados
                enabled:
                  type: boolean
              required:
                - name
                - baseUrl
      responses:
        '201':
          description: Conexão criada com sucesso
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Parâmetros inválidos
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Your authorization key header

````