Contact – Change
contact_changeChanges a contact, as editing it in ContactZapp does. Only the fields you send change. A field you leave out keeps its value.
The change goes to every two-way account the contact is in, never to a read-only one. History records it as the user's change and names the API key.
A contact waiting in Review duplicates cannot be changed until the review is decided: 409, contact_pending_review. Send an Idempotency-Key header to make a retry safe.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The contact's `id` or its `publicId` (`CS-0042`). | |
| body | Yes | The body of a contact create or update: the contact fields a read shows that a write can change, under the same names and in the same shapes, and nothing else. A field the body carries that is not one of them is refused with a 400 `unknown_field`, and nothing is written. That includes the read-only `id`, `publicId`, `displayName` and `updatedAt`, so writing back a whole contact as a read returned it answers 400 `unknown_field`: send only the fields you change. A create writes the fields the body carries. An update is change-only: a field the body does not carry keeps its value, a field it carries empty (`""`, `[]`, or a date whose year, month and day are all `0`) is cleared, and a list it carries replaces the stored list. `"birthday": null` clears the birthday too, and a birthday the body does not carry is kept. Fields ContactZapp keeps that a read does not show are never changed by an update. | |
| Idempotency-Key | No | Any string of 1 to 255 bytes you choose for this write, such as a UUID. Repeat the request with the same key and body within 24 hours, and you get the first result back and nothing is written twice. The same key with a different body is a 422. |