Update a contact’s preferences and custom metadata.
Path Parameters
The contact identifier (e.g., con_abc123)
Request
Preferred channel: sms, whatsapp, telegram, rcs, email, or null to clear
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"
}'
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.