Update customer
Updates a contact in place. Only the fields you send are changed. Properties are merged key by key, so omitted properties keep their values.
PUT
/v1/customers/{id}Path parameters
idstringrequiredRequest body
requiredapplication/jsonphoneNumberstringE.164 phone number. Returns `400` if another contact in the inbox already has it.
max length 20
firstNamestringmax length 100
lastNamestringmax length 100
emailstring<email>optoutbooleanSet `true` to stop texting the contact. Only set `false` when the contact has asked to receive texts again.
emailOptoutbooleanSet `true` to stop emailing the contact.
blockedbooleanpropertiesobjectCustom properties to set on the contact.
Responses
200Successful response
idstringorgstringgymstringThe inbox the contact belongs to.
phoneNumberstringE.164 phone number, unique within the inbox.
firstNamestringlastNamestringemailstringoptoutbooleanThe contact opted out of texts. Helios will not text them.
emailOptoutbooleanThe contact unsubscribed from email.
blockedbooleansourcestringHow the contact was first created, for example `sms`, `form`, or `api`.
propertiesobjectCustom and integration properties. Returned when reading a single contact.
createdAtstring<date-time>updatedAtstring<date-time>400Another contact in the inbox already has this phone number
403The contact belongs to a different inbox
Request
curl -X PUT "https://api.sendhelios.com/v1/customers/string" \
-H "Content-Type: application/json" \
-d '{
"phoneNumber": "+15555550123",
"firstName": "string",
"lastName": "string",
"email": "<email>",
"optout": true,
"emailOptout": true,
"blocked": true,
"properties": {}
}'const response = await fetch("https://api.sendhelios.com/v1/customers/string", {
method: "PUT",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"phoneNumber": "+15555550123",
"firstName": "string",
"lastName": "string",
"email": "<email>",
"optout": true,
"emailOptout": true,
"blocked": true,
"properties": {}
})
});import requests
response = requests.put(
"https://api.sendhelios.com/v1/customers/string",
headers={
"Content-Type": "application/json"
},
json={
"phoneNumber": "+15555550123",
"firstName": "string",
"lastName": "string",
"email": "<email>",
"optout": True,
"emailOptout": True,
"blocked": True,
"properties": {}
},
)Response
{
"id": "string",
"org": "string",
"gym": "string",
"phoneNumber": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"optout": true,
"emailOptout": true,
"blocked": true,
"source": "string",
"properties": {},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}Another contact in the inbox already has this phone number
The contact belongs to a different inbox