Use the account API
Open API access in the customer console. Name your key and select the scopes your integration needs. Select profile:read for the account check below. Copy the secret when shown and store it on your server.
Set PANEL_URL to the customer console origin and ACCOUNT_API_KEY to this account key. Use the endpoint list on the API access page to check the scope for each operation. Revoke unused keys from the same page.
Verify the key and read your profile
Use Bash. Replace the console hostname with the origin you sign in to. At the read prompt paste your account API key and press Enter. The JSON below is an illustrative success response.
PANEL_URL="https://panel.example.com"
read -rsp "Account API key: " ACCOUNT_API_KEY; echo
curl -sS -H "Authorization: Bearer $ACCOUNT_API_KEY" "$PANEL_URL/api/v1/me"{"data":{"id":"example-user","uid":"10001","name":"Alex","email":"[email protected]","profile":{}}}Page through resources and invoices
Resources require resources:read. For invoices, use invoices:read and change resources to invoices in the URL. limit defaults to 50 and accepts 1–100. Omit after on the first call. Read the items array, then pass the returned nextCursor as after. Stop when it is null.
curl -sS -H "Authorization: Bearer $ACCOUNT_API_KEY" -G "$PANEL_URL/api/v1/lists/resources" \
--data-urlencode "limit=10"CURSOR="REPLACE_WITH_NEXT_CURSOR"
curl -sS -H "Authorization: Bearer $ACCOUNT_API_KEY" -G "$PANEL_URL/api/v1/lists/resources" \
--data-urlencode "limit=10" --data-urlencode "after=$CURSOR"Check domain availability
Requires domains:read. Send the full domain name in the JSON field domain, using a supported extension. Read available in the response. This lookup creates no order.
curl -sS -H "Authorization: Bearer $ACCOUNT_API_KEY" -H "Content-Type: application/json" \
-d '{"domain":"example.com"}' "$PANEL_URL/api/v1/domains/check"Recover an order after a timeout
When creating an order, generate a unique Idempotency-Key for that purchase. If the connection drops, look it up using the original key and invoices:read. A successful lookup returns orderNumber, invoice id and status. Reuse identical parameters and the same key for a retry.
ORDER_KEY="REPLACE_WITH_ORIGINAL_KEY"
curl -sS -H "Authorization: Bearer $ACCOUNT_API_KEY" -H "Idempotency-Key: $ORDER_KEY" \
"$PANEL_URL/api/v1/orders/by-request"400: check required fields and parameter ranges. 401: check the Bearer key. 403: check scopes and account access. 429: slow down and retry later.