Open a direct thread or create a group
Lab only. A direct thread is get-or-create per member pair (201 when created, 200 when it existed) and notifies nobody until its first message. A group includes the caller and notifies its members.
Lab only. A direct thread is get-or-create per member pair (201 when created, 200 when it existed) and notifies nobody until its first message. A group includes the caller and notifies its members.
Production session cookie set for the guidelab.co domain by Better Auth
In: cookie
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/team-chat/threads" \ -H "Content-Type: application/json" \ -d '{ "kind": "dm", "userId": "string" }'{ "thread": { "id": "string", "kind": "dm", "title": "string", "memberUserIds": [ "string" ], "lastSequence": 0, "lastActivityAt": "string", "lastMessage": { "id": "string", "threadId": "string", "sequence": 0, "senderUserId": "string", "body": "string", "attachments": [ { "id": "string", "name": "string", "mimeType": "string", "size": 0 } ], "createdAt": "string" }, "unreadCount": 0 }}{ "thread": { "id": "string", "kind": "dm", "title": "string", "memberUserIds": [ "string" ], "lastSequence": 0, "lastActivityAt": "string", "lastMessage": { "id": "string", "threadId": "string", "sequence": 0, "senderUserId": "string", "body": "string", "attachments": [ { "id": "string", "name": "string", "mimeType": "string", "size": 0 } ], "createdAt": "string" }, "unreadCount": 0 }}Add members to a team chat group POST
Lab only, group members only. New members start caught up and see the history. At most 50 members per group.
Finalize a team chat attachment upload POST
Lab only, the uploader only. Promotes the staged bytes to their immutable key and records their SHA-256; the attachment is then ready to send. Idempotent: an already finalized upload touches no storage.