Access

Create an instance invitation

POST
/api/access/invitations

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

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

Request Body

  1. body
targetEmail*string
Length1 <= length <= 320
expiresAt?integer
Range0 <= value

Response Body

Response for status 201

application/json
  1. response
invitation*
token*string
Length1 <= length
Example Request
curl -X POST 'https://postbot.example/api/access/invitations' \
  -H 'Content-Type: application/json' \
  -d '{
  "targetEmail": "string"
}'
Example Response
{
  "invitation": {
    "id": "string",
    "targetEmail": "string",
    "instanceRole": "member",
    "state": "pending",
    "createdByUserId": "string",
    "expiresAt": 0,
    "acceptedAt": 0,
    "acceptedByUserId": "string",
    "revokedAt": 0,
    "createdAt": 0,
    "updatedAt": 0
  },
  "token": "string"
}

Was this page helpful?