Count outbound mail relay messages by status
GET /api/v2/me/mail-relay/summary
Counts the messages one sender passed through the outbound mail relay, per status. The count starts at since, by default 7 days ago. The statuses mean the same as status on GET /api/v2/me/mail-relay/messages. Use that endpoint to see the messages themselves. Choose the sender with scope as on the message log. A VPS with no public IP address returns zero counts.
Authentication: An API key with one of these scopes: read:hosting, read:vm. About keys and scopes
Request
Query parameters
scopestringrequiredWhich sender to count.
hosting takes domain and needs the scope read:hosting. vps takes vpsId and needs read:vm. One of hosting, vps.domainstringA domain on one of your web hosting accounts (main, addon, parked or subdomain). Required when
scope is hosting.vpsIdstringThe VPS ID (
vps_…). Required when scope is vps.sincestringCount messages the relay received at or after this time (ISO 8601). Default 7 days ago. A time more than 30 days back counts from 30 days ago.
Example
curl "https://cloud.hostup.se/api/v2/me/mail-relay/summary?scope=hosting" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The counts per status.
{ "windowStartAt": "2026-10-02T10:00:00.000Z", "counts": { "delivered": 412, "sending": 2, "queued": 0, "deferred": 3, "bounced": 5, "rejected": 1, "total": 423 }}Response fields
windowStartAtstringStart of the counted period.
countsobjectMessages per status since
windowStartAt.deliveredintegerThe receiving server accepted the message. At least 0.
sendingintegerOn its way out, no answer from the receiving server yet. At least 0.
queuedintegerWaiting at the relay, also while the sender is paused. At least 0.
deferredintegerThe receiving server asked to try again later. At least 0.
bouncedintegerThe receiving server refused the message or delivery was given up. At least 0.
rejectedintegerThe relay refused the message. At least 0.
totalintegerAll messages counted. At least 0.
Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | domain_not_found: the domain is not on any of your web hosting accounts. vps_not_found: the VPS is not on your account. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 503 | upstream_unavailable: the counts did not load within 5 seconds. Try again after the Retry-After seconds (30). |