Update a customer
curl --request POST \
--url https://back.leap.onclarity.com/api/customer/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"first_name": "UNSET",
"last_name": "UNSET",
"avatar_url": "UNSET",
"attributes": "UNSET",
"tags": "UNSET",
"gender": "UNSET",
"whatsapp_phones": "UNSET"
}
'import requests
url = "https://back.leap.onclarity.com/api/customer/edit"
payload = {
"id": 123,
"first_name": "UNSET",
"last_name": "UNSET",
"avatar_url": "UNSET",
"attributes": "UNSET",
"tags": "UNSET",
"gender": "UNSET",
"whatsapp_phones": "UNSET"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
first_name: 'UNSET',
last_name: 'UNSET',
avatar_url: 'UNSET',
attributes: 'UNSET',
tags: 'UNSET',
gender: 'UNSET',
whatsapp_phones: 'UNSET'
})
};
fetch('https://back.leap.onclarity.com/api/customer/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"first_name": "<string>",
"organization_id": 123,
"attributes": [
{
"key": "<string>",
"value": "<string>"
}
],
"last_name": "<string>",
"avatar_url": "<string>",
"tags": [
{
"id": 123,
"name": "<string>",
"color": "<string>",
"description": "<string>"
}
],
"custom_attributes": {},
"gender": "<string>",
"gender_source": "<string>",
"merged_into_id": 123,
"has_open_suggestion": false,
"channels": [
"whatsapp"
]
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}Customers
Update a customer
POST
/
api
/
customer
/
edit
Update a customer
curl --request POST \
--url https://back.leap.onclarity.com/api/customer/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"first_name": "UNSET",
"last_name": "UNSET",
"avatar_url": "UNSET",
"attributes": "UNSET",
"tags": "UNSET",
"gender": "UNSET",
"whatsapp_phones": "UNSET"
}
'import requests
url = "https://back.leap.onclarity.com/api/customer/edit"
payload = {
"id": 123,
"first_name": "UNSET",
"last_name": "UNSET",
"avatar_url": "UNSET",
"attributes": "UNSET",
"tags": "UNSET",
"gender": "UNSET",
"whatsapp_phones": "UNSET"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
first_name: 'UNSET',
last_name: 'UNSET',
avatar_url: 'UNSET',
attributes: 'UNSET',
tags: 'UNSET',
gender: 'UNSET',
whatsapp_phones: 'UNSET'
})
};
fetch('https://back.leap.onclarity.com/api/customer/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"first_name": "<string>",
"organization_id": 123,
"attributes": [
{
"key": "<string>",
"value": "<string>"
}
],
"last_name": "<string>",
"avatar_url": "<string>",
"tags": [
{
"id": 123,
"name": "<string>",
"color": "<string>",
"description": "<string>"
}
],
"custom_attributes": {},
"gender": "<string>",
"gender_source": "<string>",
"merged_into_id": 123,
"has_open_suggestion": false,
"channels": [
"whatsapp"
]
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Body
application/json
Show child attributes
Show child attributes
Available options:
male, female Response
Request fulfilled, document follows
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Channel type (web, android_sdk, ios_sdk, whatsapp)
Available options:
whatsapp, android_sdk, ios_sdk, web, voice, social, x, email, instagram, linkedin