All API calls are performed using your Organisation's API Key
which can be found in the developer settings of your Organisation's dashboard. For your convenience, the API key is provided below and it is used in the examples in these docs. Feel free to copy or run these examples as-is.
To authenticate your request, simply add the Authorization
header, set to Organisation YOUR_API_KEY
.
Once the header has been added you can call the Lessonspace API by executing the following:
{
"request": {
"method": "GET",
"url": "https://api.thelessonspace.com/v2/hello/",
"headers": [
{
"name": "Authorization",
"value": "Organisation __API_KEY__"
}
]
},
"response": {
"status": 200,
"httpVersion": "HTTP/2",
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"content": {
"text": "{\"response\":\"The sun is shining and so are you, {name}\"}",
"mimeType": "application/json"
}
}
}
Some API endpoints are rate limited, meaning that more than a certain number of requests in a short timeframe will lead to some of the requests being rejected with the HTTP code 429 Too Many Requests
. Usually the rate limit is 5 requests per second per API key, though this may change dynamically. This is done to keep the API performant for all users. Only a small number of endpoints, with a high risk for abuse (either deliberate or accidental), have rate limiting applied to them; such endpoints are explicitly noted in the descriptions in the API reference.
If you get a 429 code, you can simply retry the request, though you may need to reduce the frequency of calls to have it succeed consistently. The applied rate limits are generous for the intended use case of the relevant endpoints. If you find yourself running into rate limiting consistently, there may be a more efficient way to do what you need to do - most likely with webhooks.