Skip to content

Create an Apple Mail setup link

POST /api/v2/shared-hosting/{accountId}/email-accounts/{address}/actions/mail-profile-link

Creates a link to the Apple Mail setup profile of one mailbox that opens without a login, for example as a QR code to scan with an iPhone. The link works for 30 minutes and points at GET /api/v2/mail-profiles/{token}. It can be opened any number of times until then. After that it answers 410 link_expired. Create a new link. The profile holds the mail servers, the ports and the username, never a password. To download the same profile with your API key, use GET /api/v2/shared-hosting/{accountId}/email-accounts/{address}/mobileconfig. The mailbox domain must be on the account. The link is made for any address on such a domain. The call does not check that the mailbox exists. List the mailboxes with GET /api/v2/shared-hosting/{accountId}/email-accounts first.

Authentication: An API key with the scopes read:hosting and console:services. 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/mail-profile-link
curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/email-accounts/hello@example.com/actions/mail-profile-link" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json"

Responses

200 The setup link.

Response 200
{
"url": "https://cloud.hostup.se/api/v2/mail-profiles/YOUR_TOKEN",
"expiresAt": "2026-09-24T10:30:00.000Z"
}
Response fields
urlstring
Download link for the setup profile. It opens without a login.
expiresAtstring
When the link stops working, 30 minutes after it was created.

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. A setup profile is 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.
502The account’s domains could not be read to check the address (upstream_failed). Try again later.