Projects

Invite a member to a project workspace

POST
/api/projects/{projectId}/invitations

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

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

Path Parameters

projectId*string
Length1 <= length

Request Body

  1. body
email*string
Length1 <= length <= 320
role*string
Value in"editor""viewer"

Response Body

Response for status 201

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

Was this page helpful?