Skip to content

Data Fetching

Within your Lucid application, you can create new client integrations by navigating to the settings page and then the client integration tab. Once here, you’ll be able to create a new integration.

Creating a new client integration will given you an API key along with a unique key. You will need these to authenticate any requests to client endpoints. The API key that is returned when you create an integration will only ever be shown to you once and will not be retrievable again. However, you can generate a new API key at any time which will replace the old one.

Authenticating Requests

To authenticate a request to a client endpoint you need to pass the API key to the Authorization header, and the client integration key to the lucid-client-key header. The lucid-client-key header is a unique key that is generated for each client integration and is used to identify the integration.

index.ts
fetch('/api/v1/client/locales', {
method: 'GET',
headers: {
'lucid-client-key': '<CLIENT_KEY>',
'Authorization': '<API_KEY>',
}
})

Available Endpoints

To get a better overview of the available endpoints, either check the postman collection that exists at the root of the projects repository or launch Lucid and navigate to the /documentation route.

Documents

  • /api/v1/client/document/page // supports filters
  • /api/v1/client/documents/page // supports filters and pagination

Locales

  • /api/v1/client/locales