Getting started
How to get started with the Lorikeet webhook API
Prerequisite You will need to have a valid client secret and client id to access the Lorikeet API. Available here.
Environment Variables
To get started with the Lorikeet API, you will need to add the following environment variables to your .env
file.
You’ll also need to be able to generate a signature for the payload you receive from the Lorikeet platform. More on this below.
How to use the API
Our API is available at https://api.lorikeetcx.ai/ingest and you can use it to respond to data requests from the Lorikeet platform.
To allow this you’ll need to configure a single endpoint on a server you own.
This endpoint will be used to receive data requests from the Lorikeet platform.
The request will always be a POST
request with a JSON body as follows.
{
// The expected return url for the data (unqiue per request)
"link": "https://api.optech.ai/ingest/<uuid>/<uuid>",
// The key for the data request - this will map to a tool name you've configured in the Lorikeet platform
"key": "string",
// The data request payload - a dictionary of key value pairs for the data request
"data": {
"key": "value"
}
}
You can respond immediately with a body response and 200 or you can respond with a 202 status code and respond later. If you respond later you should respond within 10 seconds for low latency experiences like chat or within 10 minutes for email.
If responding async you will need to include the required ingest headers in your response. More on this below.
Authentication
To ensure the integrity of your data, we require that you sign the payload you send to the Lorikeet platform.
To do this you will need to generate a signature using the OPTECH_CLIENT_SECRET
environment
variable and use the code snippet or equivalent in your language to generate the signature.
This signature should be included in the x-optech-webhook-signature
header of your response.
If this signature does not match the signature we expect, we will reject the response.
You will also need to include your OPTECH_CLIENT_ID
in the authorization
header as a bearer token.
Was this page helpful?