curl -X POST "https://api.magpipe.ai/functions/v1/get-memory" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"memory_id": "789e0123-e89b-12d3-a456-426614174000"
}'
{
"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 with a refund. Prefers email follow-ups.",
"key_topics": ["orders", "delivery", "refunds"],
"preferences": {
"contact_method": "email",
"best_time": "afternoons"
},
"relationship_notes": "VIP customer - escalate issues to manager if needed",
"interaction_count": 3,
"sms_interaction_count": 0,
"semantic_match_count": 1,
"call_history": [
{
"id": "call-001",
"started_at": "2024-01-15T14:30:00Z",
"duration_seconds": 245,
"call_summary": "Customer called to confirm refund was processed. Confirmed and thanked for patience.",
"direction": "inbound"
},
{
"id": "call-002",
"started_at": "2024-01-10T11:00:00Z",
"duration_seconds": 420,
"call_summary": "Customer reported missing package for order #4521. Initiated refund.",
"direction": "inbound"
}
],
"last_updated": "2024-01-15T14:30:00Z",
"created_at": "2024-01-05T09:00:00Z"
}
{
"error": {
"code": "not_found",
"message": "Memory not found"
}
}
Memory
Get Memory
Get a specific caller memory by ID
POST
/
get-memory
curl -X POST "https://api.magpipe.ai/functions/v1/get-memory" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"memory_id": "789e0123-e89b-12d3-a456-426614174000"
}'
{
"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 with a refund. Prefers email follow-ups.",
"key_topics": ["orders", "delivery", "refunds"],
"preferences": {
"contact_method": "email",
"best_time": "afternoons"
},
"relationship_notes": "VIP customer - escalate issues to manager if needed",
"interaction_count": 3,
"sms_interaction_count": 0,
"semantic_match_count": 1,
"call_history": [
{
"id": "call-001",
"started_at": "2024-01-15T14:30:00Z",
"duration_seconds": 245,
"call_summary": "Customer called to confirm refund was processed. Confirmed and thanked for patience.",
"direction": "inbound"
},
{
"id": "call-002",
"started_at": "2024-01-10T11:00:00Z",
"duration_seconds": 420,
"call_summary": "Customer reported missing package for order #4521. Initiated refund.",
"direction": "inbound"
}
],
"last_updated": "2024-01-15T14:30:00Z",
"created_at": "2024-01-05T09:00:00Z"
}
{
"error": {
"code": "not_found",
"message": "Memory not found"
}
}
Retrieve detailed information about a specific caller’s memory, including their call history.
Request Body
Response
Recent calls with this contact
id- Call record UUIDstarted_at- Call start timeduration_seconds- Call durationcall_summary- AI summary of calldirection- “inbound” or “outbound”
curl -X POST "https://api.magpipe.ai/functions/v1/get-memory" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"memory_id": "789e0123-e89b-12d3-a456-426614174000"
}'
{
"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 with a refund. Prefers email follow-ups.",
"key_topics": ["orders", "delivery", "refunds"],
"preferences": {
"contact_method": "email",
"best_time": "afternoons"
},
"relationship_notes": "VIP customer - escalate issues to manager if needed",
"interaction_count": 3,
"sms_interaction_count": 0,
"semantic_match_count": 1,
"call_history": [
{
"id": "call-001",
"started_at": "2024-01-15T14:30:00Z",
"duration_seconds": 245,
"call_summary": "Customer called to confirm refund was processed. Confirmed and thanked for patience.",
"direction": "inbound"
},
{
"id": "call-002",
"started_at": "2024-01-10T11:00:00Z",
"duration_seconds": 420,
"call_summary": "Customer reported missing package for order #4521. Initiated refund.",
"direction": "inbound"
}
],
"last_updated": "2024-01-15T14:30:00Z",
"created_at": "2024-01-05T09:00:00Z"
}
{
"error": {
"code": "not_found",
"message": "Memory not found"
}
}