API documentation for LegalOn services
LegalOn API (1.1.0)
- The server URL is `{api_base_url}/rest/v1`.
You can construct the server URL using the value of `api_base_url` provided in the response when obtaining an access token.
https://{api_base_url_without_scheme}/rest/v1/contracts
- cURL
- JavaScript
- Python
- Java
- Go
curl -i -X GET \
'https://{api_base_url_without_scheme}/rest/v1/contracts?workspace_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&contract_category_code=string&contract_governing_law_code=string&contract_major_category_code=string&counter_party_name=string&title=string&page_size=50&page_token=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK
Contract documents.
Document processing status
Contract category and position classifications.
Contract category code
Contract position code
Token to get the next page. Omitted if the next page does not exist.
Token to get the previous page. Omitted if the previous page does not exist.
{ "documents": [ { … } ], "next_page_token": "eyJvZmZzZXQiOjIwfQ==", "total_size": 124 }
Create contract request payload. Omit document_status_code to create the contract without a document status. This is equivalent to specifying NONE.
Type of contract file to upload
Contract document status code for pre-execution contracts. NONE represents no document status.
- The server URL is `{api_base_url}/rest/v1`.
You can construct the server URL using the value of `api_base_url` provided in the response when obtaining an access token.
https://{api_base_url_without_scheme}/rest/v1/contracts
- cURL
- JavaScript
- Python
- Java
- Go
curl -i -X POST \
'https://{api_base_url_without_scheme}/rest/v1/contracts' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: multipart/form-data' \
-F workspace_id=00000023-0000-0000-0001-000000000020 \
-F contract_file_type=PRE_EXECUTION \
-F document_status_code=INTERNAL_DRAFT \
-F 'file=<binary file content>'{ "document_id": "00000016-0000-0000-0001-100000000001", "document_version_id": "00000016-0000-0000-0001-100000000101", "workspace_ids": [ "00000023-0000-0000-0001-000000000020" ], "document_processing_status": "PROCESSING", "preview_status": "PROCESSING" }
- The server URL is `{api_base_url}/rest/v1`.
You can construct the server URL using the value of `api_base_url` provided in the response when obtaining an access token.
https://{api_base_url_without_scheme}/rest/v1/contracts/{document_id}
- cURL
- JavaScript
- Python
- Java
- Go
curl -i -X GET \
'https://{api_base_url_without_scheme}/rest/v1/contracts/{document_id}?document_version_id=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK
Document processing status
Preview availability status
Item-level metadata extraction statuses. Omitted fields are not available from the current internal source.
Item-level metadata extraction status
Item-level metadata extraction status
Item-level metadata extraction status
Item-level metadata extraction status
Contract metadata.
Contract document status code returned in contract metadata.
Contract category and position classifications.
Non-contract related files attached to the contract. Returns up to 30 files ordered by latest related file version creation timestamp in descending order.
{ "document_id": "00000016-0000-0000-0001-100000000001", "document_version_id": "00000016-0000-0000-0001-100000000101", "file_name": "nda_2026_05_08.pdf", "mime_type": "application/pdf", "workspace_ids": [ "00000023-0000-0000-0001-000000000020" ], "created_at": "2026-05-08T03:12:34Z", "updated_at": "2026-05-08T03:13:20Z", "document_processing_status": "PROCESSING", "preview_status": "READY", "metadata_extraction_statuses": { "title_status": "COMPLETED", "language_code_status": "COMPLETED", "contract_category_positions_status": "COMPLETED", "own_party_status": "PROCESSING", "counter_party_status": "PROCESSING" }, "metadata": { "title": "Confidentiality Agreement", "language_code": "en", "contract_category_positions": [ … ], "own_parties": [ … ], "counter_parties": [ … ] }, "related_files": [ { … } ], "preview": [ { … } ] }
Workspaces
Workspaces/folders are the common units used to store and organize resources such as contracts. This endpoint returns the workspaces/folders the calling user has access to, as a tree. For operations that target a workspace (e.g., the Contract API), specify the workspace_id obtained here. To manage workspaces across the tenant (creation, permissions, etc.), see the admin workspace operations (/spaces).