Access

Create a workspace for the Postdot instance

POST
/api/workspaces

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

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

Request Body

  1. body
name*string
Length1 <= length <= 80

Response Body

Response for status 201

application/json
  1. response
workspace*
Example Request
curl -X POST 'https://postbot.example/api/workspaces' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'
Example Response
{
  "workspace": {
    "id": "string",
    "name": "string",
    "slug": "string",
    "isDefault": true,
    "createdAt": 0,
    "updatedAt": 0,
    "role": "owner"
  }
}

Was this page helpful?