POST /mail-pro/domains/{rid}/storage
Buy storage for a domain
Add storage packs to a Mail Pro domain when its included storage is used up. Use when create_mailbox failed with mailpro.storage.domain_storage_exceeded and the user wants more. Before: get_mailbox_domain (needs mailpro read access) and the user's yes to the charge. Returns the domain with its new storage limit and billed_minor. Scope: mailpro:write. 422 mailpro.request.invalid without confirm equal to the domain.
API key (Bearer), on the public API endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
rid | path | string · required | Resource id (UUID) returned by the list or create tool. |
Request body
application/json
| Field | Type | Description |
|---|---|---|
packs | integer · required | Number of packs; get_mailbox_domain (needs mailpro read access) gives storage.pack_mib and pack_minor_per_month. |
confirm | string · required | The domain name, typed again, once the user has confirmed the monthly charge. |
Responses
| Status | Description | Body |
|---|---|---|
2XX | Success: the JSON body the route returns (see the description for its fields). | object |
401 | Key missing or invalid | Error |
4XX | Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account). | Error |
Examples
curl
curl -X POST "$GALON_API_BASE/mail-pro/domains/<rid>/storage" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"packs": 1, "confirm": "string"}'