Skip to content

LegalOn API (1.2.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

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

Update a matter message

Request

Only the original author can update the content of the specified matter message. Returns 403 for another user and 404 when the message does not exist, belongs to another matter, or has already been deleted.

Security
OAuth2ClientCredentials
Path
matter_idstring(uuid)required

LegalOn-generated matter ID that owns the message.

message_idstring(uuid)required

LegalOn-generated message ID.

Bodyapplication/jsonrequired

Matter message content update request.

contentobject(MessageContent)required

Structured message content. Blocks are displayed in order as paragraphs. The total number of characters across all text and mention user IDs must be between 1 and 4000.

content.​blocksArray of objects(MessageContentBlock)non-emptyrequired

Ordered paragraph blocks. An empty inlines array represents a blank line.

content.​blocks[].​inlinesArray of objects(MessageContentInline)required

Ordered inline content in this paragraph. Specify an empty array to represent a blank line.

content.​blocks[].​inlines[].​typestringrequired

Inline content type.

Enum"text""mention"
content.​blocks[].​inlines[].​textstring[ 1 .. 4000 ] characters

Text to display. Required when type is text and omitted when type is mention.

content.​blocks[].​inlines[].​user_idstring(uuid)

LegalOn-generated ID of the user to mention. Required when type is mention and omitted when type is text.

content.​blocks[].​inlines[].​marksArray of strings(MessageInlineMarks)<= 3 itemsunique

Text decorations applied to the inline content. Omitted when no decoration is applied. The order has no meaning.

Items Enum"bold""strikethrough""underline"
curl -i -X PATCH \
  'https://{api_base_url_without_scheme}/rest/v1/matters/{matter_id}/messages/{message_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": {
      "blocks": [
        {
          "inlines": [
            {
              "type": "text",
              "text": "Please review the revised draft with ",
              "marks": [
                "underline"
              ]
            },
            {
              "type": "mention",
              "user_id": "00000000-0000-0000-0000-000000000001"
            }
          ]
        }
      ]
    }
  }'

Responses

No Content

Response
No content

Delete a matter message

Request

Only the original author can logically delete the specified matter message. Returns 403 for another user and 404 when the message does not exist, belongs to another matter, or has already been deleted.

Security
OAuth2ClientCredentials
Path
matter_idstring(uuid)required

LegalOn-generated matter ID that owns the message.

message_idstring(uuid)required

LegalOn-generated message ID.

curl -i -X DELETE \
  'https://{api_base_url_without_scheme}/rest/v1/matters/{matter_id}/messages/{message_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

No Content

Response
No content

Files

Operations to create files for use by LegalOn resources.

Operations

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