Skip to content
Using the APIs

Handling Errors

The Copyleaks API uses standard HTTP response codes to indicate success or failure. Understanding these codes helps you build robust integrations.

Our API returns structured error responses with the following error types:

  • invalid_request_error: Invalid request format, missing parameters, or malformed data.
  • authentication_error: Authentication failed due to invalid credentials, disabled account, or too many failed login attempts.
  • payment_error: Payment-related issues including insufficient credits, expired subscriptions, or team billing errors.
  • api_error: Internal server errors, service overload, timeouts, or temporary unavailability.

All errors return a consistent JSON structure:

{
"error": {
"type": "invalid_request_error",
"id": "missing_parameter",
"code": 1,
"message": "Bad request. One or several required parameters are missing or incorrect.",
"url": "https://docs.copyleaks.com/using-the-apis/api-errors/#error-reference",
"details": [
{
"param": "labels",
"message": "Id Label EXAMPLE-v1 is not supported"
}
]
}
}

Note: The url and details fields are optional and may not be present in all error responses. The details field, when present, contains an array of objects with param and message properties that provide additional context about specific parameters that caused the error.

CodeTypeErrorMessage
1invalid_request_errormissing_parameterBad request. One or several required parameters are missing or incorrect.
2authentication_errorinvalid_credentialsInvalid login credentials.
3authentication_erroremail_confirmation_requiredTo use your account, you need to confirm the email address.
4authentication_erroruser_disabledThis user is disabled. Contact support for help.
5api_errordownload_failedFailed to download the requested URL.
6invalid_request_errorfile_too_largeCannot complete the scan request because the file is too large.
7invalid_request_errortext_read_failedFailed reading the submitted text.
8invalid_request_errorimage_quality_too_lowThe image quality is too low to scan.
9api_errortemporarily_unavailableTemporarily unavailable. Please try again later.
10invalid_request_errorunsupported_file_typeThis file type is not supported.
11invalid_request_errornot_enough_textNot enough text to scan. The minimum text length is 30 characters and at least 6 words.
12invalid_request_errordocument_too_longThis document is too long (The maximum number of pages allowed is <max-allowed>, while this document contains <number> pages).
13payment_errorinsufficient_creditsYou don't have enough credits to complete the request (required <number> credits)!
14invalid_request_errorinvalid_fileThe submitted file is invalid.
15invalid_request_errorinvalid_urlThe submitted URL is invalid!
16api_errorinternal_server_errorThe server encountered an internal error or misconfiguration and was unable to complete your request. We are investigating the problem. Ticket ID <00000000-0000-0000-0000-000000000000>.
17payment_errorno_creditsYou have no credits. You need to purchase credits in order to complete the request.
18invalid_request_errorcopyshield_widget_missingCopyshield widget is not showing on your webpage.
19invalid_request_errorheaders_too_long'<headers>*' headers are too long (limited to <max-size> characters together)!
20invalid_request_erroronly_multipart_allowedOnly MIME multipart content type is allowed!
21invalid_request_errorsingle_file_upload_onlyYou can upload one file at a time!
22invalid_request_errorfile_size_unknownUnable to determine file size.
24invalid_request_errorbad_filenameBad filename!
25invalid_request_errorundefined_languageUndefined language!
26api_errorprocess_still_runningThe request cannot be completed because the process is still running.
27invalid_request_errorunknown_process_idUnknown process id!
30invalid_request_errormissing_headerMissing '<name>' header value!
31invalid_request_errorbad_parameterBad parameter '<param-name>'!
32authentication_errortoo_many_failed_loginsToo many failed login attempts. Please try again in <number> hours.
33invalid_request_errorheader_key_too_longHttp header '<headers>' key is too long (max length is <max-size> characters)!
37authentication_errorauthorization_deniedAuthorization has been denied for this request.
38invalid_request_errororder_already_activatedOrder has already been activated.
39invalid_request_errorunsupported_methodUnsupported method.
40payment_errorinstitution_subscription_expiredInstitution subscription has expired.
41invalid_request_errorfile_password_protectedThe submitted file is password protected.
42payment_errormsg_team_errorScan failed due to team error. Please contact your team administrator to solve this issue.
43invalid_request_errorall_document_excludedAs a result of your scan settings, this scan failed since the entire document was excluded.
44invalid_request_errorbad_urlThe submitted url is not valid
45api_errorfailed_to_indexWe were unable to index your file.
46invalid_request_errorno_repos_or_db_to_indexAs a result of your scan settings, we failed to index your file since copyleaksDb was set to false and the array of repositories was empty.
47invalid_request_errorunsupported_languageLanguage not supported
48invalid_request_errorimage_too_brightImage is too bright. Please try another image with less exposure.
49invalid_request_errorlow_dynamic_rangeImage has poor dynamic range. Please try another image with more contrast.
50invalid_request_errorimage_texturelessImage appears blank or textureless. Please upload a different image.
51invalid_request_errorimage_blurryImage is too blurry. Please upload a sharper image.
52invalid_request_errorinsufficient_colorsImage has too few colors. Please upload a more detailed image.
53invalid_request_errorimage_truncatedImage file is incomplete or corrupted. Please upload a complete image file.
54api_errorrate_limit_exceededToo many requests have been received from your IP address recently. Please wait a moment and then try your request again.
55api_errorsite_is_overloadedSite is overloaded.
56invalid_request_errorunsupported_langLanguage not supported.
57api_errorrequest_timed_outThe request has timed out.
58invalid_request_errorempty_textText is empty.
59invalid_request_errorunsupported_image_formatImage format not supported. Please upload a <supported_formats> image.
60invalid_request_errorimage_load_failedUnable to process the image. Please try uploading again.
61invalid_request_errorimage_too_smallImage is too small. Please upload an image at least <min_width>x<min_height> pixels.
62invalid_request_errorimage_too_largeImage is too large. Please upload an image up to <max_megapixels> megapixels (e.g., <example_dimensions>).
63invalid_request_errorunsupported_aspect_ratioImage aspect ratio <aspect_ratio> not supported. Please upload an image with a standard aspect ratio.
64invalid_request_errorimage_too_darkImage is too dark. Please try another image with better lighting.