Articles in this section

How to Generate and Manage API Keys

Published:

API Keys allow you to securely authenticate applications and integrate with the platform programmatically. You can generate multiple API keys for different applications, rotate keys when needed, and access API documentation with ready-to-use endpoint examples.

Before You Begin

  • You must have Organization Admin access.

  • Keep your API keys secure and never expose them in public repositories or client-side applications.

  • Every API request requires both an API Key and your Domain ID.

Generate an API Key

Step 1: Open API Settings

Navigate to Global Settings and select API.

1

Step 2: Create a New API Key

Enter a 'Descriptive Name' for the API key, then click 'Generate'.

2

Step 3: Manage API Keys

A new API key is created and added to the list. 'Copy the API Key' for later use.

For each API key, you can perform the following actions:

  • View the complete API key.

  • Copy the API key to your clipboard.

  • Rename the API key.

  • Regenerate the API key if it has been compromised.

  • Delete an API key that is no longer required.

Regenerating an API key immediately invalidates the previous key. Any integrations using the old key must be updated.

3

View Available API Endpoints

Step 4: Open the Endpoints Tab

Click the 'Endpoints' tab to view the complete API documentation.

4

Authenticate API Requests

Every request must include both your 'API Key' and 'Domain ID' in the request headers.

X-API-Key: your_api_key_here
X-Domain-ID: your_domain_id

Your 'Domain ID' is displayed on the API documentation page and must be included in every request.

Understanding Resource IDs

Some endpoints contain an :id parameter.

Replace :id with the UUID of the resource you want to access.

Example

/api/v1/courses/:id

becomes

/api/v1/courses/99818a18-1d22-46a1-8ce2-0e093ae74f96

You can copy resource IDs from pages such as:

  • Courses

  • Assessments

  • Teams

  • People

Use the displayed ID or the 'Copy ID' option available in the item menu.

Common API Endpoints

The API supports endpoints for managing learning content, users, teams, enrollments, and learner progress.

Courses

MethodEndpointPurpose
GET/api/v1/coursesList all courses
GET/api/v1/courses/:idRetrieve course details
POST/api/v1/coursesCreate a course

Assessments

MethodEndpointPurpose
GET/api/v1/assessmentsList assessments
GET/api/v1/assessments/:idRetrieve assessment details

Learners

MethodEndpointPurpose
GET/api/v1/learners/:id/progressView learner progress
GET/api/v1/learners/:id/assessmentsView learner assessment results

Teams

MethodEndpointPurpose
GET/api/v1/teams/:id/progressView team learning progress
GET/api/v1/teams/:id/assessmentsView team assessment results
POST/api/v1/teamsCreate a team
DELETE/api/v1/teams/:idDelete a team

Users

MethodEndpointPurpose
POST/api/v1/usersCreate a user
DELETE/api/v1/users/:idDelete a user

Enrollments

MethodEndpointPurpose
POST/api/v1/enrollments/courseEnroll a learner in a course
DELETE/api/v1/enrollments/course/:user_id/:course_idRemove a learner from a course
POST/api/v1/enrollments/assessmentEnroll a learner in an assessment
DELETE/api/v1/enrollments/assessment/:user_id/:assessment_idRemove a learner from an assessment

Common API Error Codes

If an API request fails, the response includes a standard HTTP status code.

Status CodeDescription
400Bad Request. The request contains invalid data.
401Unauthorized. The API Key or Domain ID is invalid.
403Forbidden. You do not have permission to access the resource.
404Not Found. The requested resource does not exist.
405Method Not Allowed. The endpoint does not support the requested HTTP method.
406Not Acceptable. Only JSON responses are supported.
429Too Many Requests. The API rate limit has been exceeded.
500Internal Server Error. An unexpected server error occurred.
503Service Unavailable. The service is temporarily unavailable due to maintenance.

Best Practices

  • Create separate API keys for different applications or environments.

  • Store API keys securely and avoid exposing them in client-side code.

  • Regenerate API keys immediately if you suspect they have been compromised.

  • Delete unused API keys to reduce security risks.

  • Always include both the API Key and Domain ID in every request.

  • Test API calls using the sample requests available in the Endpoints tab before deploying them to production.

You have successfully learned how to generate, manage, and use API keys for secure integrations. Use the API documentation to explore available endpoints and build custom integrations with your learning platform.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied