Access

Invite a member to a workspace group

POST
/api/workspaces/{workspaceId}/invitations

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

The Better Auth email/password session cookie used by the web application.

Path Parameters

workspaceId*string
Length1 <= length

Request Body

  1. body
email*string
Length1 <= length <= 320
role?string
Value in"admin""member"
teamId?string
Length1 <= length
resend?boolean

Response Body

Response for status 201

application/json
  1. response
invitation*
Example Request
curl -X POST 'https://postbot.example/api/workspaces/string/invitations' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "string"
}'
Example Response
{
  "invitation": {
    "id": "string",
    "email": "string",
    "role": "string",
    "teamId": "string",
    "inviterId": "string",
    "status": "string",
    "expiresAt": 0,
    "createdAt": 0
  }
}

Was this page helpful?