Update account
Update account details, settings, and custom attributes
curl --request PATCH \
--url https://airys.chat/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"
}
'import requests
url = "https://airys.chat/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)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://airys.chat/api/v1/accounts/{account_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://airys.chat/api/v1/accounts/{account_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://airys.chat/api/v1/accounts/{account_id}"
payload := strings.NewReader("{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("api_access_token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://airys.chat/api/v1/accounts/{account_id}")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://airys.chat/api/v1/accounts/{account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}"
response = http.request(request)
puts response.read_body{
"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": {
"plan_name": "<string>",
"subscribed_quantity": 123,
"subscription_status": "<string>",
"subscription_ends_on": "2023-12-25",
"industry": "<string>",
"company_size": "<string>",
"timezone": "<string>",
"logo": "<string>",
"onboarding_step": "<string>",
"marked_for_deletion_at": "2023-11-07T05:31:56Z",
"marked_for_deletion_reason": "<string>"
}
}{
"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
This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
Path Parameters
The numeric ID of the account
Body
Name of the account
"My Account"
The locale of the account
"en"
The domain of the account
"example.com"
The support email of the account
"support@example.com"
Auto resolve conversations after specified minutes
10 <= x <= 14398561440
Message to send when auto resolving
"This conversation has been automatically resolved due to inactivity"
Whether to ignore waiting conversations for auto resolve
false
Industry type
"Technology"
Company size
"50-100"
Account timezone
"UTC"
Response
Success
Account ID
Name of the account
The locale of the account
The domain of the account
The support email of the account
The status of the account
The creation date of the account
Cache keys for the account
Enabled features for the account
Account settings
Show child attributes
Show child attributes
Custom attributes of the account
Show child attributes
Show child attributes
curl --request PATCH \
--url https://airys.chat/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"
}
'import requests
url = "https://airys.chat/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)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://airys.chat/api/v1/accounts/{account_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://airys.chat/api/v1/accounts/{account_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://airys.chat/api/v1/accounts/{account_id}"
payload := strings.NewReader("{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("api_access_token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://airys.chat/api/v1/accounts/{account_id}")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://airys.chat/api/v1/accounts/{account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Account\",\n \"locale\": \"en\",\n \"domain\": \"example.com\",\n \"support_email\": \"support@example.com\",\n \"auto_resolve_after\": 1440,\n \"auto_resolve_message\": \"This conversation has been automatically resolved due to inactivity\",\n \"auto_resolve_ignore_waiting\": false,\n \"industry\": \"Technology\",\n \"company_size\": \"50-100\",\n \"timezone\": \"UTC\"\n}"
response = http.request(request)
puts response.read_body{
"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": {
"plan_name": "<string>",
"subscribed_quantity": 123,
"subscription_status": "<string>",
"subscription_ends_on": "2023-12-25",
"industry": "<string>",
"company_size": "<string>",
"timezone": "<string>",
"logo": "<string>",
"onboarding_step": "<string>",
"marked_for_deletion_at": "2023-11-07T05:31:56Z",
"marked_for_deletion_reason": "<string>"
}
}{
"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>"
}
]
}