Create a webmail login link
POST /api/v2/shared-hosting/{accountId}/email-accounts/{address}/actions/sso
Creates a one-time webmail login link for one mailbox. The mail can then be read without the mailbox password. Open the link right away in the browser of the person who reads the mail. Do not store it. To open the control panel of the whole account instead, use POST /api/v2/shared-hosting/{accountId}/actions/sso. The mailbox domain must be on the account. An account on Hostup’s previous hosting platform returns 409 account_not_eligible_cpanel.
Authentication: An API key with the scopes console:services and write:hosting. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe hosting account ID (
acct_…).addressstringrequiredThe email address (
hello@example.com) or the email account ID (mail_…). Unicode IDN and punycode spellings are both accepted.Example
curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/email-accounts/user@example.com/actions/sso" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json"Responses
200 The webmail login link.
{ "loginUrl": "https://server.example.com:2096/cpsessXXXXXXXXXX/login?session=YOUR_TOKEN&goto_uri=%2F3rdparty%2Froundcube%2Findex.php", "expiresAt": null, "singleUse": true}Response fields
loginUrlstringOne-time login link to webmail, opening on the inbox.
expiresAtstring or nullAlways
null. The server does not report when the link expires.singleUsebooleanAlways
true. The link works once.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | {address} is not a valid email address or a known email account ID. |
| 401 | Unauthorized. Authentication is required. |
| 403 | The mailbox domain is not on this hosting account (domain_not_owned), the API key lacks a required scope or the account is not active. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 409 | The account is on Hostup’s previous hosting platform. Webmail login links are only made for accounts on cPanel. |
| 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. |
| 502 | Webmail could not be opened on the server. Try again. |