Skip to content

Download an Apple Mail setup profile

GET /api/v2/shared-hosting/{accountId}/email-accounts/{address}/mobileconfig

Downloads an Apple configuration profile that sets up one mailbox in the Mail app on iPhone, iPad and Mac. The response is the file itself (application/x-apple-aspen-config), sent as an attachment named after the address. The profile holds the IMAP server (port 993) and the SMTP server (port 465), both with SSL/TLS. The username is the full address. The profile never holds a password. The device asks for it when the profile is installed. For a link that opens without a login, for example as a QR code, use POST /api/v2/shared-hosting/{accountId}/email-accounts/{address}/actions/mail-profile-link. The mailbox domain must be on the account. The profile 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

GET /api/v2/shared-hosting/{accountId}/email-accounts/{address}/mobileconfig
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/email-accounts/hello@example.com/mobileconfig" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The Apple configuration profile of the mailbox.

Content type: application/x-apple-aspen-config

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.