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

# Image Message

> Send an image with an optional caption using a media ID.

## Endpoint

```http theme={null}
POST /api/whatsapp/{Sender Hash}/messages
```

**Sandbox base URL:** `https://testqa.cpaas.globeteleservices.com`

## Headers

```http theme={null}
Accept: application/json
Content-Type: application/json
Authorization: Bearer <token>
```

Generate the Bearer token from the **API** tab in the CPaaS+ Portal. Replace `{Sender Hash}` with the registered sender hash available under **Numbers** in the WhatsApp channel.

Pass the recipient's WhatsApp number in international format without the leading `+` sign.

## Parameters

| Parameter | Required | Description |
| - | - | - |
| `messaging_product` | Yes | Fixed value: `"whatsapp"`. |
| `recipient_type` | Optional | Fixed value: `"individual"`. Defaults to this value, as stated in the reference. |
| `to` | Yes | Recipient's WhatsApp number without a leading `+` sign. |
| `type` | Yes | Fixed value: `"image"`. |
| `image.id` | Yes | Media ID returned by the Media Upload API. |
| `image.caption` | Optional | Caption displayed with the image. |

## Request Example

```json theme={null}
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "919373084880",
  "type": "image",
  "image": {
    "id": "762449710003335",
    "caption": "Here's a look at our latest arrival"
  }
}
```

Replace the example recipient number and media ID with values for your integration.

## Notes

Upload the image using the Media Upload API before sending the message. Use the returned media ID in `image.id`.

## Responses and Errors

Refer to [Common HTTP Status Codes](/docs/status-codes.md) for status code meanings and possible causes.

A successful response indicates that the request was accepted for processing; it does not guarantee delivery to the recipient.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.