Update a contact
update_contactUpdate a contact
Changes the fields you send. Email and the platform ids are how Mojeeb recognises the person, so they are read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| mobile | No | A valid number in E.164 (`+201001234567`), or an empty string to clear it. Change it only to correct a wrong number: a WhatsApp message from the old number no longer matches this contact. | |
| status | No | ||
| agent_id | Yes | The agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`. | |
| contact_id | Yes | A contact of the agent. Another agent's contact is `404 not_found`. | |
| custom_fields | No | Free-form fields keyed by name, stored as sent (see Partial updates in the API description for how date-time strings and decimals are normalized). For a lead, use the keys of the agent's own lead fields (`listLeadFields`, `built_in: false`), and the whole object is limited to about 10,000 characters of JSON (`422 invalid_request` beyond). Mojeeb doesn't check keys or values against the fields' `type`, `options` or `required`. On update the object merges key by key, and a key sent as `null` stays with the value `null`. |