Access

Accept an instance invitation for the current user

POST
/api/access/invitations/accept

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

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

Request Body

  1. body
token*string
Length1 <= length

Response Body

Response for status 200

application/json
  1. response
invitation*
instanceMembership*
Example Request
curl -X POST 'https://postbot.example/api/access/invitations/accept' \  -H 'Content-Type: application/json' \  -d '{  "token": "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  },  "instanceMembership": {    "id": "string",    "userId": "string",    "email": "string",    "name": "string",    "role": "admin",    "state": "enabled",    "createdAt": 0,    "updatedAt": 0  }}

Was this page helpful?