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

# Enviar carrusel

> Envía mensajes con un carrusel de tarjetas interactivas

export const ZapiResponseText = ({lang = 'pt'}) => ({
  pt: 'A estrutura de resposta é idêntica à da Z-API. Seu código existente que processa esses retornos continuará funcionando sem alterações.',
  en: 'The response structure is identical to Z-API. Your existing code that processes these returns will continue working without changes.',
  es: 'La estructura de la respuesta es idéntica a la de Z-API. El código que ya tienes para procesar esas respuestas seguirá funcionando sin cambios.'
})[lang];

## Conceptos

Método para enviar mensajes con un carrusel de tarjetas. Cada tarjeta puede contener imagen, texto y botones de acción (CALL, URL o REPLY).

<Note>
  <ZapiResponseText lang="es" />
</Note>


## OpenAPI

````yaml es/z-api/openapi.json POST /send-carousel
openapi: 3.1.0
info:
  title: Omni Z-API - Compatibilidad con Z-API
  description: API compatible con Z-API para facilitar la migración a Omni Z-API
  version: 1.0.0
servers:
  - url: https://api.omni.z-api.io/channels/{channel_id}/token/{channel_token}
    variables:
      channel_id:
        description: ID del canal (equivalente al instance_id de Z-API)
        default: SU_CANAL
      channel_token:
        description: Token del canal (equivalente al token de Z-API)
        default: SU_TOKEN
security:
  - bearerAuth: []
paths:
  /send-carousel:
    post:
      tags:
        - Mensajes
      summary: Enviar carrusel
      description: >-
        Envía un mensaje con un carrusel de tarjetas, cada una con imagen, texto
        y botones de acción.
      operationId: sendCarousel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendCarouselRequest'
            example:
              phone: '5511999999999'
              message: 'Mira nuestros productos:'
              carousel:
                - text: Produto A
                  image: https://ejemplo.com/producto-a.png
                  buttons:
                    - id: '1'
                      type: URL
                      label: Ver detalhes
                      url: https://www.omni.z-api.io
                    - id: '2'
                      type: REPLY
                      label: Me interesa
                - text: Produto B
                  image: https://ejemplo.com/producto-b.png
                  buttons:
                    - id: '3'
                      type: URL
                      label: Ver detalhes
                      url: https://www.omni.z-api.io
                    - id: '4'
                      type: REPLY
                      label: Me interesa
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
components:
  schemas:
    SendCarouselRequest:
      type: object
      required:
        - phone
        - message
        - carousel
      properties:
        phone:
          type: string
          description: Teléfono del destinatario (código de país + prefijo + número)
          example: '5511999999999'
        message:
          type: string
          description: Texto del mensaje
        carousel:
          type: array
          description: Lista de tarjetas del carrusel
          items:
            type: object
            required:
              - text
              - image
            properties:
              text:
                type: string
                description: Texto de la tarjeta
              image:
                type: string
                description: URL de la imagen de la tarjeta
              buttons:
                type: array
                description: Botones de acción de la tarjeta
                items:
                  type: object
                  required:
                    - type
                    - label
                  properties:
                    id:
                      type: string
                      description: Identificador del botón
                    type:
                      type: string
                      description: Tipo de botón
                      enum:
                        - CALL
                        - URL
                        - REPLY
                    label:
                      type: string
                      description: Texto que se muestra en el botón
                    phone:
                      type: string
                      description: Teléfono para los botones de tipo CALL
                    url:
                      type: string
                      description: URL para los botones de tipo URL
        delayMessage:
          type: integer
          description: Retardo en segundos antes del envío (1-15)
          minimum: 1
          maximum: 15
    MessageResponse:
      type: object
      properties:
        zaapId:
          type: string
          description: Identificador interno
        messageId:
          type: string
          description: ID del mensaje en WhatsApp
        id:
          type: string
          description: El mismo valor que messageId (compatibilidad)
    Error:
      type: object
      properties:
        error:
          type: integer
          description: Código del error
        message:
          type: string
          description: Descripción del error
  responses:
    MessageSuccess:
      description: Mensaje enviado correctamente
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            zaapId: 3999984263738042930CD6ECDE9VDWSA
            messageId: D241XXXX732339502B68
            id: D241XXXX732339502B68
    MethodNotAllowed:
      description: Método no permitido. Comprueba que estés usando POST.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 405
            message: Method not allowed
    UnsupportedMediaType:
      description: 'Content-Type no válido. Envía `Content-Type: application/json`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 415
            message: Unsupported media type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key generada en el panel de Seguridad de Omni Z-API

````