Skip to main content

Update Contact

PUT PATCH /public/action/contacts/update

Updates an existing contact, identified by id in the request body. Use PATCH to change a few fields (partial merge) or PUT to replace the whole record.

Authentication: X-API-KEY header (see Authentication).

PUT is a full replace

With PUT, fields you omit are overwritten. Fetch the current contact with Search Contacts first, modify it, then PUT the complete object back. For a few fields, use PATCH instead. id is required for both; accountId is forced to your workspace.

Request body

The full Contact object. Key fields:

FieldTypeDescription
idstringRequired. Id of the contact to update.
clientIdstringId of the client this contact belongs to.
firstName, lastNamestringContact name.
rolestringJob title / role.
email, phone, mobilestringContact details.
notesstringFree-text notes.
defaultContactbooleanWhether this is the client's default contact.
invoiceContactbooleanInclude this contact on invoices.
portalAccessbooleanGrant client-portal access.
customValuesCustomValue[]Custom-field values (fieldId, mappingKey, fieldName, value, type).

Request

curl -X PUT https://api.withmoxie.com/public/action/contacts/update \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"id": "66b0f3b2c3a9e40012ab5500",
"clientId": "66b0f2a1c3a9e40012ab34cd",
"firstName": "Jane",
"lastName": "Doe",
"role": "Billing",
"email": "jane@acme.example",
"phone": "+36 1 234 5678",
"invoiceContact": true,
"portalAccess": true
}'

Response

Returns the updated Contact object.

{
"id": "66b0f3b2c3a9e40012ab5500",
"accountId": 10016,
"clientId": "66b0f2a1c3a9e40012ab34cd",
"firstName": "Jane",
"lastName": "Doe",
"role": "Billing",
"email": "jane@acme.example",
"phone": "+36 1 234 5678",
"defaultContact": false,
"invoiceContact": true,
"portalAccess": true,
"customValues": []
}

Partial update (PATCH)

Send only the fields to change, plus id:

curl -X PATCH https://api.withmoxie.com/public/action/contacts/update \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"id": "66b0f3b2c3a9e40012ab5500",
"role": "Head of Finance",
"invoiceContact": true
}'

Returns the full updated Contact object with only role and invoiceContact changed.

Errors

StatusMeaning
412 Precondition Failedid was missing from the body.
404 / Not FoundNo contact with that id exists in your workspace.