Update Contact
Update an existing contact's information.
Recommended: Use Publishable Keys
For contact management operations, we recommend using publishable keys instead of secret API keys. Publishable keys have limited permissions and can safely be used in client-side applications.
Endpoint
PATCH /api/v1/contacts/external/{external_id}
Headers
X-API-Key: sk_live_your_api_key
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
external_id | string | Yes | Your internal ID for this contact (your user, from your system) |
Request Body
All fields are optional. Only provided fields will be updated.
Example Request
curl -X PATCH https://api.sendmator.com/api/v1/contacts/external/user-123 \
-H "X-API-Key: sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jonathan",
"tags": ["customer", "vip", "enterprise"],
"custom_fields": {
"job_title": "Engineering Manager",
"lead_score": 95
}
}'
Example Response
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"external_id": "user-123",
"email": "john.doe@example.com",
"first_name": "Jonathan",
"last_name": "Doe",
"tags": ["customer", "vip", "enterprise"],
"is_active": true,
"custom_fields": {
"company": "Acme Corp",
"job_title": "Engineering Manager",
"lead_score": 95
},
"updated_at": "2024-01-15T11:45:00.000Z"
}