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

# Video Messages

> Send videos via WhatsApp

Send videos for tutorials, product demos, or promotional content.

## Send a Video

<CodeGroup>
  ```typescript TypeScript theme={null}
  const message = await zavu.messages.send({
    to: "+14155551234",
    channel: "whatsapp",
    messageType: "video",
    content: {
      mediaUrl: "https://example.com/tutorial.mp4"
    }
  });
  ```

  ```python Python theme={null}
  message = zavu.messages.send(
      to="+14155551234",
      channel="whatsapp",
      message_type="video",
      content={
          "media_url": "https://example.com/tutorial.mp4"
      }
  )
  ```

  ```ruby Ruby theme={null}
  message = client.messages.send(
    to: "+14155551234",
    channel: "whatsapp",
    message_type: "video",
    content: {
      media_url: "https://example.com/tutorial.mp4"
    }
  )
  ```

  ```go Go theme={null}
  message, err := client.Messages.Send(context.TODO(), zavudev.MessageSendParams{
      To:          zavudev.String("+14155551234"),
      Channel:     zavudev.String("whatsapp"),
      MessageType: zavudev.String("video"),
      Content: &zavudev.MessageContentParams{
          MediaURL: zavudev.String("https://example.com/tutorial.mp4"),
      },
  })
  ```

  ```php PHP theme={null}
  $message = $client->messages->send([
      'to' => '+14155551234',
      'channel' => 'whatsapp',
      'messageType' => 'video',
      'content' => [
          'mediaUrl' => 'https://example.com/tutorial.mp4',
      ],
  ]);
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.zavu.dev/v1/messages \
    -H "Authorization: Bearer zv_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "to": "+14155551234",
      "channel": "whatsapp",
      "messageType": "video",
      "content": {
        "mediaUrl": "https://example.com/tutorial.mp4"
      }
    }'
  ```
</CodeGroup>

## Video with Caption

<CodeGroup>
  ```typescript TypeScript theme={null}
  const message = await zavu.messages.send({
    to: "+14155551234",
    channel: "whatsapp",
    messageType: "video",
    text: "How to use our app",
    content: {
      mediaUrl: "https://example.com/tutorial.mp4"
    }
  });
  ```

  ```python Python theme={null}
  message = zavu.messages.send(
      to="+14155551234",
      channel="whatsapp",
      message_type="video",
      text="How to use our app",
      content={
          "media_url": "https://example.com/tutorial.mp4"
      }
  )
  ```

  ```ruby Ruby theme={null}
  message = client.messages.send(
    to: "+14155551234",
    channel: "whatsapp",
    message_type: "video",
    text: "How to use our app",
    content: {
      media_url: "https://example.com/tutorial.mp4"
    }
  )
  ```

  ```go Go theme={null}
  message, err := client.Messages.Send(context.TODO(), zavudev.MessageSendParams{
      To:          zavudev.String("+14155551234"),
      Channel:     zavudev.String("whatsapp"),
      MessageType: zavudev.String("video"),
      Text:        zavudev.String("How to use our app"),
      Content: &zavudev.MessageContentParams{
          MediaURL: zavudev.String("https://example.com/tutorial.mp4"),
      },
  })
  ```

  ```php PHP theme={null}
  $message = $client->messages->send([
      'to' => '+14155551234',
      'channel' => 'whatsapp',
      'messageType' => 'video',
      'text' => 'How to use our app',
      'content' => [
          'mediaUrl' => 'https://example.com/tutorial.mp4',
      ],
  ]);
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.zavu.dev/v1/messages \
    -H "Authorization: Bearer zv_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "to": "+14155551234",
      "channel": "whatsapp",
      "messageType": "video",
      "text": "How to use our app",
      "content": {
        "mediaUrl": "https://example.com/tutorial.mp4"
      }
    }'
  ```
</CodeGroup>

## Specifications

| Property | Requirement              |
| -------- | ------------------------ |
| Formats  | MP4, 3GPP                |
| Max size | 16 MB                    |
| Codec    | H.264 video, AAC audio   |
| Caption  | Optional, max 1024 chars |

## URL Requirements

Your video URL must:

* Be publicly accessible (no authentication)
* Use HTTPS
* Return the correct `Content-Type` header
* Be available for at least 24 hours

<Tip>
  Compress videos before uploading to ensure faster delivery and better user experience on mobile networks.
</Tip>

## Use Cases

* Product demonstrations
* Tutorial videos
* Promotional content
* Event highlights
* Customer testimonials
