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

# Send video

> Send video messages via WhatsApp

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];

## Overview

Method for sending videos. You can send via **URL** or **Base64**.

<Warning>
  When sending as Base64, you must include the prefix with the video type, for example: `data:video/mp4;base64,`.
</Warning>

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

<Note>
  File size limits and supported formats follow WhatsApp policies. See the [official WhatsApp documentation](https://developers.facebook.com/docs/whatsapp/api/media) for details.
</Note>


## OpenAPI

````yaml en/z-api/openapi.json POST /send-video
openapi: 3.1.0
info:
  title: Omni Z-API - Z-API Compatibility
  description: Z-API compatible API to facilitate migration to 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: Channel ID (equivalent to Z-API instance_id)
        default: YOUR_CHANNEL
      channel_token:
        description: Channel token (equivalent to Z-API token)
        default: YOUR_TOKEN
security:
  - bearerAuth: []
paths:
  /send-video:
    post:
      tags:
        - Messages
      summary: Send video
      description: >-
        Sends a message with a video. Accepts URL or Base64 (with
        `data:video/mp4;base64,` prefix).
      operationId: sendVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendVideoRequest'
            examples:
              url:
                summary: Send by URL
                value:
                  phone: '5511999999999'
                  video: https://example.com/video.mp4
                  caption: Check out this video!
                  viewOnce: false
              base64:
                summary: Send by Base64
                value:
                  phone: '5511999999999'
                  video: data:video/mp4;base64,AAYXJ0eHJlZgIGZ0eXBtc0eH...
                  caption: Check out this video!
                  viewOnce: false
      responses:
        '200':
          $ref: '#/components/responses/MessageSuccess'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
components:
  schemas:
    SendVideoRequest:
      type: object
      required:
        - phone
        - video
      properties:
        phone:
          type: string
          description: Recipient phone number (country code + area code + number)
          example: '5511999999999'
        video:
          type: string
          description: Video URL or Base64 data
        caption:
          type: string
          description: Video caption
        messageId:
          type: string
          description: ID of an existing message to reply to
        delayMessage:
          type: integer
          description: Delay in seconds before sending (1-15)
          minimum: 1
          maximum: 15
        viewOnce:
          type: boolean
          description: Send as view-once message
          default: false
    MessageResponse:
      type: object
      properties:
        zaapId:
          type: string
          description: Internal identifier
        messageId:
          type: string
          description: WhatsApp message ID
        id:
          type: string
          description: Same value as messageId (compatibility)
    Error:
      type: object
      properties:
        error:
          type: integer
          description: Error code
        message:
          type: string
          description: Error description
  responses:
    MessageSuccess:
      description: Message sent successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            zaapId: 3999984263738042930CD6ECDE9VDWSA
            messageId: D241XXXX732339502B68
            id: D241XXXX732339502B68
    MethodNotAllowed:
      description: Method not allowed. Make sure you are using POST.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 405
            message: Method not allowed
    UnsupportedMediaType:
      description: 'Invalid Content-Type. Send `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 generated in the Omni Z-API Security panel

````