API reference

API reference

Ce guide n’est pas encore traduit dans votre langue.

The LegalCloud REST API lets you manage documents, sites, resources, statistics and API tokens from your own systems. This page covers the basics shared by every endpoint.

Base URL

EnvironmentURL
Productionhttps://api.legalcloud.info

All endpoints live under /api/…, with the exception of the public pages (/d/{hash}). The API only works over HTTPS.

Interactive reference

The full list of endpoints, parameters and schemas is published as an OpenAPI 3.1 document:

This section of the guide explains the concepts; the console is the exhaustive reference.

Authentication

Create an API token in the dashboard (Organization → API) and send it in every request:

GET /api/documents HTTP/1.1
Host: api.legalcloud.info
Authorization: Bearer lc_...

See Authentication for token types and scopes.

Response format

Successful responses are JSON with this envelope:

{
  "success": true,
  "data": { }
}

Errors use:

{
  "success": false,
  "error": "Human readable message",
  "code": "MACHINE_READABLE_CODE"
}

See Errors reference.

Pagination

List endpoints accept page (starting at 1) and per_page. The response includes total, page and per_page:

curl -H "Authorization: Bearer YOUR_TOKEN" \
     "https://api.legalcloud.info/api/documents?page=2&per_page=20"

Quota and rate limits

Only calls made with an API token count against the quota of your plan; using the dashboard does not. Every response to a token call carries these headers:

HeaderMeaning
X-Quota-LimitCalls included per month in your plan
X-Quota-RemainingCalls left this month
X-Quota-ResetWhen the monthly counter resets
X-RateLimit-LimitCalls allowed per minute
X-RateLimit-RemainingCalls left in the current minute
X-RateLimit-ResetWhen the minute window resets

When you exceed either limit the API answers 429. You can read your usage with GET /api/account/api-usage.

Endpoint groups

GroupEndpointsScope
Documents/api/documents, /api/documents/{id} and their versionsdocuments:read / documents:write
Sites/api/sitessites:read / sites:write
Resources/api/resourcesresources:read / resources:write
Statistics/api/statistics/*documents:read
API tokens and usage/api/account/tokens, /api/account/api-usageorganization:read / organization:write
Public documents/d/{hash}, /d/{hash}/restrictionsnone (or a document token)

Public documents

GET /d/{hash} returns the rendered HTML of a published document. It is the address you embed in an iframe. If the document requires a token, send it as Authorization: Bearer <token> (preferred) or as ?token= (iframes only: the token ends up in logs and browser history). See Embedding documents in your app.

Next steps

Dernière mise à jour: 2026-10-27

Inscrivez-vous GRATUITEMENT à vie, sans carte bancaire

Créer un compte gratuit