Skip to content

Connect your site to CourseSnap

Your site keeps sign-up and payments. CourseSnap runs the classroom. Three pieces connect them; use the ones you need.

API addresshttps://coursesnap.techneeva.com/api/v1/partnerStudent sitehttps://coursesnap.techneeva.com/{your-academy}

A typical setup

  1. 1
    Someone signs up on your site

    Your server calls PUT /students/{your-user-id}.

  2. 2
    They pay for a course

    Your server calls PUT …/enrollments/{course}.

  3. 3
    They click “Go to course”

    You sign a short token and send them to CourseSnap. They're in, no second password.

  4. 4
    They finish

    We call your server: course.completed, certificate.issued.

  5. 5
    A company buys seats

    POST /groups with the courses and seats, then add each person to it.

API keys

An owner or admin creates keys in Developers → API keys. A key is shown once and belongs to one academy; it decides which academy every call works on. Send it in the Authorization header on every call.

  • · Keep keys on your server. Never put one in a web page or an app people download.
  • · Make one key per site or system, so you can revoke one without touching the others.
  • · JSON in and out, over HTTPS. Times are ISO 8601 in UTC.
GET /v1/partner/courses HTTP/1.1
Host: coursesnap.techneeva.com
Authorization: Bearer cs_live_…

Errors and limits

Errors share one shape. Branch on code; message is plain English you can show to people. Each key can make 600 calls a minute.

StatusCode
400VALIDATION_FAILED
A field is missing or wrong. `details` says which.
400BAD_ID
The student id has characters we don't accept.
400BAD_COURSE
Use the course's slug or id.
400INVALID_CURSOR
The cursor isn't one we gave you. Start again without it.
401INVALID_API_KEY
No key, a wrong key or a revoked key.
404NOT_FOUND
No student, course, learning path or group with that id.
409EMAIL_TAKEN
Another student (with a different id) already uses that email.
409NOT_ENOUGH_SEATS
The group has no seats left. Raise its seats in the app first.
409GROUP_ENDED
The group's access has ended. Change its end date in the app first.
409PATH_EMPTY
The learning path has no published courses yet.
429TOO_MANY_REQUESTS
More than 600 calls in a minute with one key. Wait and try again.
{
  "error": {
    "code": "EMAIL_TAKEN",
    "message": "Another student (with a different id) already uses that email."
  }
}

Partner API

Students are addressed by your user id (externalId), so you never need to store ours. Courses can be named by their slug (their link) or id.

  • Courses: show your catalogue and each course's syllabus on your own site.
  • Students: add them when they sign up, read their progress and quiz results.
  • Enrollments: give a course after a payment, take it away after a refund.
  • Learning paths: give a whole track of courses in one call.
  • Groups: company deals. Make a group with its courses and seats, then add the company's people; their manager can follow progress.

Keeping in step

GET /students and GET /enrollments come in pages, oldest change first. Send nextCursor back as cursor until it's null. Next time, send the last updatedAt you saw as updatedSince to get only what changed. For things that just happened (a course finished, a certificate issued), use webhooks: we tell you within seconds.

Courses

List courses

GET/v1/partner/courses

Every course that isn't archived, A to Z, with what a course card on your site needs: length, level, lesson count, instructors, cover and the course's public page. Students can only take published ones. Use a course's slug (its link) or id in the other calls.

curl -X GET "https://coursesnap.techneeva.com/api/v1/partner/courses" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
[
  {
    "id": "9a1e…",
    "slug": "network-security-basics",
    "title": "Network Security Basics",
    "subtitle": "Protect a small office network",
    "status": "published",
    "level": "beginner",
    "category": "Security",
    "language": "English",
    "coverUrl": "https://…/cover.jpg",
    "durationMin": 185,
    "sectionCount": 6,
    "lessonCount": 28,
    "certificateEnabled": true,
    "instructors": [{ "name": "Maya Chen", "title": "Security lead", "avatarUrl": null }],
    "url": "https://coursesnap.techneeva.com/your-academy/catalog/network-security-basics",
    "publishedAt": "2026-11-20T09:00:00.000Z",
    "updatedAt": "2026-11-24T08:30:00.000Z"
  }
]

