Skip to content
Docs

Invite someone

POST
/api/auth/organization/invite-member

Emails them a link to /invite/<id> (or, without mail set up, the app shows the link to copy). Owners and admins only.

Authorization

session
cookiebetter-auth.session_token<token>

Set by POST /api/auth/sign-in/email.

Request Body

application/json
  1. body
email*string
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,}$
Formatemail
role*string
Value in"member""admin"
organizationId*string

The workspace id.

Response Body

The invitation.

Example Request
curl -X POST 'https://app.useroster.work/api/auth/organization/invite-member' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com",  "role": "member",  "organizationId": "string"}'
Example Response
Empty