List a user's email inboxes
curl --request GET \
--url https://core-api.getaptly.com/api/users/{userId}/inboxes \
--header 'x-token: <api-key>'import requests
url = "https://core-api.getaptly.com/api/users/{userId}/inboxes"
headers = {"x-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-token': '<api-key>'}};
fetch('https://core-api.getaptly.com/api/users/{userId}/inboxes', 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://core-api.getaptly.com/api/users/{userId}/inboxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-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://core-api.getaptly.com/api/users/{userId}/inboxes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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://core-api.getaptly.com/api/users/{userId}/inboxes")
.header("x-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/users/{userId}/inboxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "ch_abc",
"channelId": "acc-1",
"type": "Hermes",
"provider": "google",
"email": "[email protected]",
"name": "Alice's Inbox",
"kind": "personal"
},
{
"_id": "ch_def",
"channelId": "acc-2",
"type": "Hermes",
"provider": "google",
"email": "[email protected]",
"name": "Leasing Team",
"kind": "shared"
}
]
}{
"error": "<string>",
"message": "<string>"
}Users
List a user's email inboxes
Returns the email inboxes (Hermes/Nylas channels) accessible to the given user within your company. Includes personal inboxes (where the user is a direct member) and shared inboxes the user can access via team membership.
Each inbox is tagged kind: "personal" (isShared is false and the user is in the
channel’s userIds) or kind: "shared" (channel marked isShared, or accessible
only through a team membership).
The user must belong to the company associated with your API key. Returns 401 if
the user does not belong to your company.
GET
/
api
/
users
/
{userId}
/
inboxes
List a user's email inboxes
curl --request GET \
--url https://core-api.getaptly.com/api/users/{userId}/inboxes \
--header 'x-token: <api-key>'import requests
url = "https://core-api.getaptly.com/api/users/{userId}/inboxes"
headers = {"x-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-token': '<api-key>'}};
fetch('https://core-api.getaptly.com/api/users/{userId}/inboxes', 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://core-api.getaptly.com/api/users/{userId}/inboxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-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://core-api.getaptly.com/api/users/{userId}/inboxes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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://core-api.getaptly.com/api/users/{userId}/inboxes")
.header("x-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/users/{userId}/inboxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "ch_abc",
"channelId": "acc-1",
"type": "Hermes",
"provider": "google",
"email": "[email protected]",
"name": "Alice's Inbox",
"kind": "personal"
},
{
"_id": "ch_def",
"channelId": "acc-2",
"type": "Hermes",
"provider": "google",
"email": "[email protected]",
"name": "Leasing Team",
"kind": "shared"
}
]
}{
"error": "<string>",
"message": "<string>"
}