Organizations API
Invite a member
Create a pending invitation and send email. Counts accepted invitations per user (INVITE_RATE_LIMIT_MAX, default 10/hour). Authorization, invalid or duplicate requests, and rejected inserts do not consume quota. Requires org_admin or org_owner. Only org_owner can invite org_admin. Requires an interactive browser session. Project-scoped CLI tokens receive 403.
POST
sessionCookiecookie
better-auth.session_token<token>Interactive Better Auth browser session. Secure deployments may use the __Secure- cookie prefix.
application/json- body
email*stringFormat
emailrole*stringValue in
"org_owner""org_admin""project_admin""project_editor""project_viewer"selectedProjects?array<string>Required for project_admin and project_editor. Must be active projects in the current organization.
Invitation created
application/json- response
success?booleandata?curl -X POST 'https://demo.supercheck.dev/api/organizations/members/invite' \ -H 'Content-Type: application/json' \ -d '{ "email": "[email protected]", "role": "org_owner"}'Example Response
{ "success": true, "data": { "id": "string", "email": "string", "role": "string", "status": "string", "expiresAt": "2019-08-24T14:15:22Z", "inviteLink": "string", "emailSent": true }}