TalentLMS Public API
TalentLMS offers a range of API endpoints and resources designed to integrate TalentLMS with your internal systems seamlessly. It is organized around Representational State Transfer (REST) and is built to leverage standard HTTP features such as HTTP authentication and HTTP response codes, ensuring seamless integration. All API responses, including error messages, are consistently formatted in JSON for easy parsing and handling.
If your TalentLMS domain is called βsamplesβ, then the API endpoint for your domain is https://samples.talentlms.com/api/v2.
The current version of the API consumes data β information about users, courses, categories, groups, branches, and general details about your domain. Apart from that, via the API you can log in / sign up a user in your domain, enroll a user in a course, and much more. Please make sure, that you are accessing the URLs below, under HTTPs connections, otherwise, you will receive an error.
π Getting Started Guideβ
To start using the TalentLMS API, you must first enable the API and generate a valid API key from the portal's settings (Account & Settings > Integrations > API).
Keep in mind:
-
The pagination limit of each request is 100.
-
The API has rate and usage limits (e.g. 2000 requests per hour).
-
The API returns request responses in JSON format. When an API request returns an error, it is sent in the JSON response as an error key (All calls must have an Accept: application/json header value).
-
In each request you must add the desired version of the API by adding the header option with the key
X-API-Versionand value (the format of the version must beYYYY-MM-DD).
π Authenticationβ
All of the requests require authentication. Our API uses the API Key authorization method, with key X-API-Key and value your_api_key. You can always fill these fields in the global variables or create an environment and insert them there.
βοΈ Authentication error responseβ
You will receive an HTTP 401 Unauthorized response code if the API key is missing, incorrectly formatted, or invalid.
β API Responsesβ
TalentLMS API uses HTTP response codes to indicate the success or failure of requests. Specifically, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided arguments (e.g. instead of an integer a string is supplied), and the 500 error code indicates an internal TalentLMS error. Please be aware that you will receive an error too, in case you try to access an endpoint via non HTTPs connection.
All errors return JSON consisting of a type (invalid_request_error or api_error) and a message describing the error.
| Code | Description |
|---|---|
| 200 | The request was executed properly and a JSON response is returned. |
| 204 | No content, and the operation was executed successfully. |
| 400 | A required parameter is missing or an invalid type (e.g. a string) was supplied instead of an integer. |
| 401 | Invalid API key provided. |
| 403 | API is not enabled for the specified domain or the domain is currently inactive. |
| 404 | The requested resource (e.g. user) does not exist. |
| 422 | Malformed response. |
| 429 | The API request rate limit has been exceeded. |
| 500 | Internal server error. |
π Rate Limitsβ
Rate limits represent the maximum number of API requests that are permitted to be made
per hour. These limits depend on your subscription plan and are as follows:
| Plan | Limit |
|---|---|
| Core | 2.000 |
| Grow | 10.000 |
| Pro | 10.000 |
| Small | 2.000 |
| Basic | 2.000 |
| Plus | 10.000 |
| Premium | 10.000 |
| Custom | Contact us so we can create a plan that fits your needs |
Regardless of the total API requests per hour provisioned per customer, each customer's API requests should not exceed the rate of 200 API calls per 5 seconds. The following headers are included in API responses to help manage rate limits:
-
X-RateLimit-Limit: The maximum number of requests allowed in the current time window -
X-RateLimit-Remaining: The number of requests left in the current window before hitting the limit
π Paginationβ
Our API supports pagination, splitting responses into size-customizable chunks of up to 100 items per request. You can navigate to the first, last, previous, or next page. The endpoints that support pagination return a list formatted as shown below:
{
"self": "https://example.talentlms.com/api/v2/users?page[number]=1&page[size]=10",
"first": "https://example.talentlms.com/api/v2/users?page[number]=1&page[size]=10",
"last": "https://example.talentlms.com/api/v2/users?page[number]=4&page[size]=10",
"prev": "https://example.talentlms.com/api/v2/users?page[number]=1&page[size]=10",
"next": "https://example.talentlms.com/api/v2/users?page[number]=2&page[size]=10"
}
Authenticationβ
- Apikey Auth
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | apikey |