List Recent Messages
curl --request GET \
--url https://api.bland.ai/v1/memory/contact/{memory_id}/messages \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/memory/contact/{memory_id}/messages"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/memory/contact/{memory_id}/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.bland.ai/v1/memory/contact/{memory_id}/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: <authorization>"
],
]);
$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.bland.ai/v1/memory/contact/{memory_id}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v1/memory/contact/{memory_id}/messages")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/memory/contact/{memory_id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"role": "user",
"content": "Hi, I'm calling about my order",
"channel": "call",
"timestamp": "2025-07-22T10:30:00.000Z"
},
{
"role": "assistant",
"content": "I'd be happy to help you with your order. Can you provide your order number?",
"channel": "call",
"timestamp": "2025-07-22T10:30:05.000Z"
},
{
"role": "user",
"content": "It's order #12345",
"channel": "sms",
"timestamp": "2025-07-22T11:00:00.000Z"
}
],
"errors": null
}
{
"data": [],
"errors": null
}
Memory
List Recent Messages
Retrieve the recent message history for a contact memory. Returns cross-channel messages (voice and SMS) in chronological order.
GET
/
v1
/
memory
/
contact
/
{memory_id}
/
messages
List Recent Messages
curl --request GET \
--url https://api.bland.ai/v1/memory/contact/{memory_id}/messages \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/memory/contact/{memory_id}/messages"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/memory/contact/{memory_id}/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.bland.ai/v1/memory/contact/{memory_id}/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: <authorization>"
],
]);
$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.bland.ai/v1/memory/contact/{memory_id}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v1/memory/contact/{memory_id}/messages")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/memory/contact/{memory_id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"role": "user",
"content": "Hi, I'm calling about my order",
"channel": "call",
"timestamp": "2025-07-22T10:30:00.000Z"
},
{
"role": "assistant",
"content": "I'd be happy to help you with your order. Can you provide your order number?",
"channel": "call",
"timestamp": "2025-07-22T10:30:05.000Z"
},
{
"role": "user",
"content": "It's order #12345",
"channel": "sms",
"timestamp": "2025-07-22T11:00:00.000Z"
}
],
"errors": null
}
{
"data": [],
"errors": null
}
Headers
Your API key for authentication.
Path Parameters
The unique identifier of the contact memory record.
Response
Array of recent messages.
Message role: “user” or “assistant”.
Message content.
Channel the message came from: “call” or “sms”.
ISO timestamp when the message was recorded.
Error array (null on success).
{
"data": [
{
"role": "user",
"content": "Hi, I'm calling about my order",
"channel": "call",
"timestamp": "2025-07-22T10:30:00.000Z"
},
{
"role": "assistant",
"content": "I'd be happy to help you with your order. Can you provide your order number?",
"channel": "call",
"timestamp": "2025-07-22T10:30:05.000Z"
},
{
"role": "user",
"content": "It's order #12345",
"channel": "sms",
"timestamp": "2025-07-22T11:00:00.000Z"
}
],
"errors": null
}
{
"data": [],
"errors": null
}
Docs for agents: llms.txt
Was this page helpful?
⌘I