API Versioning
Synopsis
- If you want to send a request to a specific API Version, you will have to define the apiVersion header. See How to Send a Request to a Specific API Version below. Please contact your Lazarus representative to receive the correct date to pass for your apiVersion header.
- If you want the latest API version always, do not specify apiVersion. Your request will default to the latest API version. You will see the apiVersion field with the date of the latest API version in your response body, response headers, and webhook data. This date will update as new API versions are released.
- If you want to check what API version you are, you can send a request to the
/api/version
endpoint. See How to Check Your API Version below.
How to Send a Request to a Specific API Version
To send a request to a specific API version, use the apiVersion header. The header should be a date in the format YYYY-MM-DD
.
The apiVersion in use will be returned in response bodies (including output to outputURL), webhook data, and response headers.
If the apiVersion in your responses does NOT match the apiVersion header you send, this means you’re requesting an invalid version of the API. See How to Check Your API Version for troubleshooting help.
Example curl:
curl --location 'https://api.lazarusai.com/api/rikai/bulk' \
--header 'orgId: ' \
--header 'authKey: ' \
--header 'Content-Type: application/json' \
--header 'apiVersion: 2025-01-01' \
--data '{
"inputURL": "",
"outputURL": "",
"question": ""
} '
How to Check Your API Version
The GET
/api/version
endpoint is used to check what API version you’re sending traffic to.
Sending a request without the apiVersion header will return the default latest version.
curl --location 'https://api.lazarusai.com/api/version' \
--header 'orgId: ' \
--header 'authKey: ' \
Sending a request with the apiVersion header will check that the specified API version is valid.
curl --location 'https://api.lazarusai.com/api/version' \
--header 'orgId: ' \
--header 'authKey: ' \
--header 'apiVersion: ' \