Invite someone by email
POST
Owners and admins only. Emails them a link to accept (without mail set up, the link is in the server log). An invitation already waiting for that address is replaced; someone already in the workspace isn't invited.
sessioncookie
better-auth.session_token<token>Set by POST /api/auth/sign-in/email.
ws*stringThe workspace id (from GET /api/me).
application/json- body
email*stringTheir email address; the invitation link goes there.
Match
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Format
emailLength
length <= 320role?stringmember: uses hires. admin: also changes hires, tools and the workspace.
Default
"member"Value in
"member""admin"The invitation.
application/jsoncurl -X POST 'https://app.useroster.work/api/workspaces/string/invitations' \ -H 'Content-Type: application/json' \ -d '{ "email": "user@example.com"}'Example Response
{ "id": "inv_1", "email": "sam@acme.com", "role": "member", "status": "pending", "expiresAt": "2026-11-05T09:00:00.000Z"}