List workspace mailboxes
curl --request GET \
--url https://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes \
--header 'x-api-key: <api-key>'import requests
url = "https://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes"
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://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes', 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://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes",
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://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes"
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://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes")
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[
{
"id": "[email protected]",
"public_id": "aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee",
"workspace_id": "ws_01abc",
"email": "[email protected]",
"name": "Acme Support",
"email_domain_id": "ed_01xyz",
"inbound_provider": "cloudflare_routing",
"outbound_provider": "cloudflare_email",
"provider_metadata": {
"domain": "mail.acme.com",
"provider": "resend"
},
"bucket_id": "bkt_01xyz",
"settings": {
"forwarding": {
"enabled": false,
"email": ""
},
"signature": {
"enabled": false,
"text": ""
},
"autoReply": {
"enabled": false,
"subject": "",
"message": ""
},
"agentAutoResponse": {
"requireApproval": true
},
"fromName": "Acme Support"
},
"welcome_onboarding_status": "pending",
"inbox_unread_by_category": {
"customer_support": 3,
"partnership": 0,
"technical": 1,
"other": 2
}
}
]{
"error": "Unauthorized"
}{
"error": "Invalid request"
}{
"error": "Forbidden"
}{
"error": "Too many requests"
}Mailboxes
List workspace mailboxes
Plans: Free · Developer · Enterprise
Lists mailboxes in a workspace. Each item includes inbox_unread_by_category. Requires workspace membership. API keys are bound to one workspace.
API credits: 1 (read).
GET
https://console.mermail.app
/
api
/
v1
/
workspaces
/
{workspaceId}
/
mailboxes
List workspace mailboxes
curl --request GET \
--url https://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes \
--header 'x-api-key: <api-key>'import requests
url = "https://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes"
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://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes', 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://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes",
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://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes"
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://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.mermail.app/api/v1/workspaces/{workspaceId}/mailboxes")
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[
{
"id": "[email protected]",
"public_id": "aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee",
"workspace_id": "ws_01abc",
"email": "[email protected]",
"name": "Acme Support",
"email_domain_id": "ed_01xyz",
"inbound_provider": "cloudflare_routing",
"outbound_provider": "cloudflare_email",
"provider_metadata": {
"domain": "mail.acme.com",
"provider": "resend"
},
"bucket_id": "bkt_01xyz",
"settings": {
"forwarding": {
"enabled": false,
"email": ""
},
"signature": {
"enabled": false,
"text": ""
},
"autoReply": {
"enabled": false,
"subject": "",
"message": ""
},
"agentAutoResponse": {
"requireApproval": true
},
"fromName": "Acme Support"
},
"welcome_onboarding_status": "pending",
"inbox_unread_by_category": {
"customer_support": 3,
"partnership": 0,
"technical": 1,
"other": 2
}
}
]{
"error": "Unauthorized"
}{
"error": "Invalid request"
}{
"error": "Forbidden"
}{
"error": "Too many requests"
}⌘I