Skip to main content
POST
/
room
/
:room_name
Create Room
curl --request POST \
  --url https://api.example.com/room/:room_name \
  --header 'Content-Type: application/json' \
  --data '
{
  "document_name": "<string>",
  "is_private": true
}
'
{
  "status": 123
}
Creates a new room with an initial document. Rooms can be either public or private. Guest users cannot create private rooms.

Authentication

Required. Include the authentication token in the Authorization header.

Path Parameters

room_name
string
required
Name of the room to create. Public room names must be unique across all public rooms.

Request Body

document_name
string
required
Name of the initial document to create in the room.
is_private
boolean
default:false
Whether the room should be private. If true, only users with explicit access can join. Guest users cannot create private rooms.

Response

status
number
Returns 200 on successful room creation.

Errors

  • 400 - Invalid token provided
  • 400 - Public room name already exists
  • 403 - Guest users cannot create private rooms
  • 500 - Internal server error

Example Request

curl -X POST https://api.planttogether.com/room/my-garden-room \
  -H "Authorization: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "document_name": "main-document",
    "is_private": false
  }'

Implementation Details

  • A unique UUID is generated for the room ID
  • The room creator is automatically added as a participant with access
  • Public room names must be unique across the platform
  • Private room names only need to be unique per owner
Source: express/src/index.ts:100-133

Build docs developers (and LLMs) love