Get a course with its outline

GET/v1/partner/courses/{course}

One course with its description and every section and published lesson in order: what you need to show the syllabus on your own course page.

Path
coursestringrequired
The course's slug or id.
curl -X GET "https://coursesnap.techneeva.com/api/v1/partner/courses/network-security-basics" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
{
  "id": "9a1e…",
  "slug": "network-security-basics",
  "title": "Network Security Basics",
  "…": "the same fields as List courses",
  "description": "Learn to lock down a small office network…",
  "sections": [
    {
      "id": "c21d…",
      "title": "Welcome",
      "lessons": [
        { "id": "77ab…", "title": "What you'll build", "type": "video", "durationSec": 312, "freePreview": true },
        { "id": "88bc…", "title": "Course checklist", "type": "pdf", "durationSec": 0, "freePreview": false }
      ]
    }
  ]
}

Students

Create or update a student

PUT/v1/partner/students/{externalId}

Call it when someone signs up on your site, and when they change their name or email. Students are addressed by your own user id. If a student with the same email already exists (added by hand or by import), they are linked to your id instead of duplicated. Safe to repeat.

Path
externalIdstringrequired
Your user id. Letters, numbers and . _ : @ - (up to 128).
Body (JSON)
emailstringrequired
The student's email.
namestringrequired
Shown on certificates and to your team. Up to 120 characters.
curl -X PUT "https://coursesnap.techneeva.com/api/v1/partner/students/sw-1001" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"sam@example.com","name":"Sam Learner"}'
Response 201 created · 200 updated
{
  "id": "3f0c…",
  "externalId": "sw-1001",
  "email": "sam@example.com",
  "name": "Sam Learner",
  "status": "active",
  "enrollments": [],
  "certificates": []
}

Get a student's progress

GET/v1/partner/students/{externalId}

The student with their courses, progress (percent and lessons done), completion dates and certificates with a public link to check each one.

Path
externalIdstringrequired
Your user id.
curl -X GET "https://coursesnap.techneeva.com/api/v1/partner/students/sw-1001" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
{
  "id": "3f0c…",
  "externalId": "sw-1001",
  "email": "sam@example.com",
  "name": "Sam Learner",
  "status": "active",
  "enrollments": [
    {
      "courseId": "9a1e…",
      "courseSlug": "network-security-basics",
      "courseTitle": "Network Security Basics",
      "enrolledAt": "2026-11-24T10:00:00.000Z",
      "expiresAt": null,
      "completedAt": null,
      "lessonsDone": 3,
      "lessonCount": 12,
      "progress": 25
    }
  ],
  "certificates": []
}

List students

GET/v1/partner/students

Every student, page by page, oldest change first. To stay in step, keep the last updatedAt you saw and send it as updatedSince next time: you get only what changed. Students added by hand in CourseSnap have externalId null.

Query
limitnumber
1 to 100 per page. Default 25.
cursorstring
nextCursor from the previous page.
updatedSincestring
Only students changed after this time (ISO 8601).
emailstring
Only the student with this email.
curl -X GET "https://coursesnap.techneeva.com/api/v1/partner/students?limit=100&updatedSince=2026-11-01T00:00:00Z" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
{
  "items": [
    {
      "id": "3f0c…",
      "externalId": "sw-1001",
      "email": "sam@example.com",
      "name": "Sam Learner",
      "status": "active",
      "createdAt": "2026-11-24T10:00:00.000Z",
      "updatedAt": "2026-11-24T10:00:00.000Z"
    }
  ],
  "nextCursor": "eyJ2Ijoi…"
}

Get a student's quiz results

GET/v1/partner/students/{externalId}/quiz-results

