API Errors

Copyleaks, like many other online web-services, allows you access to its services with REST-API. In order to run this API successfully, you need to send the right HTTP request at the right time. However, using the API incorrectly will result in one of our custom errors.

Copyleaks API uses a variety of errors, for each scenario you may encounter. These are the 3 types of errors:

Supported Languages

To return error messages in a language other than English, add appropriate value to the HTTP request header 'Accept-Language'.

See supported languages and codes in the table below:

Table 3: Supported Languages
Language Name Language Code
Chinese (Simplified) zh
English en
German de
Hebrew he
Hindi hi
Japanese ja
Korean ko
Portuguese pt
Russian ru
Spanish es

Default value

If you don't specify a supported language code - Copyleaks API will default back to English.

Type 1: Managed Errors

This is the most common type of Copyleaks errors. Errors coming from this error-type are normally appearing after using the API incorrectly.

The table below describes the codes that may return when working with the API.

Table 1: Managed Errors
Error Code Error Message
1 Bad request. One or several required parameters are missing or incorrect.
2 Invalid login credentials.
3 To use your account, you need to confirm the email address.
4 This user is disabled. Contact support for help.
5 Failed to download the requested url
6 Cannot complete the scan request because the file is too large. For more information: http://bit.ly/2fqJOqP
7 Failed reading the submitted text.
8 The image quality is too low to scan.
9 Temporarily unavailable. Please try again later.
10 This file type is not supported. Read more - http://bit.ly/2fqJOqP
11 Not enough text to scan. The minimum text length is 30 characters and at least 6 words.
12 This document is too long (The maximum number of pages allowed is <max-allowed>, while this document contains <number> pages).
13 You don't have enough credits to complete the request (required <number> credits)!
14 The submitted file is invalid.
15 The submitted URL is invalid!
17 You have no credits. You need to purchase credits in order to complete the request.
18 Copyshield widget is not showing on your webpgage.
19 '<headers>*' headers are too long (limited to <max-size> characters together)!
20 Only MIME multipart content type is allowed!
21 You can upload one file at a time!
22 Unable to determine file size.
24 Bad filename!
25 Undefined language!
26 The request cannot be completed because the process is still running.
27 Unknown process id!
30 Missing '<name>' header value!
31 Bad parameter '<param-name>'!
32 Too many failed login attempts. Please try again in <number> hours.
33 Http header '<headers>' key is too long (max length is <max-size> characters)!
37 Authorization has been denied for this request.

Message Structure

When the Copyleaks API returns error messages, it does so in JSON format. For example:

HTTP/1.1 401 Unauthorized
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Copyleaks-Error-Code: 2
Content-Length: 40
    "Message":"Invalid login credentials."


It is recommended to use the codes as it is possible the text for an error message may change from time to time, but the codes will stay the same.

Type 2: Internal Errors

We are doing our best to successfully respond to all of your requests.

Still, sometimes we encounter an internal error. In that case, we will fix the problem as soon as possible. You will also get a unique ticket ID that will help identify the problem when contacting Copyleaks customer support.

Table 2: Internal Errors
Error Code Error Message
16 The 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>

Type 3: Unhandled Errors

Unhandled errors, such as connectivity problems or irregular workloads, are rare but can happen under certain conditions. Unlike the other two general error types (Type 1 and Type 2), you will get back a response without the header 'copyleaks-error-code'. In that case, please wait a few minutes and try again. If the problem persists, please contact Support.

API Rate Limits

Rate limiting of the API is on a per-host basis (by IP address).

Table 2: Internal Errors
API Method Rate Limit
https://api.copyleaks.com/* 10 requests per second/IP

Exceeding a Rate Limit

If your host has reached its API limit, you will receive the HTTP error 429 (Too Many Requests) and you will be unable to authenticate with the Copyleaks API for a minute.