Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
get-contact
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/get-contact \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"phone_number": "+14155551234"}'
{
  "id": "c1d2e3f4-5678-9abc-def0-123456789abc",
  "phone_number": "+14155551234",
  "name": "John Smith",
  "email": "[email protected]",
  "company": "Acme Corp",
  "notes": "Prefers morning appointments",
  "tags": ["customer", "vip"],
  "metadata": {
    "customer_id": "cust_123"
  },
  "stats": {
    "total_calls": 5,
    "total_messages": 12,
    "last_contact": "2024-01-15T10:30:00Z"
  },
  "created_at": "2024-01-10T10:00:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}
Get detailed information about a contact including their conversation history summary.

Request Body

Provide either contact_id or phone_number:
contact_id
string
The unique contact identifier.
phone_number
string
The contact’s phone number in E.164 format.

Response

id
string
Unique contact identifier.
phone_number
string
Contact’s phone number.
name
string
Contact’s name.
email
string
Contact’s email.
company
string
Contact’s company.
notes
string
Internal notes.
tags
array
Contact tags.
metadata
object
Custom metadata.
stats
object
Conversation statistics:
  • total_calls: Number of calls
  • total_messages: Number of SMS messages
  • last_contact: Last interaction time
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/get-contact \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"phone_number": "+14155551234"}'
{
  "id": "c1d2e3f4-5678-9abc-def0-123456789abc",
  "phone_number": "+14155551234",
  "name": "John Smith",
  "email": "[email protected]",
  "company": "Acme Corp",
  "notes": "Prefers morning appointments",
  "tags": ["customer", "vip"],
  "metadata": {
    "customer_id": "cust_123"
  },
  "stats": {
    "total_calls": 5,
    "total_messages": 12,
    "last_contact": "2024-01-15T10:30:00Z"
  },
  "created_at": "2024-01-10T10:00:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}