Skip to main content
PATCH
/
v1
/
contacts
/
{contactId}
Update Contact
curl --request PATCH \
  --url https://api.zavu.dev/v1/contacts/{contactId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "defaultChannel": "<string>",
  "metadata": {}
}'
{
  "id": "con_abc123",
  "phoneNumber": "+56912345678",
  "countryCode": "CL",
  "availableChannels": ["sms", "whatsapp"],
  "defaultChannel": "sms",
  "verified": true,
  "metadata": {
    "name": "John Doe",
    "customerId": "cus_123",
    "tier": "premium"
  },
  "createdAt": "2024-01-15T10:00:00.000Z",
  "updatedAt": "2024-01-16T14:30:00.000Z"
}
Update a contact’s preferences and custom metadata.

Path Parameters

contactId
string
required
The contact identifier (e.g., con_abc123)

Request

defaultChannel
string
Preferred channel: sms, whatsapp, telegram, rcs, email, or null to clear
metadata
object
Custom key-value pairs. Replaces existing metadata.

Response

{
  "id": "con_abc123",
  "phoneNumber": "+56912345678",
  "countryCode": "CL",
  "availableChannels": ["sms", "whatsapp"],
  "defaultChannel": "sms",
  "verified": true,
  "metadata": {
    "name": "John Doe",
    "customerId": "cus_123",
    "tier": "premium"
  },
  "createdAt": "2024-01-15T10:00:00.000Z",
  "updatedAt": "2024-01-16T14:30:00.000Z"
}

Examples

Set preferred channel

curl -X PATCH https://api.zavu.dev/v1/contacts/con_abc123 \
  -H "Authorization: Bearer zv_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "defaultChannel": "sms"
  }'

Update metadata

curl -X PATCH https://api.zavu.dev/v1/contacts/con_abc123 \
  -H "Authorization: Bearer zv_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "name": "John Doe",
      "customerId": "cus_123",
      "tier": "premium"
    }
  }'
Contacts are automatically created when you send a message to a new phone number. Use this endpoint to enrich contact data.