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

# Imagem

> Envie uma imagem com legenda opcional

<ParamField body="messaging_product" type="string" required default="whatsapp" />

<ParamField body="to" type="string" required placeholder="5511999999999">
  Número do destinatário no formato E.164 sem o `+`.
</ParamField>

<ParamField body="recipient_type" type="string" default="individual" />

<ParamField body="type" type="string" required default="image" />

<ParamField body="context" type="object">
  Para responder uma mensagem. Inclua `message_id` da mensagem original.
</ParamField>

<ParamField body="image" type="object" required>
  <Expandable title="campos" defaultOpen>
    <ParamField body="image.link" type="string" placeholder="https://example.com/image.jpg">
      URL pública da imagem. Use `link` **ou** `id`, não os dois.
    </ParamField>

    <ParamField body="image.id" type="string" placeholder="1234567890">
      ID de mídia retornado pelo [Upload de Mídia](/api-reference/media/upload).
    </ParamField>

    <ParamField body="image.caption" type="string" placeholder="Confira nosso produto!">
      Legenda exibida abaixo da imagem (máx. 1024 caracteres).
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://apis.vectalk.com.br/api/messages \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "messaging_product": "whatsapp",
      "to": "5511999999999",
      "type": "image",
      "image": {
        "link": "https://example.com/image.jpg",
        "caption": "Confira nosso produto!"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "messaging_product": "whatsapp",
    "contacts": [{ "input": "5511999999999", "wa_id": "5511999999999" }],
    "messages": [{ "id": "wamid.HBgLNTUxMTk5OTk5OTk5..." }]
  }
  ```
</ResponseExample>
