{"openapi":"3.1.0","info":{"title":"The Huddle API (by HR with Mike)","version":"1.0.0","description":"REST API for HRIS, L&D, LMS and payroll integrations, and for the mobile app.\n\n**Authentication**: send `Authorization: Bearer <token>`.\n* **API keys** (`cak_live_…`) are created by a business admin under *Integrations*. Scope `read` or `read_write`.\n* **User tokens** (`cat_…`) come from `POST /auth/login` and are used by the mobile app.\n\n**Personal data**: the API only ever holds email, first name, last name, job title and an optional HRIS `external_id`.\n\n**Pagination**: list endpoints return `next_cursor`; pass it back as `?cursor=`.\n\n**Errors**: `{ \"error\": { \"code\": \"…\", \"message\": \"…\" } }` with a suitable HTTP status.\n\n**Webhooks**: each delivery is a POST with JSON body `{ id, type, created_at, company, data }` and headers\n`X-Webhook-Id`, `X-Webhook-Event`, and `X-Webhook-Signature: t=<unix>,v1=<hex>` where `v1 = HMAC_SHA256(secret, \"<t>.<raw body>\")`.\nReject requests older than 5 minutes. Failed deliveries are retried after 1m, 5m, 30m, 2h and 12h.\n\n**Events**: `user.created`, `user.updated`, `user.deactivated`, `training.started`, `policy.acknowledged`, `quiz.attempted`, `training.completed`, `training.overdue`, `training.expiring`, `training.expired`."},"servers":[{"url":"https://app.hrwithmike.com/api/v1"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Company API key (cak_live_…)"},"userToken":{"type":"http","scheme":"bearer","description":"User access token from /auth/login (cat_…)"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"UserInput":{"type":"object","required":["email","first_name","last_name"],"properties":{"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"},"job_title":{"type":"string","description":"Drives training: matched to job families."},"external_id":{"type":"string","description":"Employee ID in your HRIS (optional, unique per company)."},"role":{"type":"string","enum":["learner","company_admin"],"default":"learner"},"send_invite":{"type":"boolean","default":true,"description":"Email an activation link."}}},"User":{"type":"object","properties":{"id":{"type":"integer"},"external_id":{"type":["string","null"]},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"job_title":{"type":["string","null"]},"role":{"type":"string"},"active":{"type":"boolean"},"activated":{"type":"boolean"},"job_families":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}},"required_module_ids":{"type":"array","items":{"type":"integer"}},"last_login_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"JobFamily":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":["string","null"]},"job_titles":{"type":"array","items":{"type":"string"}},"module_ids":{"type":"array","items":{"type":"integer"}}}},"JobFamilyInput":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"job_titles":{"type":"array","items":{"type":"string"},"description":"People with these job titles belong to the family (case-insensitive)."},"module_ids":{"type":"array","items":{"type":"integer"},"description":"Training this family must complete."},"restrict_modules":{"type":"boolean","default":true,"description":"Newly linked modules become role-specific (scope \"families\") unless already configured."}}},"Compliance":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"module":{"type":"object"},"status":{"type":"string","enum":["complete","in_progress","not_started","expired","outdated"]},"overdue":{"type":"boolean"},"due_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"quiz_score":{"type":["integer","null"]}}},"Completion":{"type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/components/schemas/User"},"module_id":{"type":"integer"},"module_title":{"type":"string"},"module_version":{"type":"integer"},"policy_title":{"type":["string","null"]},"quiz_score":{"type":["integer","null"]},"signature":{"type":"string"},"source":{"type":"string"},"completed_at":{"type":"string","format":"date-time"},"certificate_url":{"type":"string"}}},"Webhook":{"type":"object","properties":{"id":{"type":"integer"},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"secret":{"type":"string","description":"Only returned on create / rotate."}}}}},"tags":[{"name":"People (HRIS sync)"},{"name":"Job families & training"},{"name":"Compliance & reporting"},{"name":"Webhooks"},{"name":"Authentication"},{"name":"Mobile app (learner)"}],"paths":{"/users":{"get":{"tags":["People (HRIS sync)"],"summary":"List people","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pass next_cursor from the previous page."},{"name":"email","in":"query","schema":{"type":"string"}},{"name":"external_id","in":"query","schema":{"type":"string"}},{"name":"job_title","in":"query","schema":{"type":"string"}},{"name":"updated_since","in":"query","schema":{"type":"string"}},{"name":"active","in":"query","schema":{"type":"boolean"}}]},"post":{"tags":["People (HRIS sync)"],"summary":"Create a person (sends an activation email by default)","security":[{"apiKey":[]}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/User"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInput"}}}}}},"/users/{id}":{"get":{"tags":["People (HRIS sync)"],"summary":"Get a person","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/User"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]},"patch":{"tags":["People (HRIS sync)"],"summary":"Update name, email, job title, role or active","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/User"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{},"first_name":{},"last_name":{},"job_title":{},"external_id":{},"role":{},"active":{"type":"boolean"}}}}}}},"delete":{"tags":["People (HRIS sync)"],"summary":"Deactivate a person (add ?hard=true to delete; completion records are always kept)","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"hard","in":"query","schema":{"type":"boolean"}}]}},"/users/external/{external_id}":{"put":{"tags":["People (HRIS sync)"],"summary":"Create or update a person by HRIS employee ID","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInput"}}}}}},"/users/sync":{"post":{"tags":["People (HRIS sync)"],"summary":"Bulk sync up to 2000 people; optionally deactivate leavers","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"integer"},"updated":{"type":"integer"},"unchanged":{"type":"integer"},"deactivated":{"type":"integer"},"errors":{"type":"array","items":{"type":"object"}}}}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["users"],"properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/UserInput"}},"deactivate_missing":{"type":"boolean","default":false},"send_invites":{"type":"boolean","default":true}}}}}}}},"/users/{id}/training":{"get":{"tags":["People (HRIS sync)"],"summary":"A person's required training and status","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/users/{id}/send-activation":{"post":{"tags":["People (HRIS sync)"],"summary":"Email a new activation link","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/job-families":{"get":{"tags":["Job families & training"],"summary":"List job families","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JobFamily"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Job families & training"],"summary":"Create a job family","security":[{"apiKey":[]}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JobFamily"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobFamilyInput"}}}}}},"/job-families/{id}":{"get":{"tags":["Job families & training"],"summary":"Get a job family","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]},"patch":{"tags":["Job families & training"],"summary":"Update a job family (arrays replace existing values)","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobFamilyInput"}}}}},"delete":{"tags":["Job families & training"],"summary":"Delete a job family","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/modules":{"get":{"tags":["Job families & training"],"summary":"Training catalogue available to the company, with assignment rules","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/modules/{id}/assignment":{"put":{"tags":["Job families & training"],"summary":"Set who must complete a module","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scope"],"properties":{"scope":{"type":"string","enum":["all","families"]},"job_family_ids":{"type":"array","items":{"type":"integer"}}}}}}}}},"/compliance":{"get":{"tags":["Compliance & reporting"],"summary":"Current status for every person × required module","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Compliance"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"user_id","in":"query","schema":{"type":"integer"}},{"name":"module_id","in":"query","schema":{"type":"integer"}},{"name":"job_family_id","in":"query","schema":{"type":"integer"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"overdue","in":"query","schema":{"type":"boolean"}},{"name":"include_inactive","in":"query","schema":{"type":"boolean"}}]}},"/completions":{"get":{"tags":["Compliance & reporting"],"summary":"Completion records feed (incremental sync)","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Completion"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pass next_cursor from the previous page."},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"user_id","in":"query","schema":{"type":"integer"}},{"name":"module_id","in":"query","schema":{"type":"integer"}}]}},"/analytics":{"get":{"tags":["Compliance & reporting"],"summary":"Completion rates, trends, by module, by job family, people needing attention","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"job_family_id","in":"query","schema":{"type":"integer"}},{"name":"weeks","in":"query","schema":{"type":"integer","default":12}}]}},"/branding":{"get":{"tags":["Authentication"],"summary":"Platform branding, or a business's branding via ?invite_code= (logo, colours, theme)","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}}}}},"/events":{"get":{"tags":["Webhooks"],"summary":"List webhook event types","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Webhooks"],"summary":"Add a webhook endpoint (secret returned once)","security":[{"apiKey":[]}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string"},"description":"Event types, or [\"*\"] for all."}}}}}}}},"/webhooks/{id}":{"patch":{"tags":["Webhooks"],"summary":"Update url, events, active, or rotate_secret","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook endpoint","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/webhooks/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Send a test event","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/webhooks/deliveries":{"get":{"tags":["Webhooks"],"summary":"Recent deliveries and their status","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pass next_cursor from the previous page."}]}},"/auth/login":{"post":{"tags":["Authentication"],"summary":"Sign in (mobile app). Returns a user token (30 days for staff, 7 days for managers), or { mfa_required, mfa_token } when two-step verification is on","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"401":{"$ref":"#/components/responses/Error"}}}},"/auth/mfa":{"post":{"tags":["Authentication"],"summary":"Complete two-step sign-in: exchange mfa_token (from /auth/login when mfa_required is true) and a 6-digit code or recovery code for an access token","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["mfa_token","code"],"properties":{"mfa_token":{"type":"string"},"code":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"401":{"$ref":"#/components/responses/Error"}}}},"/auth/logout":{"post":{"tags":["Mobile app (learner)"],"summary":"Sign out (revokes the token)","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/me/export":{"get":{"tags":["Mobile app (learner)"],"summary":"Download all personal information held about me (APP 12)","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/auth/forgot-password":{"post":{"tags":["Authentication"],"summary":"Email a password reset link","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}}}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{}}}}}}},"/me":{"get":{"tags":["Mobile app (learner)"],"summary":"The signed-in person","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/me/training":{"get":{"tags":["Mobile app (learner)"],"summary":"My required training with status and due dates","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/me/training/{id}":{"get":{"tags":["Mobile app (learner)"],"summary":"Module content: video, policy, quiz questions, progress","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/me/training/{id}/progress":{"post":{"tags":["Mobile app (learner)"],"summary":"Report video watch progress","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seconds":{"type":"number"},"duration":{"type":"number"}}}}}}}},"/me/training/{id}/acknowledge":{"post":{"tags":["Mobile app (learner)"],"summary":"Sign the policy acknowledgement","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agree":{"type":"boolean"},"watched_video":{"type":"boolean"},"signature":{"type":"string","description":"Full name"}}}}}}}},"/me/training/{id}/quiz":{"post":{"tags":["Mobile app (learner)"],"summary":"Submit quiz answers","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"type":"object","additionalProperties":{"type":"integer"},"description":"{ \"<questionId>\": <optionIndex> }"}}}}}}}},"/me/completions":{"get":{"tags":["Mobile app (learner)"],"summary":"My completion records and certificates","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/me/team":{"get":{"tags":["Mobile app (learner)"],"summary":"Team analytics (company admins only)","security":[{"userToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}}}}