Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
create-contact
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/create-contact \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14155551234",
    "name": "John Smith",
    "email": "[email protected]",
    "company": "Acme Corp",
    "tags": ["customer", "vip"]
  }'
{
  "id": "c1d2e3f4-5678-9abc-def0-123456789abc",
  "phone_number": "+14155551234",
  "name": "John Smith",
  "email": "[email protected]",
  "company": "Acme Corp",
  "notes": null,
  "tags": ["customer", "vip"],
  "metadata": {},
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}
Create a new contact for managing caller information and conversation history.

Request Body

phone_number
string
required
Contact’s phone number in E.164 format.Example: +14155551234
name
string
Contact’s full name.Example: John Smith
email
string
Contact’s email address.Example: [email protected]
company
string
Contact’s company or organization.Example: Acme Corp
notes
string
Internal notes about the contact.Example: Prefers morning appointments
tags
array
Array of tags for categorization.Example: ["customer", "vip"]
metadata
object
Custom key-value pairs for your reference.
{
  "customer_id": "cust_123",
  "source": "website"
}

Response

Returns the created contact object.
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.
created_at
string
When the contact was created.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/create-contact \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14155551234",
    "name": "John Smith",
    "email": "[email protected]",
    "company": "Acme Corp",
    "tags": ["customer", "vip"]
  }'
{
  "id": "c1d2e3f4-5678-9abc-def0-123456789abc",
  "phone_number": "+14155551234",
  "name": "John Smith",
  "email": "[email protected]",
  "company": "Acme Corp",
  "notes": null,
  "tags": ["customer", "vip"],
  "metadata": {},
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}