Errors

One error format for every API v2 failure, with a fixed code to match on.

Match on error; the message text is for people and may change. Connect has its own codes: license errors.

All codes

Code HTTP Meaning
unauthorized 401 api_key is missing, invalid, or belongs to a blocked account.
method_not_found 404 Method is not supported.
forbidden_level 403 The API key does not belong to a Software Owner.
telegram_required 403 Link Telegram to the API key owner account.
soft_disabled 403 The software is disabled.
forbidden_field 403 The field is controlled by the platform.
forbidden_soft 403 The operation references another software.
self_destroy 403 The caller cannot delete itself.
self_block 403 The caller cannot block itself.
forbidden 403 The resource is outside the caller scope.
not_found 404 The resource does not exist in the caller scope.
duplicate 409 The username or domain already exists.
scope_changed 403/409 Authorization or resource scope changed during the operation.
hwid_reset_disabled 409 HWID reset is disabled for the key.
hwid_reset_limit_reached 409 The key has reached its HWID reset limit.
validation 422 A request field is missing or invalid.
reserved 422 The domain is reserved.
dns_txt_required 422 Add the TXT record from details.name and details.value, then retry.
limit 422 A resource limit was reached.
key_collision 422 No unique key could be generated for the key format.
invalid_key_format 422 key_format produced an invalid key.
confirmation_required 422 A destructive operation requires confirmation.
request_too_large 413 Request body exceeds 1 MB or the form field limits.
rate_limited 429 The operation rate limit was reached.
daily_key_limit 429 The daily key generation limit was reached.
provision_failed 502 Domain provisioning failed.
deprovision_failed 502 Domain removal failed.
service_unavailable 503 The panel or a required service is unavailable.
session_storage_unavailable 503 Session storage is unavailable.
storage 503 A resource could not be stored.
database_error 500 A database operation failed.
delete_failed 500 A delete operation failed.
internal_error 500 An operation failed safely.
key_generation_failed 500 Key generation was rolled back.

Match a response

The matching code is highlighted in the table above.

Error body

{
    "ok": false,
    "error": "validation",
    "message": "count must be 1..1000"
}
Esc