List all Chat Messages
curl --request GET \
--url https://api.yourhomie.ai/v1/chats/{chatId}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.yourhomie.ai/v1/chats/{chatId}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.yourhomie.ai/v1/chats/{chatId}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yourhomie.ai/v1/chats/{chatId}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yourhomie.ai/v1/chats/{chatId}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yourhomie.ai/v1/chats/{chatId}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yourhomie.ai/v1/chats/{chatId}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"chatId": "<string>",
"type": "<string>",
"content": "<string>",
"createdAt": "<string>",
"suggestions": [
"<string>"
],
"products": [
{
"gtin": "<string>",
"brand": "<string>",
"designation": "<string>",
"url": "<string>",
"image": "<string>",
"price": 123,
"currency": "<string>",
"priceInfo": "<string>",
"location": [
{
"key": "<string>",
"value": "<string>"
}
],
"availability": {
"status": "<string>",
"quantity": 123
},
"category": "<string>",
"query": "<string>",
"description": "<string>",
"recommendationText": "<string>",
"flags": [
{
"type": "<string>",
"title": "<string>",
"text": "<string>"
}
]
}
]
}
],
"totalItems": 123,
"size": 123,
"totalPages": 123,
"currentPage": 123,
"hasPrevPage": true,
"hasNextPage": true,
"prevPage": 123,
"nextPage": 123
}Messages
List Messages
Page through the message history of a chat.
GET
/
v1
/
chats
/
{chatId}
/
messages
List all Chat Messages
curl --request GET \
--url https://api.yourhomie.ai/v1/chats/{chatId}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.yourhomie.ai/v1/chats/{chatId}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.yourhomie.ai/v1/chats/{chatId}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yourhomie.ai/v1/chats/{chatId}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yourhomie.ai/v1/chats/{chatId}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yourhomie.ai/v1/chats/{chatId}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yourhomie.ai/v1/chats/{chatId}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"chatId": "<string>",
"type": "<string>",
"content": "<string>",
"createdAt": "<string>",
"suggestions": [
"<string>"
],
"products": [
{
"gtin": "<string>",
"brand": "<string>",
"designation": "<string>",
"url": "<string>",
"image": "<string>",
"price": 123,
"currency": "<string>",
"priceInfo": "<string>",
"location": [
{
"key": "<string>",
"value": "<string>"
}
],
"availability": {
"status": "<string>",
"quantity": 123
},
"category": "<string>",
"query": "<string>",
"description": "<string>",
"recommendationText": "<string>",
"flags": [
{
"type": "<string>",
"title": "<string>",
"text": "<string>"
}
]
}
]
}
],
"totalItems": 123,
"size": 123,
"totalPages": 123,
"currentPage": 123,
"hasPrevPage": true,
"hasNextPage": true,
"prevPage": 123,
"nextPage": 123
}Retrieve the messages of a chat as a paginated list, ordered as a conversation history.
Authentication
This request requires your API key in thex-api-key header.
Request
string
required
ID of the chat whose messages you want to list.
Response
object[]
required
The messages on the current page.
Show MessageDto
Show MessageDto
string
required
ID of the message.
string
required
ID of the chat the message belongs to.
string
required
The message type.
string
required
The message text content.
string[]
Optional list of suggested follow-up questions.
object[]
Optional list of recommended products. See Add Message for the full product shape.
string
required
ISO 8601 timestamp of when the message was created.
number
required
Total number of messages across all pages.
number
required
Number of items per page.
number
required
Total number of pages.
number
required
The current page number.
boolean
required
Whether a previous page exists.
boolean
required
Whether a next page exists.
number
The previous page number, or
null if there is none.number
The next page number, or
null if there is none.Examples
curl https://api.yourhomie.ai/v1/chats/ab12cd34-ef56-7890-ab12-cd34ef567890/messages \
-H "x-api-key: homie_sk_live_8f3a..."
const chatId = "ab12cd34-ef56-7890-ab12-cd34ef567890";
const res = await fetch(
`https://api.yourhomie.ai/v1/chats/${chatId}/messages`,
{
headers: {
"x-api-key": "homie_sk_live_8f3a...",
},
},
);
const page = await res.json();
Success response
{
"items": [
{
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"chatId": "ab12cd34-ef56-7890-ab12-cd34ef567890",
"type": "user",
"content": "Do you have a waterproof jacket in blue?",
"createdAt": "2025-10-16T11:45:01.001Z"
},
{
"id": "9b8a7c6d-5e4f-4a3b-9c2d-1e0f2a3b4c5d",
"chatId": "ab12cd34-ef56-7890-ab12-cd34ef567890",
"type": "assistant",
"content": "Yes, here is a waterproof jacket available in blue.",
"createdAt": "2025-10-16T11:45:02.512Z"
}
],
"totalItems": 2,
"size": 20,
"totalPages": 1,
"currentPage": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}
Error response
{
"message": "Chat not found"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
⌘I