Authentication
To interact with the Laila API, you need to authenticate every request using an API key.
This key uniquely identifies you and authorizes access to your data.
API Base URLs
The Laila API is available in two environments:
-
Production API:
https://api.laila.legal
Use this for real operations and production workloads. -
Playground API:
https://api-test.laila.legal
Use this environment for testing and experimentation without affecting production data.
Getting an API Key
- Go to app.laila.legal.
- Log in with your account.
- Navigate to Settings → API Keys.
- Generate a new API key (or copy an existing one).
⚠️ Keep your API key secure!
Do not share it publicly or commit it to version control systems.
Sending the API Key
Include the key in the Authorization header of every request, using the Bearer token format:
GET /v1/example-resource HTTP/1.1
Host: api.laila.legal
Authorization: Bearer YOUR_API_KEY_HERE
Example with curl
curl -X GET "https://api.laila.legal/v1/example-resource" \
-H "Authorization: Bearer YOUR_API_KEY_HERE"
Example with JavaScript (fetch)
const response = await fetch("https://api-test.laila.legal/v1/example-resource", {
headers: {
"Authorization": "Bearer YOUR_API_KEY_HERE",
},
});
const data = await response.json();
console.log(data);
Notes
- If your request does not include a valid API key, you will receive a
401 Unauthorizederror. - API keys can be revoked or regenerated at any time from app.laila.legal.
- Make sure to use the correct base URL depending on whether you are testing or running in production.