List Account List Entries
curl --request GET \
--url https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}', 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://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"entries": [
{
"entry": "<string>",
"organization_id": "<string>",
"direction": "send",
"list_type": "allow",
"entry_type": "email",
"created_at": "2023-11-07T05:31:56Z",
"reason": "<string>",
"read_only": true
}
],
"limit": 123,
"next_page_token": "<string>"
}Lists
List Account List Entries
Lists the account-wide allow or block entries that apply to every inbox.
GET
https://api.aisa.one/apis/v1
/
agentmail
/
lists
/
{direction}
/
{type}
List Account List Entries
curl --request GET \
--url https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}', 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://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"entries": [
{
"entry": "<string>",
"organization_id": "<string>",
"direction": "send",
"list_type": "allow",
"entry_type": "email",
"created_at": "2023-11-07T05:31:56Z",
"reason": "<string>",
"read_only": true
}
],
"limit": 123,
"next_page_token": "<string>"
}Lists the account-wide allow or block entries that apply to every inbox.
direction selects inbound or outbound and type the list kind. Returns count, limit, next_page_token and entries; page with next_page_token. Each entry carries entry, entry_type, reason, direction, list_type, created_at and read_only. This is the organization-wide view spanning every inbox in the account. Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created; the inbox-scoped twin get_agentmail_inbox_list_entries is the one to use when a single inbox is meant.
Example
curl -X GET "https://api.aisa.one/apis/v1/agentmail/lists/{direction}/{type}" \
-H "Authorization: Bearer YOUR_API_KEY"
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Bearer authentication
Path Parameters
Direction of list entry.
Available options:
send, receive, reply Type of list entry.
Available options:
allow, block Query Parameters
Limit of number of items returned.
Page token for pagination.