API
API Reference
Contacts
Update Contact

Update Contact

Update an existing contact in Customerscore.io.

For interactive API documentation, see the Swagger reference (opens in a new tab).

Endpoint

MethodURL
PUThttps://api.customerscore.io/api/v1/customer/{customerExternalId}/contact/{contactExternalId}

Path Parameters

ParameterTypeRequiredDescription
customerExternalIdstringYesCustomer external ID
contactExternalIdstringYesContact external ID

Request Body

All fields in the request body are optional. Only include the fields you want to update.

FieldTypeRequiredDescription
namestringNoUpdated contact name
attributesobjectNoAttribute 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

CodeDescription
200The contact has been successfully updated
400Bad request — malformed body, unknown or ineligible attribute codename, or a value that does not match the attribute type
401Unauthorized - Missing customerscore-key in the header
403Forbidden - Invalid key
404Customer or contact not found
405Method Not Allowed - Only PUT method is allowed
406Not Acceptable