Update a contact
SDK platic.clients.update()
Update a contact's profile by ID, phone number or email. Send only the fields you want to change.
Example
curl -X PATCH https://api.platic.ai/v1/clients/5215512345678 \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "tags": ["vip"] }' await platic.clients.update("5215512345678", { tags: ["vip"] }); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
id | string | The contact's ID, their phone number in E.164 format without +, or their email. If two contacts have that email, it answers 409 MULTIPLE_CONTACTS_MATCH: use the ID | ✓ |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | — | Full name of the contact |
firstname | string | — | Contact's first name |
lastname | string | — | Contact's last name |
email | string | — | Contact's email |
birthdate | string | — | Date of birth. Format: dd/mm/yyyy |
gender | enum | — | Gender: male or female |
company | string | — | Company name |
country | enum | — | Country of residence (ISO 3166-1 alpha-2 code) |
state | string | — | State of residence |
city | string | — | City of residence |
address | string | — | Full address |
postalCode | string | — | Postal code |
tags | array | — | Array of tags |
customFields | object | — | Custom fields |
owners | array | — | List of the emails of the responsible users |
status | enum | — | Contact status: active or blocked. See Change the status |
{
"name": "Ana",
"email": "ana@example.com",
"tags": ["vip"],
"customFields": {
"plate": "ABC123",
"reception_id": "REC001"
}
} Update behavior
owners: send a list of email addresses belonging to workspace users.tagsare merged with the existing tags without duplicates.customFieldsare merged with the existing ones.- In
customFields, for a field of typeselectsend theidor the label of an active option (theidis stored); a value that matches no active option returns400, andnullor""clears the value. - A phone number in the path is normalized and kept as the contact's identifier.
emailis stored in lowercase.
Change the status
If you send status, contact moderation also applies: it updates the moderation history and open conversations. The response includes status and conversationsUpdated.
You can combine it with profile fields in the same call.
Tip
This endpoint accepts the contact's ID, phone number or email. If you only want to block or unblock, there is also PATCH /v1/clients/{id}/moderation.
Response
{
"status": "success",
"message": "Client updated successfully",
"data": {
"id": "274fc73cb7d84a17955914fdc1a1f9d0"
}
} Errors
| Status | details.code | When it happens |
|---|---|---|
400 | INVALID_REQUEST | A field is not valid, the body carries an unknown field, an owner email is not a user of the workspace, or a custom field is not defined or a select value matches no active option. details.issues says which |
400 | INVALID_REQUEST | The credential covers several workspaces and ?workspace= is missing, or the supplied workspace is not authorized. details.available lists the available ones and details.requested shows the one you sent |
400 | INVALID_PHONE_NUMBER | The phone number is not valid |
401 | UNAUTHENTICATED | The credential is missing or invalid |
403 | FORBIDDEN | The credential does not have the Contacts module (Missing contacts permission), or the user's role is read-only |
403 | INSUFFICIENT_SCOPE | An OAuth token without the platica:write scope tried to write. details.requiredScope says which one is missing |
404 | CLIENT_NOT_FOUND | No contact in that workspace has that identifier, it was deleted, or it is outside the reach of the user's role |
404 | WORKSPACE_NOT_FOUND | The credential does not carry any workspace |
409 | MULTIPLE_CONTACTS_MATCH | Two contacts have that email: use the ID. details.clientIds lists them |
409 | CONFLICT | The contact's version was not available. Try again |
502 | UPSTREAM_ERROR | The profile write could not be confirmed. Check the contact before retrying |
The general error format is in Errors.