Import WordPress sites
POST /api/v2/shared-hosting/{accountId}/wordpress/import
Adds WordPress sites on the web hosting account to WordPress management. Send installationKeys from GET /api/v2/shared-hosting/{accountId}/wordpress/actions/scan to add only those sites. Leave the body out, or send an empty list, to add every site found. The scan itself already adds every site it finds.
The account must be active and on cPanel. Added sites appear in GET /api/v2/shared-hosting/{accountId}/wordpress.
Authentication: An API key with the scopes write:hosting and console:services. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe web hosting account ID (
acct_…).Body (optional)
installationKeysarray of stringresults[].installationKey values from the scan. Leave it out or send an empty list to add every site found.Example
curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/wordpress/import" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "installationKeys": [ "public_html" ] }'Responses
200 The sites were added.
{ "imported": true, "count": 1}Response fields
importedbooleanAlways
true on a 200 response.countnumber or nullNumber of sites the import reported, or
null when it reported no number.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 409 | Conflict. code is account_suspended, account_not_eligible_cpanel, or a route-specific blocker with its own recovery fields. |
| 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 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |