Get send quota

Return how much of the sending allowance is left for the organization you are working in. It is the same limit `POST /messages/send` enforces, so a `remaining` of `0` is what a `429` from that call means. The allowance is a rolling window rather than a daily reset: a message stops counting once it is `window_seconds` old, so `remaining` climbs back on its own. `used` counts messages accepted, not delivered. Pass `recipient` to also see what is left for one address. A bucket that has no cap configured is left out of the response entirely. Requires the `notifications.messages.read` permission.

GET
/messages/quota
AuthorizationBearer <token>

The access token returned after a successful sign-in, sent as Authorization: Bearer <access_token>.

It identifies the person and the organization they are working in, and it lasts about fifteen minutes. When it runs out, use their refresh token at POST /auth/refresh-token instead of asking them to sign in again.

In: header

Query Parameters

recipient?string

Also report what is left for this address. Omit it to get the organization's allowance on its own.

Formatemail
Lengthlength <= 320

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.dual.network/messages/quota"

{
  "window_seconds": 3600,
  "organization": {
    "used": 12,
    "limit": 100,
    "remaining": 88
  }
}

{
  "code": 3,
  "message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}

{
  "code": 16,
  "message": "no auth provided"
}

{
  "code": 7,
  "message": "forbidden"
}
{
  "code": 13,
  "message": "internal error"
}