# Image

Image messages are messages that display a single image and an optional caption.

![](https://3527970750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4sMxKjL6eJRvZn6jeG-887967055%2Fuploads%2FW2TVRYS4gTHDmwygaEeK%2Fimage_message_.png?alt=media\&token=a7181775-a477-4e10-a023-3fd977253f6b)

### Image Messages Request

<mark style="color:orange;">`POST`</mark> `https://waba-v2.360dialog.io/messages`

Use the messages endpoint to send an image message to a WhatsApp user.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `D360-API-KEY`     |

**Body Example**

```json
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<WHATSAPP_USER_PHONE_NUMBER>",
  "type": "image",
  "image": {
    "id": "<MEDIA_ID>", <!-- Only if using uploaded media -->
    "link": "<MEDIA_URL>", <!-- Only if using hosted media (not recommended) -->
    "caption": "<MEDIA_CAPTION_TEXT>"
  }
}
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "contacts": [
    {
      "input": "text",
      "wa_id": "text"
    }
  ],
  "messages": [
    {
      "id": "text",
      "message_status": "accepted"
    }
  ],
  "messaging_product": "text"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}
