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
Writing quality analysis and scores.
corrections object
Detailed correction scores and counts.
grammarCorrectionsCount integer
Number of grammar corrections needed.
grammarCorrectionsScore integer
Grammar quality score (0-100).
grammarScoreWeight number
Weight applied to grammar score.
mechanicsCorrectionsCount integer
Number of mechanics corrections needed.
mechanicsCorrectionsScore integer
Mechanics quality score (0-100).
mechanicsScoreWeight number
Weight applied to mechanics score.
sentenceStructureCorrectionsCount integer
Number of sentence structure corrections needed.
sentenceStructureCorrectionsScore integer
Sentence structure quality score (0-100).
sentenceStructureScoreWeight number
Weight applied to sentence structure score.
wordChoiceCorrectionsCount integer
Number of word choice corrections needed.
wordChoiceCorrectionsScore integer
Word choice quality score (0-100).
wordChoiceScoreWeight number
Weight applied to word choice score.
overallScore integer
Overall writing quality score (0-100).
readability object
Readability analysis and metrics.
score integer
Readability score (0-100).
readabilityLevel integer
Reading grade level.
readabilityLevelText string
Human-readable description of reading level.
readabilityLevelDescription string
Detailed description of reading difficulty.
statistics object
Text statistics and analysis.
sentenceCount integer
Number of sentences in the text.
averageSentenceLength number
Average number of words per sentence.
averageWordLength number
Average length of words in characters.
readingTimeSeconds number
Estimated reading time in seconds.
speakingTimeSeconds number
Estimated speaking time in seconds.
corrections object
Detailed correction information with text positions.
text object
Text correction data with character positions and suggestions.
scannedDocument object
Metadata about the scan.
scanId string
The unique identifier for this scan.
totalWords integer
Total number of words analyzed.
totalExcluded integer
Number of words excluded from analysis.
actualCredits integer
Credits actually consumed for this scan.
expectedCredits integer
Expected credits for this scan.
creationTime string
ISO 8601 timestamp when the scan was created.

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.

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."
}