Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
update-contact
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/update-contact \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_id": "c1d2e3f4-5678-9abc-def0-123456789abc",
    "notes": "Prefers afternoon appointments",
    "add_tags": ["premium"]
  }'
{
  "id": "c1d2e3f4-5678-9abc-def0-123456789abc",
  "phone_number": "+14155551234",
  "name": "John Smith",
  "email": "[email protected]",
  "company": "Acme Corp",
  "notes": "Prefers afternoon appointments",
  "tags": ["customer", "vip", "premium"],
  "updated_at": "2024-01-16T09:00:00Z"
}
Update any fields for an existing contact. Only include fields you want to change.

Request Body

contact_id
string
required
The unique identifier of the contact to update.
name
string
Updated name.
email
string
Updated email.
company
string
Updated company.
notes
string
Updated notes.
tags
array
Updated tags (replaces existing tags).
add_tags
array
Tags to add (appends to existing tags).
remove_tags
array
Tags to remove.
metadata
object
Metadata to merge (existing keys are overwritten, new keys are added).

Response

Returns the updated contact object.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/update-contact \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_id": "c1d2e3f4-5678-9abc-def0-123456789abc",
    "notes": "Prefers afternoon appointments",
    "add_tags": ["premium"]
  }'
{
  "id": "c1d2e3f4-5678-9abc-def0-123456789abc",
  "phone_number": "+14155551234",
  "name": "John Smith",
  "email": "[email protected]",
  "company": "Acme Corp",
  "notes": "Prefers afternoon appointments",
  "tags": ["customer", "vip", "premium"],
  "updated_at": "2024-01-16T09:00:00Z"
}