Every quiz attempt, newest first: the score, whether they passed and which try it was.

Path
externalIdstringrequired
Your user id.
curl -X GET "https://coursesnap.techneeva.com/api/v1/partner/students/sw-1001/quiz-results" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
[
  {
    "courseId": "9a1e…",
    "courseSlug": "network-security-basics",
    "lessonId": "91fe…",
    "quizTitle": "Firewall basics check",
    "score": 80,
    "passed": true,
    "attempt": 2,
    "submittedAt": "2026-11-25T14:12:00.000Z"
  }
]

Enrollments

Give a course

PUT/v1/partner/students/{externalId}/enrollments/{course}

Call it after a payment. Safe to repeat: an existing enrollment is kept, and its end date changes only if you send one. For a subscription, send the renewal date as expiresAt and call again with the new date each time it renews. Create the student first.

Path
externalIdstringrequired
Your user id.
coursestringrequired
The course's slug or id.
Body (JSON)
expiresAtstring | null
When access ends (ISO 8601). null = lifetime. Leave it out to use the course's own access rule.
curl -X PUT "https://coursesnap.techneeva.com/api/v1/partner/students/sw-1001/enrollments/network-security-basics" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expiresAt":null}'
Response 201 enrolled · 200 already enrolled
{
  "id": "3f0c…",
  "externalId": "sw-1001",
  "email": "sam@example.com",
  "name": "Sam Learner",
  "status": "active",
  "enrollments": [
    {
      "courseId": "9a1e…",
      "courseSlug": "network-security-basics",
      "courseTitle": "Network Security Basics",
      "enrolledAt": "2026-11-24T10:00:00.000Z",
      "expiresAt": null,
      "completedAt": null,
      "lessonsDone": 3,
      "lessonCount": 12,
      "progress": 25
    }
  ],
  "certificates": []
}

Take a course away

DELETE/v1/partner/students/{externalId}/enrollments/{course}

For refunds or ended subscriptions. Progress is kept, so it comes back if they're enrolled again, unless you ask to clear it.

Path
externalIdstringrequired
Your user id.
coursestringrequired
The course's slug or id.
Query
keepProgresstrue | false
Default true. false also clears lesson progress and quiz attempts.
curl -X DELETE "https://coursesnap.techneeva.com/api/v1/partner/students/sw-1001/enrollments/network-security-basics" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 204, no body

List enrollments

GET/v1/partner/enrollments

Every enrollment with its progress, page by page, oldest change first. New progress and completions change updatedAt, so updatedSince is an easy way to pick up what students did since your last sync (webhooks tell you the moment it happens).

Query
limitnumber
1 to 100 per page. Default 25.
cursorstring
nextCursor from the previous page.
updatedSincestring
Only enrollments changed after this time (ISO 8601).
coursestring
Only this course (slug or id).
curl -X GET "https://coursesnap.techneeva.com/api/v1/partner/enrollments?course=network-security-basics&limit=100" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
{
  "items": [
    {
      "studentId": "3f0c…",
      "externalId": "sw-1001",
      "email": "sam@example.com",
      "courseId": "9a1e…",
      "courseSlug": "network-security-basics",
      "enrolledAt": "2026-11-24T10:00:00.000Z",
      "expiresAt": null,
      "completedAt": null,
      "lessonsDone": 3,
      "lessonCount": 12,
      "progress": 25,
      "updatedAt": "2026-11-25T09:41:00.000Z"
    }
  ],
  "nextCursor": null
}

Learning paths

List learning paths

GET/v1/partner/paths

Published learning paths (a set of courses taken in order, like a track or bundle) and their courses.

curl -X GET "https://coursesnap.techneeva.com/api/v1/partner/paths" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
[
  {
    "id": "e4d2…",
    "title": "Security Analyst track",
    "description": "From basics to incident response.",
    "courses": [
      { "id": "9a1e…", "slug": "network-security-basics", "title": "Network Security Basics", "status": "published" },
      { "id": "a2b3…", "slug": "incident-response", "title": "Incident Response", "status": "published" }
    ],
    "updatedAt": "2026-11-26T12:00:00.000Z"
  }
]

