Install the @iightcms/js-api package to your project:
npm i @iightcms/js-api
You can then create a new connection by importing iight into your project:
import iight from '@iightcms/js-api'
const connection = iight('INSERT_API_KEY')
Here’s how you can create a new connection with the iight JS API package:
import iight from '@iightcms/js-api'
const connection = iight('INSERT_API_KEY')
API keys can be created by navigating to the API Keys screen in your project.

An unauthorised request will return a 401 Unauthorized status and the body:
{
"message": "Unauthenticated."
}
All API endpoints are limited to 60 requests per minute, per client IP. When exceeded the response will return a 429 Too Many Requests status and the body:
{
"message": "Too Many Attempts."
}