SendingDomainRates_list
const url = 'http://localhost:3000/api/sending-domains/rates?windowDays=7';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:3000/api/sending-domains/rates?windowDays=7' \ --header 'Authorization: Bearer <token>'Complaint and bounce rates per sending domain over a trailing window
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Trailing window in days (1 to 90)
Responses
Section titled “Responses”The request has succeeded.
Paginated response
object
List of items
Complaint and bounce rates of one Sending domain over a trailing window (ADR 0011). Complaint rate is complaints / (sent - hard bounces); bounce rate is hard bounces / sent.
object
Sending domain id
The domain the rates are for
Trailing window the rates cover, in days
Complaints over delivered-ish sends (sent minus hard bounces)
object
Events counted against the rate
The population the rate is over
Numerator / denominator, null when the denominator is zero
Hard bounces over sent
object
Events counted against the rate
The population the rate is over
Numerator / denominator, null when the denominator is zero
Page number (1-based)
Page size
Total number of elements
Total number of pages
Example generated
{ "items": [ { "sendingDomainId": "example", "domain": "example", "windowDays": 1, "complaintRate": { "numerator": 1, "denominator": 1, "rate": 1 }, "bounceRate": { "numerator": 1, "denominator": 1, "rate": 1 } } ], "page": 1, "pageSize": 1, "totalItems": 1, "totalPages": 1}RFC 7807 bad request response
RFC 7807 Problem Details
object
Why the request was refused, when the client should act on it
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
Validation errors grouped by field
object
Form-level validation error
Field validation errors
object
Seconds to wait before retrying; set on a 429 so a client that only sees the body can show the wait
Why a 500 happened, sent only by a development server (SPHERICON_ENV=development)
object
The error that failed the request, or the panic value
The goroutine stack of a panic; absent for an error a handler returned
The request id the server log carries for this request
The HTTP method of the failed request
The path of the failed request
Example
{ "code": "second_factor_required"}RFC 7807 unauthorized response
RFC 7807 Problem Details
object
Why the request was refused, when the client should act on it
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
Validation errors grouped by field
object
Form-level validation error
Field validation errors
object
Seconds to wait before retrying; set on a 429 so a client that only sees the body can show the wait
Why a 500 happened, sent only by a development server (SPHERICON_ENV=development)
object
The error that failed the request, or the panic value
The goroutine stack of a panic; absent for an error a handler returned
The request id the server log carries for this request
The HTTP method of the failed request
The path of the failed request
Example
{ "code": "second_factor_required"}RFC 7807 too many requests response: a rate limit was exceeded (ADR 0025)
RFC 7807 Problem Details
object
Why the request was refused, when the client should act on it
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
Validation errors grouped by field
object
Form-level validation error
Field validation errors
object
Seconds to wait before retrying; set on a 429 so a client that only sees the body can show the wait
Why a 500 happened, sent only by a development server (SPHERICON_ENV=development)
object
The error that failed the request, or the panic value
The goroutine stack of a panic; absent for an error a handler returned
The request id the server log carries for this request
The HTTP method of the failed request
The path of the failed request
Example
{ "code": "second_factor_required"}Headers
Section titled “Headers”Seconds to wait before retrying
The request budget of the window that was exceeded
Requests left in the current window
Unix time at which the window resets