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

# Criar Canal (Mensagem)

> Cria um novo canal via endpoint de mensageria



## OpenAPI

````yaml POST /api/v1/message/Configure/CreateChannel
openapi: 3.0.4
info:
  title: MessageFy API
  description: >-
    API de mensageria multi-canal do MessageFy. Envie e receba mensagens via
    WhatsApp, HTTP, Telegram e outros canais com uma API unificada.
  version: v1
servers:
  - url: https://api-dev.messagefy.io
security:
  - apiKey: []
tags:
  - name: Me
  - name: Configure
  - name: DeleteMessage
  - name: EditMessage
  - name: MessageOutbox
  - name: SearchMessage
  - name: SendMessage
  - name: Account
  - name: ApiKey
  - name: Channel
  - name: Outbox
paths:
  /api/v1/message/Configure/CreateChannel:
    post:
      tags:
        - Configure
      parameters:
        - name: X-Request-Id
          in: header
          schema:
            type: string
            format: uuid
        - name: X-Consumer-Region
          in: header
          schema:
            type: string
        - name: X-Consumer-Organization-Id
          in: header
          schema:
            type: string
            format: uuid
        - name: X-Consumer-Organization-Name
          in: header
          schema:
            type: string
        - name: X-Consumer-Account-Id
          in: header
          schema:
            type: string
            format: uuid
        - name: X-Consumer-Account-Name
          in: header
          schema:
            type: string
      requestBody:
        content:
          application/json; v=1.0:
            schema:
              $ref: '#/components/schemas/CreateChannelCommand'
          text/json; v=1.0:
            schema:
              $ref: '#/components/schemas/CreateChannelCommand'
          application/*+json; v=1.0:
            schema:
              $ref: '#/components/schemas/CreateChannelCommand'
        required: true
      responses:
        '200':
          description: OK
          content:
            text/plain; v=1.0:
              schema:
                $ref: '#/components/schemas/ChannelDTO'
            application/json; v=1.0:
              schema:
                $ref: '#/components/schemas/ChannelDTO'
            text/json; v=1.0:
              schema:
                $ref: '#/components/schemas/ChannelDTO'
        '400':
          description: Bad Request
          content:
            text/plain; v=1.0:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json; v=1.0:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json; v=1.0:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            text/plain; v=1.0:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json; v=1.0:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json; v=1.0:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    CreateChannelCommand:
      type: object
      properties:
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        channelType:
          type: string
          nullable: true
        providerId:
          type: string
          format: uuid
          nullable: true
        accountId:
          type: string
          format: uuid
          nullable: true
        feedbackChannelId:
          type: string
          format: uuid
          nullable: true
        parameters:
          $ref: '#/components/schemas/JsonObject'
        channelStatusId:
          type: integer
          format: int32
          nullable: true
    ChannelDTO:
      type: object
      properties:
        channelId:
          type: string
          format: uuid
        feedbackChannelId:
          type: string
          format: uuid
          nullable: true
        name:
          type: string
        description:
          type: string
        accountId:
          type: string
          format: uuid
          nullable: true
        organizationId:
          type: string
          format: uuid
          nullable: true
        account:
          $ref: '#/components/schemas/AccountDTO'
        channelType:
          $ref: '#/components/schemas/ChannelTypeDTO'
        status:
          $ref: '#/components/schemas/ChannelStatusDTO'
        provider:
          $ref: '#/components/schemas/ProviderDTO'
        parameters:
          $ref: '#/components/schemas/JsonObject'
        createdAt:
          type: string
          format: date-time
        devices:
          type: array
          items:
            $ref: '#/components/schemas/DeviceDTO'
        deviceRunningCount:
          type: integer
          format: int32
        isConnected:
          type: boolean
          nullable: true
        stateUpdatedAt:
          type: string
          format: date-time
          nullable: true
        feedbackChannelSummary:
          $ref: '#/components/schemas/ChannelSummaryDTO'
        channelsSendingFeedback:
          type: array
          items:
            $ref: '#/components/schemas/ChannelSummaryDTO2'
          nullable: true
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
    JsonObject:
      type: object
      nullable: true
    AccountDTO:
      type: object
      properties:
        accountId:
          type: string
          format: uuid
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/AccountStatusDTO'
        organization:
          $ref: '#/components/schemas/OrganizationDTO'
        channelCount:
          type: integer
          format: int32
        deviceRunningCount:
          type: integer
          format: int32
        channelConnectedCount:
          type: integer
          format: int32
        financialManagerCount:
          type: integer
          format: int32
        apiKeyCount:
          type: integer
          format: int32
    ChannelTypeDTO:
      type: object
      properties:
        channelTypeId:
          type: integer
          format: int32
        key:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        icon:
          type: string
        configurationSchemaUrl:
          type: string
          nullable: true
        requiredFeedbackChannel:
          type: boolean
        canBeFeedbackChannel:
          type: boolean
        requireReceiverChannel:
          type: boolean
        canBeReceiverChannel:
          type: boolean
        maxConsumptionTimeSeconds:
          type: integer
          format: int32
        maxMessages:
          type: integer
          format: int32
        maxConcurrentConsumers:
          type: integer
          format: int32
        idleTimeoutInSeconds:
          type: integer
          format: int32
        prefetchCount:
          type: integer
          format: int32
    ChannelStatusDTO:
      type: object
      properties:
        channelStatusId:
          type: integer
          format: int32
        name:
          type: string
        icon:
          type: string
        description:
          type: string
        canSendAndReceiveMessage:
          type: boolean
        canConfigure:
          type: boolean
        canReceiveInboundMessages:
          type: boolean
        isTerminalDeletionState:
          type: boolean
        canBeDeprovisioned:
          type: boolean
    ProviderDTO:
      type: object
      properties:
        providerId:
          type: string
          format: uuid
        key:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        icon:
          type: string
          nullable: true
        channelTypeId:
          type: integer
          format: int32
        channelTypeKey:
          type: string
          nullable: true
        channelTypeName:
          type: string
          nullable: true
        priority:
          type: integer
          format: int32
        dockerImage:
          type: string
          nullable: true
        platform:
          type: string
          nullable: true
        maxChannelsPerInstance:
          type: integer
          format: int32
          nullable: true
        requiresCluster:
          type: boolean
        requiresMessageBroker:
          type: boolean
        requiresDatabase:
          type: boolean
        maxConsumptionTimeSeconds:
          type: integer
          format: int32
        maxMessages:
          type: integer
          format: int32
        maxConcurrentConsumers:
          type: integer
          format: int32
        idleTimeoutInSeconds:
          type: integer
          format: int32
        prefetchCount:
          type: integer
          format: int32
    DeviceDTO:
      type: object
      properties:
        deviceId:
          type: string
          format: uuid
        name:
          type: string
          nullable: true
        dockerImage:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/ResourceStatusDTO'
        cluster:
          $ref: '#/components/schemas/ClusterDTO'
        clusterInstanceName:
          type: string
        messageBroker:
          $ref: '#/components/schemas/MessageBrokerDTO'
        messageBrokerQueueName:
          type: string
        database:
          $ref: '#/components/schemas/DatabaseDTO'
        databaseSchema:
          type: string
          nullable: true
        provider:
          $ref: '#/components/schemas/ProviderDTO'
    ChannelSummaryDTO:
      type: object
      properties:
        channelId:
          type: string
          format: uuid
        name:
          type: string
        channelType:
          type: string
        provider:
          type: string
      nullable: true
    ChannelSummaryDTO2:
      type: object
      properties:
        channelId:
          type: string
          format: uuid
        name:
          type: string
        channelType:
          type: string
        provider:
          type: string
    AccountStatusDTO:
      type: object
      properties:
        accountStatusId:
          type: integer
          format: int32
        name:
          type: string
        icon:
          type: string
        description:
          type: string
        canManageChildObjects:
          type: boolean
        canSendAndReceiveMessage:
          type: boolean
      nullable: true
    OrganizationDTO:
      type: object
      properties:
        organizationId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        status:
          $ref: '#/components/schemas/OrganizationStatusDTO'
        accountCount:
          type: integer
          format: int32
        channelCount:
          type: integer
          format: int32
        deviceRunningCount:
          type: integer
          format: int32
        channelConnectedCount:
          type: integer
          format: int32
        apiKeyCount:
          type: integer
          format: int32
        createdAt:
          type: string
          format: date-time
      nullable: true
    ResourceStatusDTO:
      type: object
      properties:
        resourceStatusId:
          type: integer
          format: int32
        name:
          type: string
        icon:
          type: string
        description:
          type: string
        canUse:
          type: boolean
        isDefault:
          type: boolean
        isAllocated:
          type: boolean
        canDelete:
          type: boolean
        isTransitioning:
          type: boolean
        canMoveOrUpgrade:
          type: boolean
    ClusterDTO:
      type: object
      properties:
        clusterId:
          type: string
          format: uuid
        name:
          type: string
        createdAt:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/ResourceStatusDTO'
        maxInstances:
          type: integer
          format: int32
        factoryKey:
          type: string
        tags:
          type: array
          items:
            type: string
      nullable: true
    MessageBrokerDTO:
      type: object
      properties:
        messageBrokerId:
          type: string
          format: uuid
        name:
          type: string
        createdAt:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/ResourceStatusDTO'
        maxInstances:
          type: integer
          format: int32
        tags:
          type: array
          items:
            type: string
        outboundShovelConfigured:
          type: boolean
        outboundShovelEnabled:
          type: boolean
      nullable: true
    DatabaseDTO:
      type: object
      properties:
        databaseId:
          type: string
          format: uuid
        name:
          type: string
        createdAt:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/ResourceStatusDTO'
        maxInstances:
          type: integer
          format: int32
        tags:
          type: array
          items:
            type: string
      nullable: true
    OrganizationStatusDTO:
      type: object
      properties:
        organizationStatusId:
          type: integer
          format: int32
        name:
          type: string
        icon:
          type: string
        description:
          type: string
        canManageChildObjects:
          type: boolean
        canSendAndReceiveMessage:
          type: boolean
      nullable: true
  securitySchemes:
    apiKey:
      type: apiKey
      description: >-
        Chave de API fornecida pelo painel administrativo do MessageFy. Enviada
        no header de cada requisição. O gateway APISIX valida a chave e injeta
        os headers X-Consumer-* automaticamente.
      name: X-API-KEY
      in: header

````