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

# Contextual Reply Message

> Reply to an earlier message in the thread

Send a text message that visually quotes and replies to a specific earlier message in the thread.

## Endpoint

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

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

## Common headers

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

The Bearer token is generated in the CPaaS+ Portal under the API tab. Replace `{Sender Hash}` with the registered sender hash obtained from the WhatsApp channel's Numbers section. The guide says the top-level `to` value should use international format without a leading `+`.

## Parameters

| Parameter | Required | Description from the guide |
| - | - | - |
| `messaging_product` | Yes | Fixed value `"whatsapp"`. |
| `recipient_type` | Optional | Fixed value `"individual"`; default stated in the guide. |
| `to` | Yes | Recipient WhatsApp number, without a leading `+`. |
| `context.message_id` | Yes | The `wamid` of the message being replied to. |
| `type` | Yes | Fixed value `"text"`. |
| `text.body` | Yes | Reply text. |

## Request example

Use the following JSON as the request body. Replace the sender hash, token, recipient, IDs, and example values with values for your integration.

```json theme={null}
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "919373084880",
  "context": {
    "message_id": "wamid.HBgMOTE5MzczMDg0ODgwFQIAERgSN0RDMUZCMEVGRjQ3MDA2ODNDAA=="
  },
  "type": "text",
  "text": { "body": "You're welcome!" }
}
```

## Notes

The `context.message_id` identifies the earlier message that the new text replies to.

## Responses and errors

See [Common HTTP Status Codes](/docs/status-codes.md) for the documented meanings and possible error causes. A success status indicates acceptance for delivery and does not guarantee that the recipient received the message.


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