curl --request POST \
--url https://api.copyleaks.com/v3/downloads/my-scan-123/export/my-export-1 \
--header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"results": [
{
"id": "my-result-id",
"verb": "POST",
"headers": [["header-key", "header-value"]],
"endpoint": "https://yourserver.com/export/export-id/results/my-result-id"
}
],
"pdfReport": {
"verb": "POST",
"endpoint": "https://yourserver.com/export/export-id/pdf-report"
},
"crawledVersion": {
"verb": "POST",
"endpoint": "https://yourserver.com/export/export-id/crawled-version"
},
"completionWebhook": "https://yourserver.com/export/export-id/completed",
"maxRetries": 3
}'
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.export import Export, ExportResult, ExportPdf, ExportCrawledVersion
auth_token = Copyleaks.login("[email protected]", "YOUR_API_KEY")
result = ExportResult()
result.set_id("my-result-id")
result.set_endpoint("https://yourserver.com/export/export-id/results/my-result-id")
result.set_verb("POST")
pdf = ExportPdf()
pdf.set_endpoint("https://yourserver.com/export/export-id/pdf-report")
pdf.set_verb("POST")
crawled = ExportCrawledVersion()
crawled.set_endpoint("https://yourserver.com/export/export-id/crawled-version")
crawled.set_verb("POST")
export = Export()
export.set_results([result])
export.set_pdf_report(pdf)
export.set_crawled_version(crawled)
export.set_completion_webhook("https://yourserver.com/export/export-id/completed")
export.set_max_retries(3)
Copyleaks.export(auth_token, "my-scan-123", "my-export-1", export)
{}
Downloads
Export
Export the full raw scan information and push it to your servers.
POST
/
v3
/
downloads
/
{scanId}
/
export
/
{exportId}
curl --request POST \
--url https://api.copyleaks.com/v3/downloads/my-scan-123/export/my-export-1 \
--header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"results": [
{
"id": "my-result-id",
"verb": "POST",
"headers": [["header-key", "header-value"]],
"endpoint": "https://yourserver.com/export/export-id/results/my-result-id"
}
],
"pdfReport": {
"verb": "POST",
"endpoint": "https://yourserver.com/export/export-id/pdf-report"
},
"crawledVersion": {
"verb": "POST",
"endpoint": "https://yourserver.com/export/export-id/crawled-version"
},
"completionWebhook": "https://yourserver.com/export/export-id/completed",
"maxRetries": 3
}'
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.export import Export, ExportResult, ExportPdf, ExportCrawledVersion
auth_token = Copyleaks.login("[email protected]", "YOUR_API_KEY")
result = ExportResult()
result.set_id("my-result-id")
result.set_endpoint("https://yourserver.com/export/export-id/results/my-result-id")
result.set_verb("POST")
pdf = ExportPdf()
pdf.set_endpoint("https://yourserver.com/export/export-id/pdf-report")
pdf.set_verb("POST")
crawled = ExportCrawledVersion()
crawled.set_endpoint("https://yourserver.com/export/export-id/crawled-version")
crawled.set_verb("POST")
export = Export()
export.set_results([result])
export.set_pdf_report(pdf)
export.set_crawled_version(crawled)
export.set_completion_webhook("https://yourserver.com/export/export-id/completed")
export.set_max_retries(3)
Copyleaks.export(auth_token, "my-scan-123", "my-export-1", export)
{}
curl --request POST \
--url https://api.copyleaks.com/v3/downloads/my-scan-123/export/my-export-1 \
--header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"results": [
{
"id": "my-result-id",
"verb": "POST",
"headers": [["header-key", "header-value"]],
"endpoint": "https://yourserver.com/export/export-id/results/my-result-id"
}
],
"pdfReport": {
"verb": "POST",
"endpoint": "https://yourserver.com/export/export-id/pdf-report"
},
"crawledVersion": {
"verb": "POST",
"endpoint": "https://yourserver.com/export/export-id/crawled-version"
},
"completionWebhook": "https://yourserver.com/export/export-id/completed",
"maxRetries": 3
}'
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.export import Export, ExportResult, ExportPdf, ExportCrawledVersion
auth_token = Copyleaks.login("[email protected]", "YOUR_API_KEY")
result = ExportResult()
result.set_id("my-result-id")
result.set_endpoint("https://yourserver.com/export/export-id/results/my-result-id")
result.set_verb("POST")
pdf = ExportPdf()
pdf.set_endpoint("https://yourserver.com/export/export-id/pdf-report")
pdf.set_verb("POST")
crawled = ExportCrawledVersion()
crawled.set_endpoint("https://yourserver.com/export/export-id/crawled-version")
crawled.set_verb("POST")
export = Export()
export.set_results([result])
export.set_pdf_report(pdf)
export.set_crawled_version(crawled)
export.set_completion_webhook("https://yourserver.com/export/export-id/completed")
export.set_max_retries(3)
Copyleaks.export(auth_token, "my-scan-123", "my-export-1", export)
{}
Authentication Required. You need to login with a user and API key in order to access this method. Add this HTTP header to your request:Authorization: Bearer <Your-Login-Token>
Request
Path Parameters
string
required
A new Id for the export process.
>= 3 characters <= 36 charactersstring
required
The scan ID of the specific scan to export. Learn more about the criteria for creating a Scan ID.
>= 3 characters <= 36 charactersHeaders
Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN
Request Body
The request body is a JSON object containing the export configuration.string
required
This webhook event is triggered once the export is completed.
array[array]
Adds headers to the webhook.Example:
[ [ "header-key", "header-value" ], ... ]integer
default:"3"
How many retries to send before giving up. Using high value (12) may lead to a longer time until the completionWebhook being executed. A low value (1) may lead to errors while your service is temporary having problems.
>= 1 <= 12string
Add a custom developer payload that will then be provided on the Export-Completed webhook.
array[object]
An array of results to be exported. Learn more about Result Webhook.
<= 1000 itemsShow result properties
Show result properties
string
required
Result identification to be downloaded. You get these identifications from the completed webhook.
string<uri>
required
The HTTP url to upload the data.
string
required
The HTTP verb (also called “HTTP Methods”) to upload the data to your specified endpoint.Example:
POSTarray[array]
(Jagged Array) List of headers to be submitted with the upload request. You may use this field to provide additional request headers, such as “Authorization” header.
object
Download the PDF report. Allowed only when
properties.pdf.create was set to true on the scan submission.object
Export the AI Content detection report. Allowed only when
properties.aiGeneratedText.detect was set to true on the scan submission. Learn more about AI Content Detection Webhook.object
Export the Grammar Checker report. Allowed only when
properties.writingFeedback.enable was set to true on the scan submission. Learn more about Grammar Checker Webhook.object
Export the Overview report. Allowed only when
properties.overview.enable was set to true on the scan submission. Learn more about Overview Webhook.object
Download the crawled version of the submitted text. Learn more about Crawled-Version Webhook.
Responses
- 204
- 400
- 401
- 404
- 409
204 No Content - The command was executed. The export started.
400 Bad Request - Bad request. One or more details in your request is wrong.
401 Unauthorized - Authorization has been denied for this request.
404 Not Found - The scan id that was specified doesn’t exist.
409 Conflict - Conflict. An export task with the same Id already exists in the system.
Next Steps
Webhooks Overview
Learn about the different types of webhooks and how to handle them, including export completion webhooks.
Export Completed Webhook
Understand the details provided in the export completed webhook.
How to Display Scan Reports
Learn how to present exported scan data to your users.

