Skip to content

LegalOn API (1.3.1)

API documentation for LegalOn services

Languages
Servers
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

Users

Operations about user

Operations

User Groups

Operations about user group

Operations

Workspaces

Operations about all tenant workspaces/folders regardless of the user's access permissions.

Operations

Departments

Operations about department

Operations

Contracts(Files)

Operations to create, retrieve, update, and delete contracts. For operations that target a workspace, specify a workspace_id obtained via the common Workspaces endpoint (GET /workspaces).

Operations

Create a contract document

Request

Creates a contract in the specified workspace by uploading a file. AI analysis (metadata extraction and preview generation) runs asynchronously.

Security
OAuth2ClientCredentials
Bodymultipart/form-datarequired

Create contract request payload. Omit document_status_code to create the contract without a document status. This is equivalent to specifying NONE.

workspace_idstring(uuid)required

Destination workspace ID

contract_file_typestring(contract_file_type)required

Type of contract file to upload

Enum"PRE_EXECUTION""EXECUTED"
document_status_codestring(document_status_code)

Contract document status code for pre-execution contracts. NONE represents no document status.

Enum"COUNTERPARTY_DRAFT""INTERNAL_DRAFT""COUNTERPARTY_REVISION""INTERNAL_REVISION""APPROVED_VERSION""READY_FOR_SIGNATURE""NONE"
filestring(binary)required

Contract file content

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>'

Responses

Created

Bodyapplication/json
document_idstring(uuid)required

Contract document ID

document_version_idstring(uuid)required

Contract version ID

workspace_idsArray of strings(uuid)required

Workspace IDs that contain the contract

document_processing_statusstring(document_processing_status)required

Document processing status

Enum"PROCESSING""READY""REJECTED""FAILED""SKIPPED"
preview_statusstring(preview_status)required

Preview availability status

Enum"PROCESSING""READY""NOT_AVAILABLE""FAILED"
Response
application/json
{ "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" }

List contract custom attribute definitions

Request

Returns definitions configured for the tenant. The response order follows Contract Management.

Security
OAuth2ClientCredentials
curl -i -X GET \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/custom-attribute-definitions' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
custom_attribute_definitionsArray of objects(ContractCustomAttributeDefinition)required
custom_attribute_definitions[].​setting_idstring(uuid)required

Definition ID.

custom_attribute_definitions[].​display_namestring[ 1 .. 50 ] charactersrequired

Display name.

custom_attribute_definitions[].​typestringrequired

Attribute value type.

Value"single_line_text"
custom_attribute_definitions[].​is_automatic_extractionbooleanrequired

Whether the value is extracted automatically.

custom_attribute_definitions[].​descriptionstring

Definition description.

custom_attribute_definitions[].​formatstring

Expected output format for automatic extraction.

Response
application/json
{ "custom_attribute_definitions": [ { … } ] }

Get contract custom attribute values

Request

Returns custom attribute values for the specified contract. Empty values are omitted.

Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

Contract document ID.

curl -i -X GET \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/{document_id}/custom-attributes' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
custom_attributesArray of objects(ContractCustomAttribute)required
custom_attributes[].​setting_idstring(uuid)required

Definition ID.

custom_attributes[].​text_valuestring[ 1 .. 300 ] characters

Text value. Omitted when the value is empty.

custom_attributes[].​processing_statusstring

Automatic extraction status.

Enum"completed""failed""processing""not_applicable"
Response
application/json
{ "custom_attributes": [ { … } ] }

Matters

Operations to create, retrieve, update, and delete matters. Matter operations require an API credential owned by a user with a Matter Management Pro license.

Operations

Files

Operations to create and manage files for LegalOn resources.

Operations

Workspaces

Workspaces/folders are the common units used to store and organize resources such as contracts.

Operations