Before you assign
You need:- A learner
userIdfromGET /users. - A published scenario slug from
GET /scenariosor the TrainerTwin dashboard.
Create an assignment
201:
practiceUrl is the learner’s direct practice link — send it through your own channel instead of (or alongside) the TrainerTwin email.
Creating the same learner-scenario pair again is safe. TrainerTwin returns the existing assignment with created: false and does not send another email.
Assignment persistence succeeds even when email delivery fails. Check
emailSent instead of retrying the assignment immediately.Change an assignment
Move an assignment to another learner, scenario, or both:practiceUrl (the old link stops working). A no-op update returns changed: false, the existing practiceUrl, and sends no email.
Inspect an assignment
status (pending, used, expired, or cancelled), and practiceUrl.