Skip to main content


Link to Github

Link to NPM


Prerequisites: Node and npm

Package includes full Typescript type declarations for all methods and API responses.

npm install @lucidtech/las-sdk-node

Alternatively, using yarn

yarn add @lucidtech/las-sdk-node

Example usage

Using your credentials to create a Client instance, then reading a file and uploading it to Cradl:

import { Client } from '@lucidtech/las-sdk-core';
import { ClientCredentials } from '@lucidtech/las-sdk-node';
import { readFile } from 'fs/promises'

const credentials = new ClientCredentials('<apiEndpoint>', '<clientId>', '<clientSecret>', '<authEndpoint>');
const client = new Client(credentials);
const fileBuffer = await readFile('...path/file.jpg')
const documentResponse = await client.createDocument(fileBuffer, 'image/jpeg');

"documentId": "<documentId>",
"contentType": "image/jpeg",
"retentionInDays": 1825,
"createdTime": "2021-10-08T09:55:20.489723+0000",
"updatedTime": null,
"createdBy": "<userId>",
"updatedBy": null