Skip to main content

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:


Getting an API Key

  1. Go to app.laila.legal.
  2. Log in with your account.
  3. Navigate to Settings → API Keys.
  4. 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 Unauthorized error.
  • 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.