curl --request GET \
--url https://api.getoneprofile.ai/mailboxes/{mailbox_id}/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/mailboxes/{mailbox_id}/"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getoneprofile.ai/mailboxes/{mailbox_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://api.getoneprofile.ai/mailboxes/{mailbox_id}/",
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-API-Key: <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://api.getoneprofile.ai/mailboxes/{mailbox_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://api.getoneprofile.ai/mailboxes/{mailbox_id}/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/mailboxes/{mailbox_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"connection_status": "connected",
"created_at": "2023-11-07T05:31:56Z",
"daily_send_limit": 123,
"daily_send_limit_cap": "personal_gmail",
"daily_send_limit_ceiling": 123,
"daily_send_limit_max": 123,
"disconnected_at": "2023-11-07T05:31:56Z",
"disconnected_reason": "<string>",
"effective_daily_send_limit": 123,
"email_address": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "google_workspace",
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"bounce_rate": 123,
"daily_send_limit_cap_ends_at": "2023-11-07T05:31:56Z",
"last_verified_at": "2023-11-07T05:31:56Z",
"microsoft_tenant_id": "<string>",
"reply_rate": 123,
"usage": {
"sent_today": 123,
"sent_yesterday": 123
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Get a mailbox
curl --request GET \
--url https://api.getoneprofile.ai/mailboxes/{mailbox_id}/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/mailboxes/{mailbox_id}/"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getoneprofile.ai/mailboxes/{mailbox_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://api.getoneprofile.ai/mailboxes/{mailbox_id}/",
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-API-Key: <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://api.getoneprofile.ai/mailboxes/{mailbox_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://api.getoneprofile.ai/mailboxes/{mailbox_id}/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/mailboxes/{mailbox_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"connection_status": "connected",
"created_at": "2023-11-07T05:31:56Z",
"daily_send_limit": 123,
"daily_send_limit_cap": "personal_gmail",
"daily_send_limit_ceiling": 123,
"daily_send_limit_max": 123,
"disconnected_at": "2023-11-07T05:31:56Z",
"disconnected_reason": "<string>",
"effective_daily_send_limit": 123,
"email_address": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "google_workspace",
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"bounce_rate": 123,
"daily_send_limit_cap_ends_at": "2023-11-07T05:31:56Z",
"last_verified_at": "2023-11-07T05:31:56Z",
"microsoft_tenant_id": "<string>",
"reply_rate": 123,
"usage": {
"sent_today": 123,
"sent_yesterday": 123
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Response
Successful Response
Which email provider a mailbox connects through.
Every provider is implemented behind providers.EmailProviderBase, so callers
never see which one a mailbox uses.
GOOGLE_WORKSPACE holds a per-mailbox OAuth grant (consent screen,
refresh token). GOOGLE_WORKSPACE_DWD holds no grant at all: tokens are
minted on demand via domain-wide delegation as the platform service
account, so its rows carry an empty refresh_token forever. It is the path
imported fleets (e.g. InboxKit) connect through. GOOGLE_CLERK is the Google
sign-in itself: the onboarding wizard's person consents to Gmail once, at sign-up,
and Clerk keeps that grant, so the row's refresh_token holds the Clerk user id
whose Google connection each fresh token is read from.
MICROSOFT_CLERK is the Microsoft 365 twin of GOOGLE_CLERK: Outlook through
Microsoft Graph, with the grant held by the person's Clerk Microsoft sign-in. The row's
refresh_token holds the Clerk user id and provider_account_id the Clerk
external account the token is read from. MICROSOFT_365_APP is the twin of
GOOGLE_WORKSPACE_DWD: Graph with an application token for a tenant whose admin
granted Oneprofile once: its rows' refresh_token holds that tenant's id, which is
no secret (MailboxDTO.microsoft_tenant_id reads it).
google_workspace, google_workspace_dwd, google_clerk, microsoft_clerk, microsoft_365_app Was this page helpful?