The Copyleaks Authenticity API is the most powerful way to analyze your content for plagiarism. This API is asynchronous - you submit a scan, and Copyleaks notifies your server via webhooks when the results are ready to be retrieved. This guide will walk you through the process of submitting a scan, enabling plagiarism detection, and exporting the results.

Get started

1

Before you begin

Before you start, ensure you have the following:
2

Installation

Choose your preferred method for making API calls.
# macOS
brew install curl

# Ubuntu/Debian
sudo apt-get install curl

# Windows - download from https://curl.se
HTTP needs no installation - call the API with any standard HTTP client, or import our Postman collection for a quicker start.
3

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 the Authorization: Bearer <TOKEN> header. This token remains valid for 48 hours.
POST https://id.copyleaks.com/v3/account/login/api

Headers
Content-Type: application/json

Body
{
    "email": "[email protected]",
    "key": "00000000-0000-0000-0000-000000000000"
}
Response
{
    "access_token": "<ACCESS_TOKEN>",
    ".issued": "2025-07-31T10:19:40.0690015Z",
    ".expires": "2025-08-02T10:19:40.0690016Z"
}
Save this token. It is valid for 48 hours and can be reused for subsequent API calls.
4

Submit for scanning

Use the Submit File Endpoint to send content for analysis. We suggest you provide a unique scanId for each submission.
For testing, set "sandbox": true. Sandbox mode is free and returns mock results.
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.
PUT https://api.copyleaks.com/v3/scans/submit/file/my-plagiarism-scan

Headers
Authorization: Bearer <YOUR_AUTH_TOKEN>
Content-Type: application/json

Body
{
    "base64": "SGVsbG8gd29ybGQh",
    "filename": "file.txt",
    "properties": {
        "webhooks": {
          "status": "https://your-server.com/webhook/{STATUS}"
          },
        "sandbox": true
    }
}
5

Wait for the completion webhook

The scan can take some time. Once it’s complete, Copyleaks will send a completed webhook to the status URL you provided. This webhook contains a summary of the scan results, including any result IDs for found plagiarism matches.
6

Export detailed results

After the completed webhook arrives, use the export endpoint to retrieve the detailed plagiarism results using the result IDs you received in the completion webhook.We will also export the Crawled Version. The crawledVersion webhook contains the text and html version of the document. This can later be used in order to display the report.In addition, you should also specify a completionWebhook to receive notifications when the export is ready.
POST https://api.copyleaks.com/v3/downloads/my-plagiarism-scan/export/<export_id>

Headers
Authorization: Bearer <your_token>
Content-Type: application/json

Body
{
    "completionWebhook":  "https://your.server/export/completed",
    "maxRetries": 3,
    "developerPayload": "custom_data_identifier",
    "crawledVersion": {
        "endpoint": "https://your.server/webhook/export/crawled",
        "verb": "POST",
        "headers": [
            [
                "header-key",
                "header-value"
            ]
        ]
    },
    "results": [
        {
            "id": "result-1",
            "endpoint": "https://your.server/webhook/export/result/result-1",
            "verb": "POST",
            "headers": [
                [
                    "header-key",
                    "header-value"
                ]
            ]
        }
    ]
}
7

Summary

You have successfully submitted a scan for plagiarism detection and exported the results. You can now handle the results in your application, display them to users, or take further actions based on the findings.

Next steps

Webhooks Overview

Learn how to securely receive and process notifications from Copyleaks.

Viewing Scan Results

Understand the scan result format and how to display it to your users.