Give a learning path

PUT/v1/partner/students/{externalId}/paths/{pathId}

Gives every published course in the path in one call, with the same access rules as Give a course. Safe to repeat. Courses added to the path later aren't given automatically: call it again.

Path
externalIdstringrequired
Your user id.
pathIdstringrequired
The path's id, from List learning paths.
Body (JSON)
expiresAtstring | null
When access ends (ISO 8601). null = lifetime. Leave it out to use each course's own access rule.
curl -X PUT "https://coursesnap.techneeva.com/api/v1/partner/students/sw-1001/paths/e4d2…" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expiresAt":"2027-11-27T00:00:00Z"}'
Response 201 enrolled · 200 already had them
{
  "id": "3f0c…",
  "externalId": "sw-1001",
  "email": "sam@example.com",
  "name": "Sam Learner",
  "status": "active",
  "enrollments": [
    {
      "courseId": "9a1e…",
      "courseSlug": "network-security-basics",
      "courseTitle": "Network Security Basics",
      "enrolledAt": "2026-11-24T10:00:00.000Z",
      "expiresAt": null,
      "completedAt": null,
      "lessonsDone": 3,
      "lessonCount": 12,
      "progress": 25
    }
  ],
  "certificates": []
}

Groups

List groups

GET/v1/partner/groups

Company groups: their courses, seats, how many people are in them and the manager.

curl -X GET "https://coursesnap.techneeva.com/api/v1/partner/groups" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
[
  {
    "id": "5b7c…",
    "name": "Acme Corp",
    "seats": 50,
    "memberCount": 1,
    "manager": { "name": "Mia Boss", "email": "mia@acme.com" },
    "accessEndsAt": "2027-06-30T00:00:00.000Z",
    "courses": [{ "id": "9a1e…", "slug": "network-security-basics", "title": "Network Security Basics" }],
    "createdAt": "2026-11-27T10:00:00.000Z"
  }
]

Create a group

POST/v1/partner/groups

For a company deal: the group's courses, how many seats, an optional end date for everyone's access, and an optional manager. People you add get the group's courses.

Body (JSON)
namestringrequired
Usually the company's name. Up to 120 characters.
seatsnumberrequired
How many people can be in it.
coursesstring[]required
Course slugs or ids.
accessEndsAtstring | null
When everyone's access to the group's courses ends (ISO 8601). Leave out for no end.
manager{ name, email } | null
The company's contact. From the app you can send them a live progress page.
curl -X POST "https://coursesnap.techneeva.com/api/v1/partner/groups" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme Corp","seats":50,"courses":["network-security-basics"],"accessEndsAt":"2027-06-30T00:00:00Z","manager":{"name":"Mia Boss","email":"mia@acme.com"}}'
Response 201
{
  "id": "5b7c…",
  "name": "Acme Corp",
  "seats": 50,
  "memberCount": 0,
  "manager": { "name": "Mia Boss", "email": "mia@acme.com" },
  "accessEndsAt": "2027-06-30T00:00:00.000Z",
  "courses": [{ "id": "9a1e…", "slug": "network-security-basics", "title": "Network Security Basics" }],
  "createdAt": "2026-11-27T10:00:00.000Z",
  "reportUrl": null,
  "members": []
}

Get a group

GET/v1/partner/groups/{groupId}

The group with each person's progress across its courses, and the manager's live report link once one has been made in the app.

