Add or update a customer
Adds or updates a person.
If your request does not include cio_id and the identifiers in the request body do not belong to a person, your request adds a person.
If a person already exists with the identifier in the request path, your request updates that person. If the identifier in the path does not belong to a person but you use an identifier in your request body that does belong to a person, your request updates the person and assigns them the identifier in the path.
If the identifier in the path and request body belong to different people, your request may return 200 OK but produce an Attribute Update Failure for the identifier in the payload.
If you want to update a person's identifiers after they are set, you must reference them using their cio_id in the format cio_<cio_id_value>—unless when updating an email with the Allow updates to email using ID setting enabled. You can get the cio_id value from the App API. If your request includes a cio_id, we'll attempt to update that person, including any identifiers in the request. If the cio_id does not exist or belongs to a person who was deleted, we'll drop the request.
For workspaces using email as an identifier, email is case-insensitive. The addresses person@example.com and PERSON@example.com would represent the same person.
Tip: If your workspace identifies people by both email and id, and you send an identify call with a new id but an email that already belongs to someone, we update the existing person rather than creating a new one. The existing person gets the new id. This is a common source of confusion during testing—if you're generating new IDs but reusing the same email address, you're updating one person repeatedly, not creating multiple people.
Path parameters
The unique value representing a person. The values you use to identify a person may be an id, email address, or the cio_id (when updating people), depending on your workspace settings. When you reference people by cio_id, you must prefix the value with cio_.
You can't reference a person by their phone number here. We determine the identifier type from the shape of the value, so a phone number in the path is treated as an id. To identify people by phone number, use the Track v2 API.
Request body
Example request
{
"cio_relationships": {
"relationships": [
{
"identifiers": {
"object_type_id": "1",
"object_id": "acme"
},
"relationship_attributes": {
"role": "admin"
}
}
]
}
}Response
A successful request returns an empty object response.
Changes
No recorded changes to this endpoint across all 1 revision of this API.