cURL
curl --request POST \ --url https://api.staging.whilst.app/api/users/invite \ --header 'Content-Type: application/json' \ --cookie whilst_session= \ --data ' { "email": "colleague@acme.com", "role": "member" } '
{ "success": true, "message": "<string>", "invitationId": "<string>", "invitationUrl": "<string>" }
Sends an invitation email to join the authenticated user’s workspace. Requires admin role. Uses WorkOS invitations if available, otherwise sends custom email with signup link.
JWT session token for authenticated users
Email address of the user to invite
"colleague@acme.com"
Role to assign to the invited user
admin
member
Invitation sent successfully
WorkOS invitation ID (if available)
Direct signup URL (fallback method)
Was this page helpful?