autonomous.contact/public/api/rooms/README.md

29 lines
679 B
Markdown
Raw Normal View History

# /api/rooms
Interact with rooms.
## POST /api/rooms
Create a new room.
```
export type ROOM = {
id: string; // unique id for this room
name: string; // the name of the room (max 128 characters)
icon_url?: string; // optional url for a room icon
topic?: string; // optional room topic
tags: string[]; // a list of tags for the room
meta: Record<string, any>;
limits: {
users: number;
user_messages_per_minute: number;
};
creator_id: string; // user_id of the room creator
emojis: Record<string, string>; // either: string: emoji eg: { 'rofl: 🤣, ... } or { 'rofl': 🤣, 'blap': 'https://somewhere.someplace/image.jpg' }
};
```
## GET /api/rooms
Get rooms.