POST
/
v1
/
memory
/
{memory_id}
/
add-user
Add User to Memory
curl --request POST \
  --url https://api.bland.ai/v1/memory/{memory_id}/add-user \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "phone_number": "<string>",
  "metadata": "<string>",
  "summary": "<string>",
  "external_memory_key": "<string>"
}'
{
  "phone_number": "+12345678900",
  "metadata": "25 year old customer",
  "summary": "The user described their age"
}

Headers

authorization
string
required
Your API key for authentication.

Path Parameters

memory_id
string
required
The unique identifier of the memory to add the user to.

Body Parameters

phone_number
string
required
The phone number of the user to add to the memory.
metadata
string
Custom metadata text to associate with this user in the memory.
summary
string
Initial summary text for this user’s interactions.
external_memory_key
string
Optional external key for additional memory validation or cross-referencing.

Response

data
object
Response data confirming user addition.
data.message
string
Success message confirming user was added to memory.
data.user
object
The user object that was added to the memory.
data.user.id
string
Unique identifier for the user entry in the memory.
data.user.memory_id
string
The memory identifier this user was added to.
data.user.phone_number
string
The phone number that was added.
data.user.metadata
string
The metadata text associated with this user.
data.user.summary
string
The summary text for this user.
data.user.created_at
string
ISO timestamp when this user was added to the memory.
data.user.call_count
number
Number of calls associated with this user.
data.user.last_call_at
string|null
ISO timestamp of the most recent call, or null if no calls yet.
errors
null
Error array (null on success).
{
  "phone_number": "+12345678900",
  "metadata": "25 year old customer",
  "summary": "The user described their age"
}

Notes

  • If the phone number already exists in the memory, this endpoint will error with a MEMORY_ADD_USER_ERROR
  • Metadata can be any text string relevant to your use case
  • The summary will be enhanced over time as more calls are added to this user’s record