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

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

Move files to another workspace

Request

Moves the specified files to the destination workspace. Each file ID is returned in succeeded_file_ids or failed_file_ids depending on whether the move succeeded.

Security
OAuth2ClientCredentials
Bodyapplication/jsonrequired
destination_workspace_idstring(uuid)required

Destination workspace ID

file_idsArray of strings(uuid)required

File IDs to move

curl -i -X POST \
  'https://{api_base_url_without_scheme}/rest/v1/files:move' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "destination_workspace_id": "00000000-0000-0000-0000-000000000003",
    "file_ids": [
      "00000016-0000-0000-0001-100000000001",
      "00000016-0000-0000-0001-100000000002"
    ]
  }'

Responses

The request was processed. File IDs are separated by result; this response does not include failure reasons.

Bodyapplication/json
succeeded_file_idsArray of strings(uuid)required

File IDs that were moved successfully.

failed_file_idsArray of strings(uuid)required

File IDs that could not be moved.

Response
application/json
{ "succeeded_file_ids": [ "00000016-0000-0000-0001-100000000001" ], "failed_file_ids": [ "00000016-0000-0000-0001-100000000002" ] }

Delete a file

Request

Deletes the specified file, including when it is referenced by another resource.

Security
OAuth2ClientCredentials
Path
file_idstring(uuid)required

File ID

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

Responses

Deleted

Response
No content

Get a file download URL

Request

Overview

Returns a short-lived signed URL for the requested file.

Processing notes

  • If file_version_id is omitted, the latest version is used.
  • The URL is a bearer credential; use it promptly and do not log or share it.
  • The API does not return a guaranteed expiration time.
Security
OAuth2ClientCredentials
Path
file_idstring(uuid)required

File ID

Query
file_version_idstring(uuid)

File version ID. If omitted, the latest version is used.

curl -i -X GET \
  'https://{api_base_url_without_scheme}/rest/v1/files/{file_id}:download?file_version_id=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
file_namestringrequired

File name of the requested version, including its extension. Use this name when saving the downloaded content.

Example: "contract.docx"
urlstring(uri)required

Signed download URL.

  • Do not log or share this value.
Example: "https://storage.example.com/signed-download-url"
Response
application/json
{ "file_name": "contract.docx", "url": "https://storage.example.com/signed-download-url" }

Workspaces

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

Operations