Skip to content

Patch Customer

Required scope: customer:write

Use this endpoint to update a customer’s editable top-level fields. It performs a partial update, so only the fields you supply change.

Patch semantics:

  • title: omit to leave unchanged; send a new value to replace it.
  • expectedCloseDate: a Unix timestamp in seconds. Omit to leave unchanged, or set clearExpectedCloseDate to true to remove the current value.
  • assigneeIds: a nonempty list of member IDs replaces the current assignees. An omitted or empty list preserves them unless clearAssignees is true. A nonempty list takes precedence over clearAssignees.
  • teamIds: a nonempty list of team IDs replaces the current teams. An omitted or empty list preserves them unless clearTeams is true. A nonempty list takes precedence over clearTeams.

Custom data fields are not modified here. Use Patch Customer Data Fields for those.

This operation is not idempotent and must not be blindly retried. The response is the updated customer, projected to the fields the API key can see.

Generated Reference
POST /public-api/publicapi.v1.Customer/PatchCustomer

Updates a customer's editable top-level fields. Only supplied fields change: omit a field to preserve it. Assignee and team lists replace the current assignments when nonempty; send the matching clear flag to remove all assignees or teams. A nonempty list takes precedence over its clear flag. Custom data fields are not modified here; use PatchCustomerDataFields for those. This operation is not idempotent and must not be blindly retried.

Request PatchCustomerRequest
Response PatchCustomerResponse

PatchCustomerRequest

Field Type Description
id string Customer to update.
title optional string New title. Omit to leave the title unchanged.
expected_close_date optional int64 New expected close date as a Unix timestamp in seconds. Omit to leave it unchanged; set clear_expected_close_date to remove the current value.
clear_expected_close_date bool Remove the customer's expected close date. Ignored when expected_close_date is supplied.
assignee_ids repeated string Member IDs to assign to the customer. A nonempty list replaces the current assignees. An empty or omitted list preserves them unless clear_assignees is set. A nonempty list takes precedence over clear_assignees.
clear_assignees bool Remove all assignees. Ignored when assignee_ids is nonempty.
team_ids repeated string Team IDs to assign to the customer. A nonempty list replaces the current teams. An empty or omitted list preserves them unless clear_teams is set. A nonempty list takes precedence over clear_teams.
clear_teams bool Remove all teams. Ignored when team_ids is nonempty.

PatchCustomerResponse

Field Type Description
customer Customer The customer after the update, projected to the fields the API key can see.
{
"id": "be85f4d1-b680-4964-bf62-9828fdf4ce04",
"title": "Solar installation - phase 2",
"expectedCloseDate": 1735689600,
"assigneeIds": [
"7fbbcbb2-c6d1-4b71-9864-d217494b6ef0"
],
"teamIds": [],
"clearTeams": true
}
Terminal window
curl https://portal.heyx.app/public-api/publicapi.v1.Customer/PatchCustomer \
-H "Authorization: Bearer hx_sk_..." \
-H "Content-Type: application/json" \
-d '{
"id": "be85f4d1-b680-4964-bf62-9828fdf4ce04",
"title": "Solar installation - phase 2",
"assigneeIds": ["7fbbcbb2-c6d1-4b71-9864-d217494b6ef0"]
}'
{
"customer": {
"id": "be85f4d1-b680-4964-bf62-9828fdf4ce04",
"title": "Solar installation - phase 2",
"customFields": {
"source": "erp"
},
"referenceNumber": "P-000456"
}
}