Skip to main content

Authentication

All API endpoints require authentication using a Bearer token in the Authorization header and an account identifier in the X-Account-ID header.
curl --location 'https://api.us.lexful.app/v1/organizations' \
--header 'X-Account-ID: {YOUR_ACCOUNT_ID}' \
--header 'Authorization: Bearer {TOKEN}'
To generate a Bearer token, use the X-Account-ID, API Key ID, and Secret from the APIs section in Account Settings with the following call:
curl --location 'https://api.us.lexful.app/v1/auth/token' \
--header 'X-Account-Id: {YOUR_ACCOUNT_ID}' \
--header 'Content-Type: application/json' \
--data '{
    "id": "{YOUR_API_KEY_ID}",
    "secret": "{YOUR_API_KEY_SECRET}"
}'