curl --request POST \
--url https://api.getoneprofile.ai/mailboxes/microsoft/fleet/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email_address": "<string>",
"tenant_id": "<string>",
"daily_send_limit": 1000,
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.getoneprofile.ai/mailboxes/microsoft/fleet/"
payload = {
"email_address": "<string>",
"tenant_id": "<string>",
"daily_send_limit": 1000,
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_address: '<string>',
tenant_id: '<string>',
daily_send_limit: 1000,
sender_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.getoneprofile.ai/mailboxes/microsoft/fleet/', 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/microsoft/fleet/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email_address' => '<string>',
'tenant_id' => '<string>',
'daily_send_limit' => 1000,
'sender_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/mailboxes/microsoft/fleet/"
payload := strings.NewReader("{\n \"email_address\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"daily_send_limit\": 1000,\n \"sender_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.post("https://api.getoneprofile.ai/mailboxes/microsoft/fleet/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email_address\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"daily_send_limit\": 1000,\n \"sender_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/mailboxes/microsoft/fleet/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_address\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"daily_send_limit\": 1000,\n \"sender_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
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,
"last_verified_at": "2023-11-07T05:31:56Z",
"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>"
}Connect one mailbox of a connected Microsoft 365 organization
curl --request POST \
--url https://api.getoneprofile.ai/mailboxes/microsoft/fleet/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email_address": "<string>",
"tenant_id": "<string>",
"daily_send_limit": 1000,
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.getoneprofile.ai/mailboxes/microsoft/fleet/"
payload = {
"email_address": "<string>",
"tenant_id": "<string>",
"daily_send_limit": 1000,
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_address: '<string>',
tenant_id: '<string>',
daily_send_limit: 1000,
sender_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.getoneprofile.ai/mailboxes/microsoft/fleet/', 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/microsoft/fleet/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email_address' => '<string>',
'tenant_id' => '<string>',
'daily_send_limit' => 1000,
'sender_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/mailboxes/microsoft/fleet/"
payload := strings.NewReader("{\n \"email_address\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"daily_send_limit\": 1000,\n \"sender_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.post("https://api.getoneprofile.ai/mailboxes/microsoft/fleet/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email_address\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"daily_send_limit\": 1000,\n \"sender_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/mailboxes/microsoft/fleet/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_address\": \"<string>\",\n \"tenant_id\": \"<string>\",\n \"daily_send_limit\": 1000,\n \"sender_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
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,
"last_verified_at": "2023-11-07T05:31:56Z",
"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>"
}Body
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, so its rows carry an empty refresh_token too.
google_workspace, google_workspace_dwd, google_clerk, microsoft_clerk, microsoft_365_app Was this page helpful?