Update account
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "My Account",
"locale": "en",
"domain": "example.com",
"support_email": "support@example.com",
"auto_resolve_after": 1440,
"auto_resolve_message": "This conversation has been automatically resolved due to inactivity",
"auto_resolve_ignore_waiting": false,
"industry": "Technology",
"company_size": "50-100",
"timezone": "UTC"
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Account',
locale: 'en',
domain: 'example.com',
support_email: 'support@example.com',
auto_resolve_after: 1440,
auto_resolve_message: 'This conversation has been automatically resolved due to inactivity',
auto_resolve_ignore_waiting: false,
industry: 'Technology',
company_size: '50-100',
timezone: 'UTC'
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}"
payload = {
"name": "My Account",
"locale": "en",
"domain": "example.com",
"support_email": "support@example.com",
"auto_resolve_after": 1440,
"auto_resolve_message": "This conversation has been automatically resolved due to inactivity",
"auto_resolve_ignore_waiting": False,
"industry": "Technology",
"company_size": "50-100",
"timezone": "UTC"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"locale": "<string>",
"domain": "<string>",
"support_email": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"cache_keys": {},
"features": {},
"settings": {
"auto_resolve_after": 123,
"auto_resolve_message": "<string>",
"auto_resolve_ignore_waiting": true
},
"custom_attributes": {}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Account
Update account
Update account details, settings, and custom attributes
PATCH
/
api
/
v1
/
accounts
/
{account_id}
Update account
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "My Account",
"locale": "en",
"domain": "example.com",
"support_email": "support@example.com",
"auto_resolve_after": 1440,
"auto_resolve_message": "This conversation has been automatically resolved due to inactivity",
"auto_resolve_ignore_waiting": false,
"industry": "Technology",
"company_size": "50-100",
"timezone": "UTC"
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Account',
locale: 'en',
domain: 'example.com',
support_email: 'support@example.com',
auto_resolve_after: 1440,
auto_resolve_message: 'This conversation has been automatically resolved due to inactivity',
auto_resolve_ignore_waiting: false,
industry: 'Technology',
company_size: '50-100',
timezone: 'UTC'
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}"
payload = {
"name": "My Account",
"locale": "en",
"domain": "example.com",
"support_email": "support@example.com",
"auto_resolve_after": 1440,
"auto_resolve_message": "This conversation has been automatically resolved due to inactivity",
"auto_resolve_ignore_waiting": False,
"industry": "Technology",
"company_size": "50-100",
"timezone": "UTC"
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"name": "<string>",
"locale": "<string>",
"domain": "<string>",
"support_email": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"cache_keys": {},
"features": {},
"settings": {
"auto_resolve_after": 123,
"auto_resolve_message": "<string>",
"auto_resolve_ignore_waiting": true
},
"custom_attributes": {}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Body
application/jsonapplication/x-www-form-urlencoded
Response
Success