autonomous.contact/public/api/zones
2025-09-09 15:32:07 -07:00
..
:zone_id refactor: rooms => zones 2025-09-09 15:32:07 -07:00
index.ts refactor: rooms => zones 2025-09-09 15:32:07 -07:00
README.md refactor: rooms => zones 2025-09-09 15:32:07 -07:00

/api/zones

Interact with zones.

POST /api/zones

Create a new zone.

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

GET /api/zones

Get zones.