This documentation aims to provide all the information you need to work with our API.
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can enable API access and generate your token by visiting the settings page in the account dashboard.
APIs for managing documents
Get a paginated list of the authenticated user's documents.
The page number. Default: 1
The number of items per page. Default: 50
curl --request GET \
--get "https://www.handwritingocr.com/api/v1/documents?page=18&per_page=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"per_page\": 2,
\"page\": 62
}"
{
"current_page": 1,
"data": [
{
"document_id": "abc123",
"status": "processed",
"created_at": "2023-05-01T12:00:00Z",
"updated_at": "2023-05-01T12:30:00Z",
"automatically_deleted_at": "2023-05-08T12:00:00Z",
"page_count": 5,
"original_file_name": "example.pdf",
"action": "transcribe"
}
],
"first_page_url": "http://www.handwritingocr.com/api/v1/documents?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://www.handwritingocr.com/api/v1/documents?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://www.handwritingocr.com/api/v1/documents?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "http://www.handwritingocr.com/api/v1/documents",
"per_page": 50,
"prev_page_url": null,
"to": 1,
"total": 1
}
Retrieve details of a specific document.
The document's id.
curl --request GET \
--get "https://www.handwritingocr.com/api/v1/documents/voluptas" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
{
"id": "abc123",
"status": "processed",
"action": "transcribe",
"created_at": "2023-05-01T12:00:00Z",
"updated_at": "2023-05-01T12:30:00Z",
"results": {
"txt": "https://www.handwritingocr.com/api/v1/documents/abc123/download/token123/transcribe.txt",
"docx": "https://www.handwritingocr.com/api/v1/documents/abc123/download/token123/transcribe.docx",
"json": "https://www.handwritingocr.com/api/v1/documents/abc123/download/token123/transcribe.json"
}
}
Upload a new document for processing.
curl --request POST \
"https://www.handwritingocr.com/api/v1/documents" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "action=magnam"\
--form "extractor_id=16"\
--form "delete_after=19"\
--form "file=@/private/var/folders/xt/b28shz4965d33r0h9hpysjzh0000gn/T/php8drX8a"
{
"document_id": "abc123",
"status": "queued"
}
Delete a specific document and its associated file.
The document's id.
curl --request DELETE \
"https://www.handwritingocr.com/api/v1/documents/dignissimos" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
[Empty response]
Download a processed document in the specified format.
The download token.
The processing action. Must be one of: transcribe, tables, extractor.
The download format. Available formats depend on the action.
The document's id.
curl --request GET \
--get "https://www.handwritingocr.com/api/v1/documents/sit/download/dolores/corporis.quis" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
{
"binary_file_content"
}