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

# Criar Integração

> Cria uma nova integração



## OpenAPI

````yaml POST /integration/create
openapi: 3.1.0
info:
  title: OpenAPI Multchats
  description: Multchats API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.multchats.com/v2
security:
  - bearerAuth: []
paths:
  /integration/create:
    post:
      tags:
        - Integration
      summary: Criar Integração
      description: Cria uma nova integração
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIntegrationRequest'
      responses:
        '200':
          description: Integração criada com sucesso
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateIntegrationResponse'
components:
  schemas:
    CreateIntegrationRequest:
      type: object
      required:
        - name
        - sectorId
      properties:
        name:
          description: Nome da integração
          type: string
          minLength: 1
          maxLength: 255
        sectorId:
          description: ID do setor (Copiar em Setores -> Ações -> Copiar ID)
          type: string
          pattern: ^c[a-z0-9]{24}$
        color:
          description: Cor da integração (hexadecimal)
          type: string
          pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
    CreateIntegrationResponse:
      required:
        - success
        - response
      type: object
      properties:
        success:
          description: Indica se a operação foi bem-sucedida
          type: boolean
          default: true
        response:
          description: Resposta da operação de criação
          type: object
          properties:
            integration:
              $ref: '#/components/schemas/Integration'
    Integration:
      type: object
      required:
        - id
        - name
        - sectorId
        - connectionStatus
        - createdAt
        - updatedAt
      properties:
        id:
          description: ID da integração
          type: string
        name:
          description: Nome da integração
          type: string
        chatId:
          description: ID do chat da integração
          type: string
        color:
          description: Cor da integração
          type: string
        sectorId:
          description: ID do setor da integração
          type: string
        connectionStatus:
          description: Status de conexão da integração
          type: string
        onlyApi:
          description: Indica se a integração é apenas API
          type: boolean
          default: false
        createdAt:
          description: Data de criação da integração
          type: string
        updatedAt:
          description: Data de atualização da integração
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````