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

Get user group members

Request

Retrieve the user group members

Security
OAuth2ClientCredentials
Path
user_group_idstring(uuid)required

LegalOn-generated user group ID

Query
page_sizeinteger>= 1required

The number of results to retrieve per page

search_querystringnon-empty

Returns users whose username or email address partially matches the specified string. The search target cannot be limited to only username or only email address.

page_tokenstring

Token for getting the previous/next page

curl -i -X GET \
  'https://{api_base_url_without_scheme}/rest/v1/user-groups/{user_group_id}/users?page_size=1&search_query=string&page_token=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
user_idsArray of strings(uuid)required

List of LegalOn-generated user IDs for user group members

next_page_tokenstring

Token to get the next page (omitted if page does not exist)

prev_page_tokenstring

Token to get the prev page (omitted if page does not exist)

total_sizeinteger>= 0required

Total number of users with ACTIVE, INACTIVE, or INVITED status that match the search criteria

Response
application/json
{ "user_ids": [ "76088fa5-1ce5-3ca9-303a-8466c48581ba", "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ], "total_size": 150, "next_page_token": "eyJvZmZz...", "prev_page_token": "eyJvZmZz..." }

Add user group members

Request

Add user group members to the user group. If a specified user already belongs to the user group, no change occurs and the request does not return an error. There is no upper limit on the number of users who can belong to a user group. Up to 100 users can be added in a single request.

Security
OAuth2ClientCredentials
Path
user_group_idstring(uuid)required

LegalOn-generated user group ID

Bodyapplication/jsonrequired

User group member add request

user_group_member_idsArray of strings(uuid)non-emptyrequired

LegalOn-generated user IDs. Users with ACTIVE or INVITED status can be added. Users with INACTIVE status cannot be added and cause an error.

curl -i -X POST \
  'https://{api_base_url_without_scheme}/rest/v1/user-groups/{user_group_id}/users' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_group_member_ids": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ]
  }'

Responses

Created

Bodyapplication/json
user_group_idstring(uuid)required

LegalOn-generated user group ID

display_namestring[ 1 .. 100 ] charactersrequired

User group name. Both full-width and half-width characters count as one character.

descriptionstring[ 0 .. 100 ] characters

User group description. Both full-width and half-width characters count as one character.

member_sizeintegerrequired

Number of users in the group with ACTIVE, INACTIVE, or INVITED status

Response
application/json
{ "user_group_id": "76088fa5-1ce5-3ca9-303a-8466c48581ba", "display_name": "Legal Department", "description": "Contract Review Members", "member_size": 2 }

Remove user group members

Request

Remove user group members from the user group. Up to 100 users can be removed in a single request.

Security
OAuth2ClientCredentials
Path
user_group_idstring(uuid)required

LegalOn-generated user group ID

Bodyapplication/jsonrequired

User group member remove request

user_group_member_idsArray of strings(uuid)non-emptyrequired

LegalOn-generated user IDs. Users with ACTIVE, INACTIVE, or INVITED status can be removed.

curl -i -X DELETE \
  'https://{api_base_url_without_scheme}/rest/v1/user-groups/{user_group_id}/users' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_group_member_ids": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ]
  }'

Responses

OK

Bodyapplication/json
user_group_idstring(uuid)required

LegalOn-generated user group ID

display_namestring[ 1 .. 100 ] charactersrequired

User group name. Both full-width and half-width characters count as one character.

descriptionstring[ 0 .. 100 ] characters

User group description. Both full-width and half-width characters count as one character.

member_sizeintegerrequired

Number of users in the group with ACTIVE, INACTIVE, or INVITED status

Response
application/json
{ "user_group_id": "76088fa5-1ce5-3ca9-303a-8466c48581ba", "display_name": "Legal Department", "description": "Contract Review Members", "member_size": 2 }

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

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