Access

Get the current user instance access summary

GET
/api/access

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

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

Response Body

Response for status 200

application/json
  1. response
instance*
membership*|null
isAdmin*boolean
Example Request
curl -X GET 'https://postbot.example/api/access'
Example Response
{
  "instance": {
    "id": "default",
    "state": "claimable",
    "bootstrapBlocked": true,
    "claimedByUserId": "string",
    "claimedAt": 0,
    "defaultWorkspaceId": "string",
    "createdAt": 0,
    "updatedAt": 0
  },
  "membership": {
    "id": "string",
    "userId": "string",
    "email": "string",
    "name": "string",
    "role": "admin",
    "state": "enabled",
    "createdAt": 0,
    "updatedAt": 0
  },
  "isAdmin": true
}

Was this page helpful?