curl --request GET \
--url https://app.sendmux.ai/api/v1/mailboxes/{public_id}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.sendmux.ai/api/v1/mailboxes/{public_id}/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.sendmux.ai/api/v1/mailboxes/{public_id}/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sendmux.ai/api/v1/mailboxes/{public_id}/usage"
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))
}{
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": true,
"data": {
"currency": "USD",
"end": "2023-11-07T05:31:56Z",
"incoming": {
"coverage_started_at": "2023-11-07T05:31:56Z",
"incurred_amount": "<string>",
"posted_amount": "<string>",
"posted_quantity": "<string>",
"quantity": "<string>",
"state": "pending",
"unbillable_amount": "<string>",
"unbillable_quantity": "<string>"
},
"mailbox_id": "<string>",
"outgoing": {
"coverage_started_at": "2023-11-07T05:31:56Z",
"incurred_amount": "<string>",
"posted_amount": "<string>",
"posted_quantity": "<string>",
"quantity": "<string>",
"state": "pending",
"unbillable_amount": "<string>",
"unbillable_quantity": "<string>"
},
"posted_amount": "<string>",
"start": "2023-11-07T05:31:56Z",
"state": "pending",
"storage": {
"allocated_amount": "<string>",
"posted_amount": "<string>",
"raw_amount": "<string>",
"state": "pending"
}
}
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}Read mailbox costs
Read cumulative mailbox costs for a half-open window: start is included and end is excluded. Requires mailbox.admin.read and team-wide mailbox access. Retained usage remains readable after mailbox deletion while the team and credential remain active. Quantities and USD amounts are decimal strings. posted_amount includes only posted charges; incurred and unbillable amounts are reported separately. A pending result can change. Settle a window only when its state is final. This read does not start or complete settlement.
curl --request GET \
--url https://app.sendmux.ai/api/v1/mailboxes/{public_id}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.sendmux.ai/api/v1/mailboxes/{public_id}/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.sendmux.ai/api/v1/mailboxes/{public_id}/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.sendmux.ai/api/v1/mailboxes/{public_id}/usage"
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))
}{
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": true,
"data": {
"currency": "USD",
"end": "2023-11-07T05:31:56Z",
"incoming": {
"coverage_started_at": "2023-11-07T05:31:56Z",
"incurred_amount": "<string>",
"posted_amount": "<string>",
"posted_quantity": "<string>",
"quantity": "<string>",
"state": "pending",
"unbillable_amount": "<string>",
"unbillable_quantity": "<string>"
},
"mailbox_id": "<string>",
"outgoing": {
"coverage_started_at": "2023-11-07T05:31:56Z",
"incurred_amount": "<string>",
"posted_amount": "<string>",
"posted_quantity": "<string>",
"quantity": "<string>",
"state": "pending",
"unbillable_amount": "<string>",
"unbillable_quantity": "<string>"
},
"posted_amount": "<string>",
"start": "2023-11-07T05:31:56Z",
"state": "pending",
"storage": {
"allocated_amount": "<string>",
"posted_amount": "<string>",
"raw_amount": "<string>",
"state": "pending"
}
}
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}Authorizations
Sendmux API key. Use a root API key for Management API routes, or a mailbox credential for Mailbox API routes. Obtain keys from the dashboard under API Keys.
Headers
Return 304 when the authorised response is unchanged.
Path Parameters
Mailbox public ID.
Query Parameters
Inclusive start. At most millisecond precision.
Exclusive end. Must be at or after start and at most 366 days later. At most millisecond precision.
Response
Recorded mailbox costs and settlement state.
true Hide child attributes
Hide child attributes
USD Hide child attributes
Hide child attributes
^\d+\.\d{6}$^\d+\.\d{6}$^\d+$^\d+$pending, final ^\d+\.\d{6}$^\d+$Hide child attributes
Hide child attributes
^\d+\.\d{6}$^\d+\.\d{6}$^\d+$^\d+$pending, final ^\d+\.\d{6}$^\d+$^\d+\.\d{6}$pending, final Was this page helpful?