Skip to content
Docs

Invite someone by email

POST
/api/workspaces/{ws}/invitations

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.

Authorization

session
cookiebetter-auth.session_token<token>

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

Path Parameters

ws*string

The workspace id (from GET /api/me).

Request Body

application/json
  1. body
email*string

Their 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,}$
Formatemail
Lengthlength <= 320
role?string

member: uses hires. admin: also changes hires, tools and the workspace.

Default"member"
Value in"member""admin"

Response Body

The invitation.

application/json
Example Request
curl -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"}