Update a contact
Updates a contact's default channel and/or opt-out status. Inherited contacts cannot be updated.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "https://api.sent.dm/v3/contacts/6ba7b810-9dad-11d1-80b4-00c04fd430c8" \ -H "Idempotency-Key: req_abc123_retry1" \ -H "Content-Type: application/json" \ -d '{ "default_channel": "whatsapp", "opt_out": false, "sandbox": false }'{
"success": true,
"data": {
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"phone_number": "+1234567890",
"format_e164": "+1234567890",
"format_international": "+1 234-567-890",
"format_national": "(234) 567-890",
"format_rfc": "tel:+1-234-567-890",
"country_code": "1",
"region_code": "US",
"available_channels": "sms,whatsapp",
"default_channel": "whatsapp",
"opt_out": false,
"is_inherited": false,
"created_at": "2026-03-01T15:21:52.1937187+00:00",
"updated_at": "2026-03-31T15:21:52.1937208+00:00"
},
"error": null,
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-31T15:21:52.1937215+00:00",
"version": "v3"
}
}{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_001",
"message": "This contact is read-only and cannot be updated.",
"details": null,
"doc_url": "https://docs.sent.dm/docs/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-31T15:21:52.1937231+00:00",
"version": "v3"
}
}Empty
Empty
{
"success": false,
"data": null,
"error": {
"code": "RESOURCE_001",
"message": "Contact not found",
"details": null,
"doc_url": "https://docs.sent.dm/docs/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-31T15:21:52.1937236+00:00",
"version": "v3"
}
}{
"success": false,
"data": null,
"error": {
"code": "INTERNAL_001",
"message": "An unexpected error occurred. Please contact support with request ID: req_7X9zKp2jDw",
"details": null,
"doc_url": "https://docs.sent.dm/docs/reference/api/error-catalog"
},
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-31T15:21:52.1937241+00:00",
"version": "v3"
}
}