Path
groupIdstringrequired
The group's id.
curl -X GET "https://coursesnap.techneeva.com/api/v1/partner/groups/5b7c…" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
{
  "id": "5b7c…",
  "name": "Acme Corp",
  "seats": 50,
  "memberCount": 1,
  "manager": { "name": "Mia Boss", "email": "mia@acme.com" },
  "accessEndsAt": "2027-06-30T00:00:00.000Z",
  "courses": [{ "id": "9a1e…", "slug": "network-security-basics", "title": "Network Security Basics" }],
  "createdAt": "2026-11-27T10:00:00.000Z",
  "reportUrl": null,
  "members": [
    { "studentId": "3f0c…", "externalId": "sw-1001", "name": "Sam Learner", "email": "sam@acme.com", "progress": 25 }
  ]
}

Add a student to a group

PUT/v1/partner/groups/{groupId}/members/{externalId}

The student joins the group and gets its courses. Create the student first. Safe to repeat. Fails when no seats are left or the group's access has ended.

Path
groupIdstringrequired
The group's id.
externalIdstringrequired
Your user id.
curl -X PUT "https://coursesnap.techneeva.com/api/v1/partner/groups/5b7c…/members/sw-1001" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 200
{
  "id": "5b7c…",
  "name": "Acme Corp",
  "seats": 50,
  "memberCount": 1,
  "manager": { "name": "Mia Boss", "email": "mia@acme.com" },
  "accessEndsAt": "2027-06-30T00:00:00.000Z",
  "courses": [{ "id": "9a1e…", "slug": "network-security-basics", "title": "Network Security Basics" }],
  "createdAt": "2026-11-27T10:00:00.000Z",
  "reportUrl": null,
  "members": [
    { "studentId": "3f0c…", "externalId": "sw-1001", "name": "Sam Learner", "email": "sam@acme.com", "progress": 25 }
  ]
}

Remove a student from a group

DELETE/v1/partner/groups/{groupId}/members/{externalId}

Frees their seat. They keep the courses unless you ask to take them away.

Path
groupIdstringrequired
The group's id.
externalIdstringrequired
Your user id.
Query
removeAccesstrue | false
Default false. true also takes the group's courses away.
curl -X DELETE "https://coursesnap.techneeva.com/api/v1/partner/groups/5b7c…/members/sw-1001?removeAccess=true" \
  -H "Authorization: Bearer $COURSESNAP_API_KEY"
Response 204, no body

Single sign-on

Turn it on in Developers → Single sign-on: create the shared secret and add your allowed return URLs. A test link there lets you try it before your side is built.

  1. A signed-in student clicks “Go to course” on your site.
  2. Your server signs a JWT (HS256) with the shared secret, valid for 5 minutes.
  3. You redirect them to https://coursesnap.techneeva.com/{your-academy}/sso?token=…
  4. We check it, add or update the student by sub, sign them in and open the course.

Single sign-on signs students in; it doesn't give courses. Give access with the API first.

import crypto from "node:crypto"
import jwt from "jsonwebtoken" // npm i jsonwebtoken

// On your "Go to course" link, for a signed-in user:
app.get("/go/:course", requireLogin, (req, res) => {
  const token = jwt.sign(
    {
      sub: req.user.id,
      email: req.user.email,
      name: req.user.name,
      course: req.params.course,
      jti: crypto.randomUUID(),
    },
    process.env.COURSESNAP_SSO_SECRET,
    { algorithm: "HS256", expiresIn: "5m" },
  )
  res.redirect(`https://coursesnap.techneeva.com/your-academy/sso?token=${token}`)
})

The token

Claims
substringrequired
Your user id (the same externalId as the API). New students are added on their first sign-in.
emailstringrequired
Their email.
namestring
Their name. Updated each time if sent.
jtistringrequired
A unique id for this token (8 to 200 characters). Each token works once.
expnumberrequired
Expiry, in Unix seconds. At most 10 minutes ahead; 5 minutes is plenty.
iatnumber
When it was made, in Unix seconds.
coursestring
A course slug or id to open after sign-in. Without it, students land on their courses page.
return_tostring
Where “Back to site” and sign-out take them. Must start with one of your allowed return URLs.

When it fails

