Get started
Before you begin
Before you start, ensure you have the following:- An active Copyleaks account. If you don’t have one, sign up for free.
- You can find your API key on the API Dashboard.
Installation
Choose your preferred method for making API calls.HTTP needs no installation - call the API with any standard HTTP client, or import our Postman collection for a quicker start.
Login
To perform a scan, we first need to generate an access token. For that, we will use the login endpoint. The API key can be found on the Copyleaks API Dashboard.Upon successful authentication, you will receive a token that must be attached to subsequent API calls via theAuthorization: Bearer <TOKEN> header.
This token remains valid for 48 hours.Response
Save this token. It is valid for 48 hours and can be reused for subsequent API calls.
Submit for writing assessment
File Upload
Submit documents including PDF, DOCX, TXT, and other formats for scanning.
URL Scanning
Submit webpages and online documents directly by providing their URL.
Text from Images
Extract and scan text from images, including screenshots and photos.
scanId for proper tracking and identification.- Filename: The file extension in the
filenameparameter must match your document type (e.g.,.pdf,.docx,.txt). See the full list of supported file types. - Content Encoding: The file content must be Base64 encoded and sent in the
base64property.
What is Base64 Encoding?Base64 converts binary files into text strings so they can be sent via JSON. All programming languages have built-in Base64 encoding functions, see the code examples below for your language.
Wait for the completion webhook
Once the scan is complete, Copyleaks will send a completed webhook to the status URL you provided.When Grammar Checker is enabled, the webhook response will include awritingFeedback section with detailed information about the writing quality.For complete details on the webhook response structure, see the Scan Completed Webhook Reference.
Interpreting writing assessment results
The completed webhook contains awritingFeedback object with the Correction Types:- textStatistics: Basic metrics about the text, including sentence count, average word and sentence length, and estimated reading time.
-
score: Detailed breakdown of writing quality across four categories:
- Grammar
- Mechanics (spelling, punctuation)
- Sentence Structure
- Word Choice
-
readability: An assessment of how easy the text is to read, including:
- Overall readability score (0-100)
- Readability level (grade level)
- Text description of the readability
Export detailed results
To get the specific writing corrections, you need to export the detailed results using the export endpoint:Summary
You have successfully submitted a document for writing assessment and exported the detailed correction recommendations. You can now integrate these corrections into your application, display them to users, or use them to improve the document’s quality.Next steps
API Reference
View the complete API reference for the Grammar Checker endpoints.
Grammar Checker Response
Learn about the detailed structure of Grammar Checker data, including corrections and scores.
Ways to Integrate the Report
Explore different ways to integrate writing feedback into your applications.
Learn About Webhooks
Understand how to use webhooks to receive notifications about scan completions and results.

