Skip to content

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

accountIdstringrequired
The hosting account ID (acct_…).
addressstringrequired
The email address (hello@example.com) or the email account ID (mail_…). Unicode IDN and punycode spellings are both accepted.

Example

POST /api/v2/shared-hosting/{accountId}/email-accounts/{address}/actions/sso
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.

Response 200
{
"loginUrl": "https://server.example.com:2096/cpsessXXXXXXXXXX/login?session=YOUR_TOKEN&goto_uri=%2F3rdparty%2Froundcube%2Findex.php",
"expiresAt": null,
"singleUse": true
}
Response fields
loginUrlstring
One-time login link to webmail, opening on the inbox.
expiresAtstring or null
Always null. The server does not report when the link expires.
singleUseboolean
Always 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.
401Unauthorized. Authentication is required.
403The mailbox domain is not on this hosting account (domain_not_owned), the API key lacks a required scope or the account is not active.
404Not found. The resource does not exist or is not owned by the caller.
409The account is on Hostup’s previous hosting platform. Webmail login links are only made for accounts on cPanel.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502Webmail could not be opened on the server. Try again.