POST /v1/invites → mint a join link or code for a chosen scope. Delivery is decided by `email` + `scope` (there is no `send_email` flag): supply `email` to invite a specific person — this creates an invite row and ClassQuill queues them an email where the platform already does (`organization` always, via a DB trigger; `tutor_student` when an email is given). Omit `email` to get a reusable shareable link/code. Per-scope required/irrelevant fields are validated server-side (422). `organization_id`, tokens, and timestamps are always server-set; the invite RPCs are never called (they are auth.uid()-gated). `emailed: true` in the response means the invite email was QUEUED, not that it was delivered — queueing happens synchronously in this request, but the actual send is async (a 1-minute-cadence cron drains the queue via Resend). Treat `join_url` as the reliable fallback: surface it to the caller/inviter rather than assuming the email will arrive.
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.