Access

List workspaces available to the current user

GET
/api/workspaces

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
workspaces*array<>
canCreateWorkspace*boolean
Example Request
curl -X GET 'https://postbot.example/api/workspaces'
Example Response
{
  "workspaces": [
    {
      "id": "string",
      "name": "string",
      "slug": "string",
      "isDefault": true,
      "createdAt": 0,
      "updatedAt": 0,
      "role": "owner"
    }
  ],
  "canCreateWorkspace": true
}

Was this page helpful?