Skip to main content
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"
}
Retrieve detailed information about a specific caller’s memory, including their call history.

Request Body

memory_id
string
required
UUID of the memory record

Response

id
string
UUID of the memory record
contact_phone
string
Phone number of the caller
contacts
object
Contact information
  • id - Contact UUID
  • name - Contact name
  • phone_number - Phone number
summary
string
AI-generated relationship summary
key_topics
array
Key topics discussed
preferences
object
Caller preferences
relationship_notes
string
Additional notes about the relationship
interaction_count
integer
Number of voice conversations
sms_interaction_count
integer
Number of SMS interactions
semantic_match_count
integer
Number of semantic memory matches
call_history
array
Recent calls with this contact
  • id - Call record UUID
  • started_at - Call start time
  • duration_seconds - Call duration
  • call_summary - AI summary of call
  • direction - “inbound” or “outbound”
last_updated
string
Last interaction timestamp
created_at
string
When memory was first created
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"
}