The student sees a plain message and a way to sign in with their email. These are the reasons, for your developers:

  • SSO_OFFSingle sign-on is turned off for the academy.
  • SSO_INVALIDBad signature, expired, too far ahead, already used, missing claims, or return_to not allowed. The message says which.
  • EMAIL_TAKENAnother student (with a different id) already uses that email.

Webhooks

Add your server's address in Developers → Webhooks and choose events. We send a signed POST with JSON for each one.

  • · Answer with any 2xx within 10 seconds. Do slow work after answering.
  • · Otherwise we try again after 1 min, 5 min, 30 min, 2 h, 6 h, then mark it failed. Every try is in the delivery log, with a Retry button.
  • · Events for one address arrive in order. A retry can bring the same event twice: skip an id you've already handled.
  • · Headers: CourseSnap-Signature, CourseSnap-Event, CourseSnap-Delivery.
{
  "id": "evt_5b0e2c…",
  "type": "course.completed",
  "createdAt": "2026-11-24T10:00:00.000Z",
  "academy": { "id": "ccb6…", "slug": "your-academy" },
  "data": {
    "student": {
      "id": "3f0c…",
      "externalId": "sw-1001",
      "email": "sam@example.com",
      "name": "Sam Learner"
    },
    "course": {
      "id": "9a1e…",
      "slug": "network-security-basics",
      "title": "Network Security Basics"
    }
  }
}

Events

Eventdata has
student.created
Student added
student
student.updated
Student updated
student, changes [name | email | status], status (active | suspended)
enrollment.created
Enrolled in a course
student, course
enrollment.updated
Access date changed
student, course, enrollment { expiresAt, previousExpiresAt } (+ group when a group's end date changed)
enrollment.removed
Removed from a course
student, course
lesson.completed
Lesson completed
student, course, lesson { id, title, type }
course.completed
Course completed
student, course
certificate.issued
Certificate issued
student, course, certificate { code, verifyUrl }
quiz.attempted
Quiz attempted
student, course, lesson, quiz { score, passed, passMark, attempt, attemptsLeft }
assignment.submitted
Assignment handed in
student, course, lesson, assignment { submissionId, attempt, files, hasAnswer }
assignment.reviewed
Assignment reviewed
student, course, lesson, assignment { submissionId, attempt, decision (approved | changes), feedback, reviewedBy }
group.member_added
Added to a group
student, group { id, name }, via (team | link)
group.member_removed
Removed from a group
student, group { id, name }, accessRemoved, groupDeleted
course.published
Course published
course
course.updated
Course updated
course, changes (sent at most once a minute per course)
pingmessage

Check the signature

Every request carries CourseSnap-Signature: t=1764000000,v1=5f2c…

  1. Take t and the raw request body, exactly as received.
  2. Compute HMAC-SHA256 of t + "." + body with the endpoint's signing secret, as hex.
  3. Compare it with v1 in constant time, and reject a t older than 5 minutes.

Each endpoint has its own secret. Making a new one takes effect straight away.

import crypto from "node:crypto"
import express from "express"

// Read the raw body: the signature is over the exact bytes we sent.
app.post("/webhooks/coursesnap", express.raw({ type: "application/json" }), (req, res) => {
  const header = req.get("CourseSnap-Signature") ?? ""
  const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")))
  const expected = crypto
    .createHmac("sha256", process.env.COURSESNAP_WEBHOOK_SECRET)
    .update(`${t}.${req.body}`)
    .digest("hex")
  const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300
  if (!v1 || !fresh || !crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected))) {
    return res.sendStatus(400)
  }
  const event = JSON.parse(req.body)
  // Skip events you've already handled: event.id is the same on a retry.
  handle(event)
  res.sendStatus(200)
})

OpenAPI spec

The partner API as an OpenAPI 3.1 file, for Postman, Insomnia or generating a client.

https://coursesnap.techneeva.com/api/v1/partner/openapi.jsonOpen