Skip to content
Writing

Submit Text

POST https://api.copyleaks.com/v1/writing-feedback/{scanId}/check

Use Copyleaks Writing Assistant to generate grammar, spelling and sentence corrections for a given text.

This endpoint will receive submitted text to be checked. The response will show the suggested corrections to the input text.

scanId string required

A unique scan id provided by you. We recommend you use the same id in your database to represent the scan in the Copyleaks database. This will help you to debug incidents. Using the same ID for the same file will help you to avoid network problems that may lead to multiple scans for the same file. learn more about the criteria for creating a Scan ID.

>= 3 characters <= 36 characters

Match pattern: [a-z0-9] !@$^&-+%=_(){}<>';:/.",~|

Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN

The request body is a JSON object containing the text to scan.

text string required

Text to produce Writing Assistant report for.

>= 1 characters <= 25000 characters

sandbox boolean default: "false"

Use sandbox mode to test your integration with the Copyleaks API without consuming any credits.

Submit content for Writing Assistant and get returned mock results, simulating Copyleaks’s API functionality to ensure you have successfully integrated the API.

This feature is intended to be used for development purposes only.

score object
grammarScoreWeight number<float> default: "1.0"

Grammar correction category weight in the overall score.

>= 0.0 <=1.0

mechanicsScoreWeight number<float> default: "1.0"

Mechanics correction category weight in the overall score.

>= 0.0 <=1.0

sentenceStructureScoreWeight number<float> default: "1.0"

Sentence structure correction category weight in the overall score.

>= 0.0 <=1.0

wordChoiceScoreWeight number<float> default: "1.0"

Word choice correction category weight in the overall score.

>= 0.0 <=1.0

language string

The language code of your content. The selected language should be on the Supported Languages list above. If the ‘language’ field is not supplied , our system will automatically detect the language of the content.

Example: "en"

200 OK

The command was executed.

Response Schema

The response contains the following fields:

score object
An object containing the overall score, readability, and text statistics. See Score for more details.
corrections object
An object containing the detailed corrections for the text. See Corrections for more details.
scannedDocument object
Metadata about the scan. See Scanned Document for more details.

Example Response

A typical response from this endpoint:

Show full example (102 lines)
{
"score": {
"corrections": {
"grammarCorrectionsCount": 2,
"grammarCorrectionsScore": 87,
"grammarScoreWeight": 1,
"mechanicsCorrectionsCount": 9,
"mechanicsCorrectionsScore": 38,
"mechanicsScoreWeight": 1,
"sentenceStructureCorrectionsCount": 0,
"sentenceStructureCorrectionsScore": 100,
"sentenceStructureScoreWeight": 1,
"wordChoiceCorrectionsCount": 1,
"wordChoiceCorrectionsScore": 93,
"wordChoiceScoreWeight": 1,
// ... truncated
400 Bad Request

Bad request.

Example Response

A typical response from this endpoint:

{
"ErrorMessage": "Language not supported",
"ErrorCode": "Bad Request"
}
POST https://api.copyleaks.com/v1/writing-feedback/my-scan-123/check
Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN
{
"text": "Copyleaks is a comprehensive plagiarism detection platform that performs extensive searches across 60 trillion websites, 15,000+ academic journals, 20+ code data repositories, and 1M+ internal documents. Using AI-powered text analysis, easily scan documents, raw text, code, and URLs and instantly receive detailed reporting on the findings."
}