Skip to main content
POST
https://api.bland.ai
/
v1
/
memory
/
contact
Create Contact Memory
curl --request POST \
  --url https://api.bland.ai/v1/memory/contact \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "contact_id": "<string>",
  "persona_id": "<string>",
  "agent_number": "<string>"
}
'
{
  "data": {
    "memory": {
      "id": "mem-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "org_id": "11111111-2222-3333-4444-555555555555",
      "contact_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "persona_id": "persona-12345678",
      "agent_number": null,
      "summary": null,
      "facts": {},
      "recent_messages": [],
      "open_items": [],
      "memory_history": [],
      "created_at": "2025-07-22T10:30:00.000Z",
      "updated_at": "2025-07-22T10:30:00.000Z"
    },
    "created": true
  },
  "errors": null
}

Headers

authorization
string
required
Your API key for authentication.

Body 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
Response containing the memory and creation status.
data.memory
object
The contact memory object.
data.memory.id
string
Unique identifier for the contact memory.
data.memory.org_id
string
Organization ID this memory belongs to.
data.memory.contact_id
string
Contact ID this memory is associated with.
data.memory.persona_id
string
Persona ID this memory is scoped to (null if agent-based).
data.memory.agent_number
string
Agent phone number this memory is scoped to (null if persona-based).
data.memory.summary
string
Rolling summary (empty for new memories).
data.memory.facts
object
Structured facts (empty object for new memories).
data.memory.recent_messages
array
Recent messages array (empty for new memories).
data.created
boolean
Whether a new memory was created (true) or an existing one was returned (false).
errors
null
Error array (null on success).
{
  "data": {
    "memory": {
      "id": "mem-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "org_id": "11111111-2222-3333-4444-555555555555",
      "contact_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "persona_id": "persona-12345678",
      "agent_number": null,
      "summary": null,
      "facts": {},
      "recent_messages": [],
      "open_items": [],
      "memory_history": [],
      "created_at": "2025-07-22T10:30:00.000Z",
      "updated_at": "2025-07-22T10:30:00.000Z"
    },
    "created": true
  },
  "errors": null
}