Skip to content

LegalOn API (1.1.0)

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

Delete a contract

Request

Deletes the specified contract. All versions and links to related files are also removed (the related files themselves are not deleted).

Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

Contract document ID

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

Responses

No Content

Response
No content

List contract versions

Request

Retrieves all versions of the specified contract in ascending order by version number.

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}/versions' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
document_idstring(uuid)required

Contract document ID

versionsArray of objects(contract_version_summary)required

Contract versions

versions[].​document_version_idstring(uuid)required

Contract version ID

versions[].​version_numberinteger>= 1required

Version number in the current version list order

versions[].​file_namestring[ 1 .. 255 ] charactersrequired

File name

versions[].​created_atstring(date-time)required

Contract version creation timestamp

versions[].​updated_atstring(date-time)required

Contract version update timestamp

Response
application/json
{ "document_id": "00000016-0000-0000-0001-100000000001", "versions": [ {}, {} ] }

Update contract information

Request

Updates information about the specified contract version.

Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

Contract document ID

document_version_idstring(uuid)required

Contract version ID

Bodyapplication/jsonrequired

Update contract information request payload

metadataobject(update_contract_metadata_request)required

Contract metadata update request payload. This schema accepts metadata fields updated by the document metadata update source and document_status_code. Omit document_status_code to keep the current status. Set NONE to clear the current status.

metadata.​titlestring[ 1 .. 1000 ] characters

Contract title

metadata.​language_codestring[ 2 .. 35 ] characters

Contract language code

metadata.​contract_category_positionsArray of objects(contract_category_position)

Contract category, position, and governing law classifications

metadata.​own_partiesArray of strings(party)

Own party names

metadata.​counter_partiesArray of strings(party)

Counter party names

metadata.​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"
curl -i -X PATCH \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/{document_id}/versions/{document_version_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "metadata": {
      "title": "Confidentiality Agreement",
      "language_code": "en",
      "own_parties": [
        "LegalOn Technologies, Inc."
      ],
      "counter_parties": [
        "Example Corp."
      ],
      "contract_category_positions": [
        {
          "category_code": "NDA",
          "position_code": "discloser",
          "governing_law_code": "JP"
        }
      ],
      "document_status_code": "INTERNAL_DRAFT"
    }
  }'

Responses

OK

Bodyapplication/json
document_idstring(uuid)required

Contract document ID

document_version_idstring(uuid)required

Updated contract document version ID

version_numberinteger>= 1required

Version number in the current version list order

updated_atstring(date-time)required

Contract document latest update timestamp

titlestring[ 1 .. 1000 ] characters

Contract title

language_codestring[ 2 .. 35 ] characters

Contract language code

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"
own_partiesArray of strings(party)

Own party names

counter_partiesArray of strings(party)

Counter party names

contract_category_positionsArray of objects(contract_category_position)

Contract category, position, and governing law classifications

Response
application/json
{ "document_id": "00000016-0000-0000-0001-100000000001", "document_version_id": "00000016-0000-0000-0001-100000000101", "version_number": 3, "updated_at": "2026-05-08T03:13:20Z", "title": "Confidentiality Agreement", "language_code": "en", "document_status_code": "INTERNAL_DRAFT", "own_parties": [ "LegalOn Technologies, Inc." ], "counter_parties": [ "Example Corp." ], "contract_category_positions": [ {} ] }

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).

Operations