Central de Ajuda
Listar todos os portals em an conta
Obter detalhes de portais em uma conta
GET
/
api
/
v1
/
accounts
/
{account_id}
/
portals
Listar todos os portals em an conta
curl --request GET \
--url https://airys.chat/api/v1/accounts/{account_id}/portals \
--header 'api_access_token: <api-key>'import requests
url = "https://airys.chat/api/v1/accounts/{account_id}/portals"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://airys.chat/api/v1/accounts/{account_id}/portals', 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}/portals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://airys.chat/api/v1/accounts/{account_id}/portals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_access_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://airys.chat/api/v1/accounts/{account_id}/portals")
.header("api_access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://airys.chat/api/v1/accounts/{account_id}/portals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"payload": [
{
"id": 4,
"color": "#1F93FF",
"custom_domain": "chatwoot.help",
"header_text": "Handbook",
"homepage_link": "https://www.chatwoot.com",
"name": "Handbook",
"page_title": "Handbook",
"slug": "handbook",
"archived": false,
"account_id": 1,
"config": {
"allowed_locales": [
{
"code": "en",
"articles_count": 32,
"categories_count": 9
}
]
},
"inbox": {
"id": 37,
"avatar_url": "https://example.com/avatar.png",
"channel_id": 1,
"name": "Chatwoot",
"channel_type": "Channel::WebWidget",
"greeting_enabled": true,
"widget_color": "#1F93FF",
"website_url": "chatwoot.com"
},
"logo": {
"id": 19399916,
"portal_id": 4,
"file_type": "image/png",
"account_id": 1,
"file_url": "https://example.com/logo.png",
"blob_id": 21239614,
"filename": "square.png"
},
"meta": {
"all_articles_count": 0,
"categories_count": 9,
"default_locale": "en"
}
}
]
}{
"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
Resposta
Sucesso
Show child attributes
Show child attributes
⌘I
Listar todos os portals em an conta
curl --request GET \
--url https://airys.chat/api/v1/accounts/{account_id}/portals \
--header 'api_access_token: <api-key>'import requests
url = "https://airys.chat/api/v1/accounts/{account_id}/portals"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://airys.chat/api/v1/accounts/{account_id}/portals', 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}/portals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://airys.chat/api/v1/accounts/{account_id}/portals"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_access_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://airys.chat/api/v1/accounts/{account_id}/portals")
.header("api_access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://airys.chat/api/v1/accounts/{account_id}/portals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"payload": [
{
"id": 4,
"color": "#1F93FF",
"custom_domain": "chatwoot.help",
"header_text": "Handbook",
"homepage_link": "https://www.chatwoot.com",
"name": "Handbook",
"page_title": "Handbook",
"slug": "handbook",
"archived": false,
"account_id": 1,
"config": {
"allowed_locales": [
{
"code": "en",
"articles_count": 32,
"categories_count": 9
}
]
},
"inbox": {
"id": 37,
"avatar_url": "https://example.com/avatar.png",
"channel_id": 1,
"name": "Chatwoot",
"channel_type": "Channel::WebWidget",
"greeting_enabled": true,
"widget_color": "#1F93FF",
"website_url": "chatwoot.com"
},
"logo": {
"id": 19399916,
"portal_id": 4,
"file_type": "image/png",
"account_id": 1,
"file_url": "https://example.com/logo.png",
"blob_id": 21239614,
"filename": "square.png"
},
"meta": {
"all_articles_count": 0,
"categories_count": 9,
"default_locale": "en"
}
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}