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

Request

Overview

Partially updates matter fields, the requester, requesting department, status, assignees, and custom attributes in one request.

Processing notes

  • When a requester is specified, LegalOn resolves an active user first; if no matching user exists, it reuses an existing guest or creates a new guest.
  • If requester is omitted, the existing requester is retained; other omitted fields remain unchanged.
Security
OAuth2ClientCredentials
Path
matter_idstring(uuid)required

LegalOn-generated matter ID.

Bodyapplication/jsonrequired

Matter partial update request.

non-empty
titlestring[ 1 .. 200 ] characters

Matter title.

overviewstring[ 1 .. 4000 ] characters

Matter overview.

matter_typestring

Matter type.

Enum"other""legal_request""contract_review""contract_drafting"
due_datestring or null(date-time)

Matter due date. Set to null to clear the due date; omit to leave it unchanged.

status_idstring(uuid)

Status to set.

requesterobject(RequesterInput)

Requester identified by email address and name. A user or guest ID cannot be specified directly.

requesting_department_idstring or null(uuid)

Requesting department to set. Set to null to clear it.

main_assignee_idstring or null(uuid)

Main assignee user ID. Set to null to clear the main assignee.

sub_assignee_idsArray of strings(uuid)<= 30 itemsunique

Complete list of sub-assignee user IDs. An empty array clears all sub-assignees. The same user ID cannot be specified more than once.

custom_attributesArray of objects(MatterCustomAttributePatch)[ 1 .. 50 ] items

Custom attributes to update. Definitions not specified remain unchanged. The same definition ID cannot be specified more than once.

curl -i -X PATCH \
  'https://{api_base_url_without_scheme}/rest/v1/matters/{matter_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Review mutual NDA",
    "due_date": null,
    "status_id": "00000000-0000-0000-0000-000000000002",
    "requester": {
      "email": "requester@example.com",
      "name": "Request User"
    },
    "main_assignee_id": "00000000-0000-0000-0000-000000000004",
    "sub_assignee_ids": [
      "00000000-0000-0000-0000-000000000005"
    ],
    "custom_attributes": [
      {
        "custom_attribute_definition_id": "00000000-0000-0000-0000-000000000010",
        "text_value": "High priority"
      }
    ]
  }'

Responses

No Content

Response
No content

Delete a matter

Request

Deletes the specified matter.

Security
OAuth2ClientCredentials
Path
matter_idstring(uuid)required

LegalOn-generated matter ID.

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

Responses

No Content

Response
No content

List timeline items

Request

Overview

Retrieves paginated timeline items for the specified matter. The initial supported event type is message, and public messages are returned by default. The response uses an event envelope so additional event types can be added without changing the top-level timeline item structure.

Specified fields

Use the page_token, visibility, and page_size query parameters to control the retrieval scope and pagination. See the parameter descriptions for details.

Constraints

  • Returns 404 when the matter does not exist and 403 when the caller cannot view the existing matter.
  • Attachment metadata is not included in the response.

Processing notes

Private messages can contain sensitive information. When requesting private or all messages, ensure that external storage and forwarding preserve appropriate access controls and do not unintentionally share the content.

Related API

Use POST /matters/{matter_id}/messages to create a message.

Security
OAuth2ClientCredentials
Path
matter_idstring(uuid)required

LegalOn-generated matter ID.

Query
visibilitystring(MessageVisibilityFilter)

Message visibility to retrieve. The default is public.

Default "public"
Enum"public""private""all"
page_sizeinteger[ 1 .. 100 ]

Number of timeline items to return per page.

Default 50
page_tokenstring[ 1 .. 4096 ] characters

Opaque token for retrieving the previous or next page.

curl -i -X GET \
  'https://{api_base_url_without_scheme}/rest/v1/matters/{matter_id}/timeline-items?visibility=public&page_size=50&page_token=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
timeline_itemsArray of objects(TimelineItem)required

Timeline items matching the requested visibility.

timeline_items[].​event_typestring(TimelineEventType)required

Public timeline event type. Additional event types can be added without changing the TimelineItem envelope.

Value"message"
timeline_items[].​eventobject(TimelineItemEvent)= 1 propertyrequired

Event-specific timeline payload. The payload property corresponding to event_type is populated. The initial event type uses message.

timeline_items[].​event.​messageobject(MessageTimelineEvent)

Public payload for a message timeline item. Content, author, and is_edited are present for an active message and omitted when the message has been deleted. Attachment metadata is not returned by this API.

total_sizeinteger>= 0required

Total number of matching timeline items.

next_page_tokenstring[ 1 .. 4096 ] characters

Token for retrieving the next page. Omitted when there is no next page.

prev_page_tokenstring[ 1 .. 4096 ] characters

Token for retrieving the previous page. Omitted when there is no previous page.

Response
application/json
{ "timeline_items": [ { … } ], "total_size": 1, "next_page_token": "eyJjYXNlX3RpbWVsaW5lX2V2ZW50X2lkIjoiMDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDMwIiwidHlwZSI6Im5leHQifQ" }

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