Skip to main content
GET
https://api.bland.ai
/
v1
/
memory
/
context
Get Memory Context
curl --request GET \
  --url https://api.bland.ai/v1/memory/context \
  --header 'authorization: <authorization>'
{
  "data": {
    "contact_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "recentMessages": [
      {
        "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"
      }
    ],
    "summary": "Customer inquired about order status. Order #12345 is in transit, expected delivery July 25.",
    "contactFacts": {
      "name": "John Doe",
      "preferred_contact": "phone",
      "timezone": "EST"
    },
    "entities": [],
    "openItems": []
  },
  "errors": null
}

Headers

authorization
string
required
Your API key for authentication.

Query Parameters

contact_id
string
required
The unique identifier of the contact.
persona_id
string
The persona ID for memory scoping. Either persona_id or agent_number is required.
agent_number
string
The agent phone number for memory scoping. Either persona_id or agent_number is required.

Response

data
object
The memory context object.
data.contact_id
string
The contact ID this memory belongs to.
data.recentMessages
array
Array of recent messages from the sliding window (cross-channel).
data.recentMessages[].role
string
Message role: “user” or “assistant”.
data.recentMessages[].content
string
Message content.
data.recentMessages[].channel
string
Channel the message came from: “call” or “sms”.
data.recentMessages[].timestamp
string
ISO timestamp when the message was recorded.
data.summary
string
Rolling summary of interactions with this contact.
data.contactFacts
object
Structured facts about the contact (key-value pairs).
data.entities
array
Array of extracted entities associated with this contact.
data.openItems
array
Array of open items or pending tasks for this contact.
errors
null
Error array (null on success).
{
  "data": {
    "contact_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "recentMessages": [
      {
        "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"
      }
    ],
    "summary": "Customer inquired about order status. Order #12345 is in transit, expected delivery July 25.",
    "contactFacts": {
      "name": "John Doe",
      "preferred_contact": "phone",
      "timezone": "EST"
    },
    "entities": [],
    "openItems": []
  },
  "errors": null
}