| Parameter | Type | Required | Description |
|---|---|---|---|
mobile | string | Yes | Contact's mobile number (must match an existing chat conversation) |
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
comment | string | Yes | Max 5000 chars | The internal note text. Supports plain text and HTML. |
status_message | string | No | Max 255 chars | Short label for the note. Defaults to "Internal comment". |
media_url | string | No | Must be a valid URL | Publicly accessible media file URL. Downloaded and stored by the module. Supports images, audio, video, documents. |
message_id | string | No | Max 255 chars | The WhatsApp wamid.* of this comment/note itself. Stored for external reference. |
ref_message_id | string | No | Max 255 chars | The WhatsApp wamid.* of the past message being replied to. Threads the note against a specific WhatsApp message. |
| Field | Type | Description |
|---|---|---|
success | boolean | true on success |
message | string | "Comment added successfully" |
tenant_id | integer | Resolved tenant ID |
interaction_id | integer | Chat conversation ID |
sender_id | string | Sender phone number (tenant default WhatsApp number) |
status_message | string | The status label saved |
url | string|null | Stored media filename (if media_url was provided and downloaded) |
message_id | string|null | Echoed back from request |
ref_message_id | string|null | Echoed back from request |
chat_message_id | integer | DB row ID of the newly created internal note |
| Status | Description |
|---|---|
| 401 | Token missing or invalid |
| 404 | Chat conversation not found for the given mobile number |
| 422 | Validation failed (see errors object in response) |
| 500 | Chat tables not initialized for tenant |
curl --location --request POST '/comments/919876543210' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"comment": "<strong>FEES PAYMENTS | Coming Soon</strong>\nThe fee payment system is currently under development.",
"status_message": "Sent payment request",
"message_id": "wamid.qwertyuiop1234567890",
"ref_message_id": "wamid.zxcvbnmasdfghjkl0987654321",
"media_url": "https://example.com/path/to/attachment.jpg"
}'{
"success": true,
"message": "Comment added successfully",
"tenant_id": 1,
"interaction_id": 1,
"sender_id": "912233445566",
"status_message": "Sent payment request",
"url": null,
"message_id": "wamid.qwertyuiop1234567890",
"ref_message_id": null,
"chat_message_id": 1
}