curl -X POST "https://api.magpipe.ai/functions/v1/list-memories" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"limit": 50,
"offset": 0
}'
{
"memories": [
{
"id": "789e0123-e89b-12d3-a456-426614174000",
"contact_phone": "+14155551234",
"contacts": {
"id": "abc12345-e89b-12d3-a456-426614174000",
"name": "Sarah Johnson",
"phone_number": "+14155551234"
},
"summary": "Regular customer who had delivery issues with order #4521. Issue was resolved. Prefers email follow-ups.",
"key_topics": ["orders", "delivery", "refunds"],
"preferences": {
"contact_method": "email",
"best_time": "afternoons"
},
"relationship_notes": null,
"interaction_count": 3,
"sms_interaction_count": 0,
"semantic_match_count": 1,
"last_updated": "2024-01-15T14:30:00Z"
}
],
"total": 1,
"has_more": false
}
Memory
List Memories
List all caller memories for an agent
POST
/
list-memories
curl -X POST "https://api.magpipe.ai/functions/v1/list-memories" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"limit": 50,
"offset": 0
}'
{
"memories": [
{
"id": "789e0123-e89b-12d3-a456-426614174000",
"contact_phone": "+14155551234",
"contacts": {
"id": "abc12345-e89b-12d3-a456-426614174000",
"name": "Sarah Johnson",
"phone_number": "+14155551234"
},
"summary": "Regular customer who had delivery issues with order #4521. Issue was resolved. Prefers email follow-ups.",
"key_topics": ["orders", "delivery", "refunds"],
"preferences": {
"contact_method": "email",
"best_time": "afternoons"
},
"relationship_notes": null,
"interaction_count": 3,
"sms_interaction_count": 0,
"semantic_match_count": 1,
"last_updated": "2024-01-15T14:30:00Z"
}
],
"total": 1,
"has_more": false
}
Retrieve all stored conversation memories for a specific agent. Each memory represents the relationship with a unique caller.
Request Body
Response
Returns an object with an array of memory records and pagination info.Contact information
id- Contact UUIDname- Contact namephone_number- Phone number in E.164 format
curl -X POST "https://api.magpipe.ai/functions/v1/list-memories" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"limit": 50,
"offset": 0
}'
{
"memories": [
{
"id": "789e0123-e89b-12d3-a456-426614174000",
"contact_phone": "+14155551234",
"contacts": {
"id": "abc12345-e89b-12d3-a456-426614174000",
"name": "Sarah Johnson",
"phone_number": "+14155551234"
},
"summary": "Regular customer who had delivery issues with order #4521. Issue was resolved. Prefers email follow-ups.",
"key_topics": ["orders", "delivery", "refunds"],
"preferences": {
"contact_method": "email",
"best_time": "afternoons"
},
"relationship_notes": null,
"interaction_count": 3,
"sms_interaction_count": 0,
"semantic_match_count": 1,
"last_updated": "2024-01-15T14:30:00Z"
}
],
"total": 1,
"has_more": false
}