How to Use the Tutor LMS Pro REST API
Create courses, lessons, quizzes and enrollments over HTTP with the Tutor LMS Pro REST API: API keys and permissions, the tutor/v1 endpoints Pro adds, a working request and security tips.
Checked against the plugin source: Tutor LMS 4.1.3, Tutor LMS Pro 4.1.3

The free Tutor LMS plugin has a read-only REST API for courses, topics, lessons, quizzes and ratings. Tutor LMS Pro adds write endpoints to the same tutor/v1 namespace, so other systems can create courses, enroll students, mark lessons complete and more. This guide follows Tutor LMS Pro 4.1.3.
Step 1: Create an API key and secret
- Go to Tutor LMS > Tools > Rest API.
- Click Add New ("Generate API Key, Secret").
- Choose a permission and add a description, such as the system that will use it.
- Copy the key and secret and store them in that system's secret store.
The free plugin offers only Read. With Pro you can also choose Write, Read/Write, Delete or All. Give each integration the smallest permission it needs. Keys can be edited or revoked from the same list.
Step 2: Authenticate
Send the key and secret with HTTP Basic authentication: the header is Authorization: Basic base64(key:secret). Every request must use HTTPS, because Basic credentials are only encoded, not encrypted.
Write endpoints accept keys with Write, Read/Write or All; read endpoints accept Read, Read/Write or All; delete endpoints need Delete or All.
What Pro adds
| Area | Endpoints (under /wp-json/tutor/v1/) |
|---|---|
| Courses | courses (create), courses/{id} (update, delete), course-mark-complete |
| Curriculum | topics, lessons, lesson-mark-complete, quizzes, quiz-questions |
| Assignments | assignments, assignment-submit, assignment-attachment |
| Students | enrollments (create, list, change status), quiz-attempts, students |
| Community | qna, qna-mark-read-unread, reviews, wishlists |
| Profile | profile, update-profile, upload-photo, delete-photo, update-password, become-instructor |
Example: enroll a student
POST /wp-json/tutor/v1/enrollments requires course_id and user_id. It calls Tutor LMS's normal enrollment function, so the usual enrollment hooks fire.
curl -X POST "https://example.com/wp-json/tutor/v1/enrollments" \
-u "YOUR_KEY:YOUR_SECRET" \
-d "course_id=123" \
-d "user_id=45"
A success response includes enrollment_id. To list a course's enrollments, send GET to the same endpoint with course_id.
Example: create a course
POST /wp-json/tutor/v1/courses requires post_author, post_content, post_title, post_status and course_level. Create topics and lessons next with the topics and lessons endpoints, linking each to its parent ID.
Common problems
- 401 or "permission" errors on a correct key: some Apache and CGI setups strip the
Authorizationheader before PHP sees it. Ask your host to pass it through. - Write calls refused: the key has Read only. Edit its permission.
- Validation errors: a required field is missing; the response lists which.
Security checklist
- One key per integration, with the narrowest permission.
- Store secrets server-side only, never in a mobile app or browser code.
- Revoke keys when a contractor or integration is retired.
Frequently asked questions
Can I write data with the free plugin's API?
No. The free API is read-only. Write endpoints come with Tutor LMS Pro.
Does enrolling through the API trigger emails and hooks?
Yes. The endpoint uses the same enrollment function as the rest of Tutor LMS, so tutor_after_enroll fires as usual.
Connecting Tutor LMS to another platform? Our API development team builds and secures integrations.
Save this practical guide
Add us as a preferred Google source, or ask an AI assistant to summarize this page and link back to the original guide when it is useful.
