Docs Guides

Selling and onboarding

From a purchase on your site to learners enrolled, with seats and roles.

This is the flow for selling training to businesses. Payment stays in your system (Stripe, Shopify, anything). You only tell No BS LMS what was bought.

customer pays on your site
   └─► your backend:  POST /organizations/{id}/licenses
         └─► manager invites staff, picking each one's role
               └─► staff accept ─► enrolled in their role's courses

One-time setup#

A product is a bundle of courses, linked to your SKU:

curl -X POST "$LMS_URL/api/v1/products" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "slug": "complete-pack",
  "name": "Complete Pack",
  "externalRef": "SKU-COMPLETE",
  "courseIds": [
    "4b2e8f90-1d73-4c5a-9e06-a8f1d3b7c254"
  ]
}'

A role says which courses each kind of person gets:

curl -X POST "$LMS_URL/api/v1/member-roles" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "technician",
  "name": "Technician"
}'
ROLE_ID=164531fc-5f9b-4b3c-9db7-887248454524
curl -X PUT "$LMS_URL/api/v1/member-roles/$ROLE_ID/courses" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "assignments": [
    {
      "courseId": "4b2e8f90-1d73-4c5a-9e06-a8f1d3b7c254",
      "dueAfterDays": 30,
      "onRoleRemoved": "KEEP"
    }
  ]
}'

Per purchase#

The customer, once:

curl -X POST "$LMS_URL/api/v1/organizations" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Acme Auto",
  "externalRef": "cust_123"
}'

Then the license, using your order id:

ORGANIZATION_ID=44b78147-d73b-4117-9536-da80f8fe9841
curl -X POST "$LMS_URL/api/v1/organizations/$ORGANIZATION_ID/licenses" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "productId": "8a2c5e71-3b9d-4f06-a1e4-6d7c0b2f9e35",
  "seats": 25,
  "endsAt": "2027-11-25T00:00:00Z",
  "externalRef": "order-5001"
}'

externalRef makes the call idempotent: replaying the same order returns the existing license (200) instead of creating another (201). Safe for retried webhooks from your payment provider.

Seats#

seats is yours to set per license (omit for unlimited). Each person with an active enrollment under a license uses one seat; completing or withdrawing releases it. Seats are enforced under a database lock, so two people accepting at once can never exceed the limit.

Inviting people#

ORGANIZATION_ID=44b78147-d73b-4117-9536-da80f8fe9841
curl -X POST "$LMS_URL/api/v1/organizations/$ORGANIZATION_ID/invitations" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "tom@acme.example",
  "access": "MEMBER",
  "roleId": "2f6a1c93-5d08-4b7e-9a34-c1e8d0f7b625"
}'

Invitations expire after 7 days. The invitee accepts with POST /invitations/accept and the token from the email; a new person also gives a name and password. No account exists until acceptance.

If seats are short at that moment, acceptance is rolled back and the invitation stays pending.

Warning

Email delivery is a stand-in today: messages are logged, not sent. Connect your provider behind the Mailer interface before going live. See Limits and roadmap.

Changing roles later#

Changing a member’s role (or a role’s courses) reconciles enrollments in one transaction. Each assignment’s onRoleRemoved decides whether courses are KEEP-ed or WITHDRAWn.

Individuals#

One person buying for themselves is an organization with kind: INDIVIDUAL and one seat. It uses exactly the same path.

Type to search guides and every endpoint.