Update Contact
Update an existing contact in Customerscore.io.
For interactive API documentation, see the Swagger reference (opens in a new tab).
Endpoint
| Method | URL |
|---|---|
| PUT | https://api.customerscore.io/api/v1/customer/{customerExternalId}/contact/{contactExternalId} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customerExternalId | string | Yes | Customer external ID |
contactExternalId | string | Yes | Contact external ID |
Request Body
All fields in the request body are optional. Only include the fields you want to update.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated contact name |
attributes | object | No | Attribute values keyed by contact property codename (see below) |
Example Request
curl -X PUT "https://api.customerscore.io/api/v1/customer/12345/contact/C12345" \
-H "Content-Type: application/json" \
-H "customerscore-key: your-generated-key" \
-d '{
"name": "John Smith",
"attributes": {
"job_title": "CTO"
}
}'Attributes
attributes is an object keyed by the codename of a contact attribute, as configured in Contact attributes (opens in a new tab). Only the codenames you send are changed; all other attributes of the contact stay as they are.
Attributes can be updated regardless of their data source — the API always takes precedence. The attribute keeps its data source, so the next sync from that source overwrites the value again.
These are rejected:
- Metrics — metrics are time-series values and are written via the contacts upload endpoint
- Calculated attributes — they are derived from other attributes and are recalculated automatically
- Customer properties — use the customer update endpoint instead
Validation covers the whole request: if any codename is unknown or any value does not match its attribute type, the request fails with 400 and nothing is written. Values use the same formats as the customer update endpoint. Send null to clear a value.
name and attributes.contact_name refer to the same attribute, so sending both with different values is rejected, and contact_name cannot be cleared.
Response Codes
| Code | Description |
|---|---|
| 200 | The contact has been successfully updated |
| 400 | Bad request — malformed body, unknown or ineligible attribute codename, or a value that does not match the attribute type |
| 401 | Unauthorized - Missing customerscore-key in the header |
| 403 | Forbidden - Invalid key |
| 404 | Customer or contact not found |
| 405 | Method Not Allowed - Only PUT method is allowed |
| 406 | Not Acceptable |