Atualizar conta
Atualizar detalhes, configurações e atributos personalizados da conta
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>"
}
]
}Autorizações
Este token pode ser obtido visitando a página de perfil ou por meio do console rails. Fornece acesso a endpoints com base nos níveis de permissões do usuário. Este token pode ser salvo por um sistema externo quando o usuário é criado via API, para realizar atividades em nome do usuário.
Parâmetros de caminho
O ID numérico da conta
Corpo
Nome da conta
"My Account"
A localidade (locale) da conta
"en"
O domínio da conta
"example.com"
O e-mail de suporte da conta
"support@example.com"
Resolver conversas automaticamente após minutos especificados
10 <= x <= 14398561440
Mensagem a ser enviada ao resolver automaticamente
"This conversation has been automatically resolved due to inactivity"
Se deve ignorar conversas em espera para resolução automática
false
Tipo de setor (indústria)
"Technology"
Tamanho da empresa
"50-100"
Fuso horário da conta
"UTC"
Resposta
Sucesso
ID da conta
Nome da conta
A localidade (locale) da conta
O domínio da conta
O e-mail de suporte da conta
O status da conta
A data de criação da conta
Chaves de cache (cache keys) para a conta
Recursos ativados para a conta
Configurações da conta
Show child attributes
Show child attributes
Atributos personalizados da conta
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>"
}
]
}