Getting Started with the LifterLMS REST API
Introduction
The LifterLMS REST API is fully integrated with the WordPress REST API and allows LifterLMS resources to be created, read, updated, and deleted using HTTP requests in JSON format. The API uses authentication from LifterLMS REST API Keys, standard WordPress REST API authentication, or methods provided by third party authentication plugins.
Video Tutorial
Requirements
To use the latest version of the REST API you must be using the following:
- LifterLMS Version 3.34.0+.
- WordPress 5.2+.
- Pretty permalinks in
Settings -> Permalinksso that the custom endpoints are supported. Default permalinks will not work. - An SSL certificate.
Authentication
Most requests to the LifterLMS REST API must be authenticated. The examples below use the /wp-json/llms/v1/students endpoint to retrieve a list of students with each of the three authentication methods.
1. LifterLMS REST API Keys
The primary way to authenticate is with a LifterLMS REST API key. There are two ways to send its credentials with a request.
Method A: HTTP Basic Authentication
Basic Authentication is widely supported by REST clients. Pass the Consumer Key as the username and the Consumer Secret as the password.
Example curl command:
Replace example.com with your site’s domain, and the placeholders with the Consumer Key and Consumer Secret you generated. See Generating API Keys below.
curl -X GET "https://example.com/wp-json/llms/v1/students" \ -u "YOUR_CONSUMER_KEY:YOUR_CONSUMER_SECRET"
-u flag in curl encodes the credentials into a standard Authorization: Basic <base64> header.
Method B: Custom HTTP Headers
If your environment blocks Basic Authentication, or you prefer explicit headers, send the credentials in the LifterLMS custom HTTP headers:
X-LLMS-CONSUMER-KEY: your Consumer KeyX-LLMS-CONSUMER-SECRET: your Consumer Secret
Example curl command:
curl -X GET "https://example.com/wp-json/llms/v1/students" \ -H "X-LLMS-CONSUMER-KEY: YOUR_CONSUMER_KEY" \ -H "X-LLMS-CONSUMER-SECRET: YOUR_CONSUMER_SECRET"
2. WordPress Core Authentication
The LifterLMS REST API is built on the WordPress REST API, so the standard WordPress authentication methods also work.
Application Passwords
Application Passwords let you authenticate without exposing your main account password. Generate one in your WordPress dashboard under Users > Profile, then use it with Basic Authentication, the same way as an API key. Application Passwords require WordPress 5.6 or later.
Example curl command:
curl -X GET "https://example.com/wp-json/llms/v1/students" \ -u "your_wordpress_username:your_application_password"
For more on core authentication, see the WordPress REST API Authentication Handbook.
3. Third-Party Authentication Plugins
Most WordPress REST API authentication plugins, including JSON Web Token (JWT) and OAuth plugins, also work with the LifterLMS REST API. Setup and header requirements vary between plugins, so follow your plugin’s documentation.
Generating API Keys
API Keys can be generated on the WordPress admin panel.
To generate a new API key:
Step 1. Navigate to LifterLMS > Settings and click on the “REST API” tab
Step 2. Click the Add API Key button

Step 3. Fill in the fields to create your API Key

- Description: A friendly, human readable name for the API key.
- User: The user who owns the API key. This user will be used to determine what actions are available to the API key based on the user’s capabilities.
- Permissions: Determines what kind of requests can be made by the key.
- “Read” allows
GETrequests to be performed, for example retrieve information about a course or a student. - “Write” allows
POST,PUT,PATCH, andDELETErequests to be performed, for example create or update a course, enroll a student, or delete a lesson. - “Read/Write” allows all requests to be performed.
- Note that the user who owns the key must have the capabilities to perform the action in addition to the key having the required permissions.
- “Read” allows
Step 4. Click the Save button to generate the API key.
Step 5. After your API Key has been generated make sure you copy your API credentials in a secure place or use the “Download Keys” button to save a copy of your credentials to your computer. Note: After leaving the screen the full credentials will not be displayed on screen again

Revoking API Keys
Revoking an API Key deletes it from your database. Requests made with a deleted API key will fail due to authorization errors.
To revoke an API Key:
- Navigate to LifterLMS > Settings and click on the “REST API” tab
- Locate the key you wish to revoke
- Click the “Revoke” link

API Reference
The full API reference is located at https://developer.lifterlms.com/rest-api/.
Disabling the REST API
Should you wish to completely disable the REST API you may do so by adding a constant to your wp-config.php file:
<?php // Don't copy this line!
/**
* Disable the LifterLMS REST API
*
* @since 2019-08-16
*/
// The following line disables the LifterLMS REST API.
define( 'LLMS_REST_DISABLE', true );


