Appearance
List messages
Paginated message history for one conversation, newest first. Useful for rehydrating a chat window, or reconciling if a callback was missed. Look up the conversation using either conversation_id or contact_id as a query parameter.
GET {api}/user/messages/webchat?conversation_id={conversation_id}
Authorization: Basic base64(client_id:client_secret)By conversation ID:
bash
curl "https://api.genudo.ai/api/user/messages/webchat?conversation_id=221416&per_page=10" \
-u "wc_YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-H "Accept: application/json"By contact ID:
bash
curl "https://api.genudo.ai/api/user/messages/webchat?contact_id=user-abc-123&per_page=10" \
-u "wc_YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-H "Accept: application/json"Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
conversation_id | query | integer | If contact_id is omitted | Conversation ID returned by Initiate |
contact_id | query | string | If conversation_id is omitted | Chat/session ID returned by Initiate |
per_page | query | integer | no | Default 10 |
page | query | integer | no | Standard Laravel pagination |
Provide at least one of conversation_id or contact_id. If both are supplied, contact_id takes precedence.
Contact ID
Use the exact contact_id returned by Initiate, such as user-abc-123. The lookup is scoped to the channel associated with your client credentials.
Response
json
{
"status": true,
"code": 200,
"validation": [],
"message": "Messages List",
"data": {
"current_page": 1,
"data": [
{
"role": "assistant",
"message": "Yes — we ship to Cairo within 3 business days.",
"status": "sent",
"files": [],
"conversation_id": 221416,
"opportunity_id": 231979,
"error": null,
"sender_id": null,
"id": "6a9d558f78769aef13054e63"
},
{
"role": "user",
"message": "Hi, do you ship to Cairo?",
"status": "received",
"files": [],
"conversation_id": 221416,
"opportunity_id": 231979,
"error": null,
"sender_id": null,
"id": "6a9d558f78769aef13054e62"
}
],
"per_page": 10,
"total": 2,
"last_page": 1,
"from": 1,
"to": 2,
"next_page_url": null,
"prev_page_url": null
}
}| Field | Description |
|---|---|
role | user for customer messages, assistant for AI replies |
status | Delivery state, e.g. received, sent, failed |
files | Attachments — path, mimetype, type, size, name |
error | Populated when the AI or delivery failed |
Errors
| Code | Message |
|---|---|
401 | Invalid client credentials |
403 | Unauthorized — no matching conversation was found, or it does not belong to this channel |
422 | Validation error — neither conversation_id nor contact_id was provided |
422 | This endpoint is only available for web channels. |
TIP
A missing conversation and a conversation that belongs to another channel both return 403 Unauthorized, so the response does not reveal whether the id exists.