List all messages
Returns a list of your messages. The messages are returned sorted by creation date, with the most recently created conversations appearing first.
Parameters
content
string
The content to search for.
expand
array
Array of relationships to expand. Supported values:
author, attachments, conversation.Returns
Return a paginated response that contains an array of up to the specified limit of messages.
get
/api/conversations/{id}/messages
curl https://{workspace}.kitchen.co/api/conversations/{id}/messages \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Authorization: Bearer {API_KEY}'
Response
{
"data": [
{
"author": "u_c01bb6102b6ddadd4b1f020e",
"attachments": [
"fi_081dcab571f6c37d709078ce"
],
"content": "The message content",
"conversation": "convr_1lbg89ha9ttb5dmxuldku3nx",
"created_at": "2024-01-23T23:09:00+00:00",
"format": "text",
"id": "msg_3447589816730d8ba4e50528",
"send_at": null,
"updated_at": "2024-01-23T23:09:00+00:00"
}
],
"links": {
"first": "/api/conversations/{id}/messages?page=1",
"last": "/api/conversations/{id}/messages?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/api/conversations/{id}/messages?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "/api/conversations/{id}/messages",
"per_page": 20,
"to": 1,
"total": 1
}
}