Concepts, value, and typical clone scenarios — less code.
Concepts, value, and typical clone scenarios — less code.
Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Ring Platform messaging combines REST routes under /api/conversations with Tunnel Protocol for live message and typing events. Conceptual SSOT for channel vs subtype: Real-Time Messaging.
Use Founder / Developer tabs in the docs sidebar to filter this page. Older drafts invented a channel conversation type and fabricated SQL — this page matches verified routes and features/chat/types.
Create and filter use this closed channel enum only:
direct | entity | opportunity | product | group
| Field | Role |
|---|---|
type | Channel / routing |
metadata.kind | Optional subtype (e.g. generative_gallery) — open string today |
metadata.hiddenFromInbox | Hide from Messages list when true |
Do not send type: 'channel' or type: 'generative'. Tool editors reuse product + kind + hide flags — see Generative Gallery.
GET /api/conversations ultimately lists via ConversationService.getConversations, which skips isHiddenToolConversation rows (hidden tool chats never pollute the inbox).
Ring Platform messaging combines REST routes under /api/conversations with Tunnel Protocol for live message and typing events. Conceptual SSOT for channel vs subtype: Real-Time Messaging.
Use Founder / Developer tabs in the docs sidebar to filter this page. Older drafts invented a channel conversation type and fabricated SQL — this page matches verified routes and features/chat/types.
Create and filter use this closed channel enum only:
direct | entity | opportunity | product | group
| Field | Role |
|---|---|
type | Channel / routing |
metadata.kind | Optional subtype (e.g. generative_gallery) — open string today |
metadata.hiddenFromInbox | Hide from Messages list when true |
Do not send type: 'channel' or type: 'generative'. Tool editors reuse product + kind + hide flags — see Generative Gallery.
GET /api/conversations ultimately lists via ConversationService.getConversations, which skips isHiddenToolConversation rows (hidden tool chats never pollute the inbox).
Ring Platform messaging combines REST routes under /api/conversations with Tunnel Protocol for live message and typing events. Conceptual SSOT for channel vs subtype: Real-Time Messaging.
Use Founder / Developer tabs in the docs sidebar to filter this page. Older drafts invented a channel conversation type and fabricated SQL — this page matches verified routes and features/chat/types.
Create and filter use this closed channel enum only:
direct | entity | opportunity | product | group
| Field | Role |
|---|---|
type | Channel / routing |
metadata.kind | Optional subtype (e.g. generative_gallery) — open string today |
metadata.hiddenFromInbox | Hide from Messages list when true |
Do not send type: 'channel' or type: 'generative'. Tool editors reuse product + kind + hide flags — see Generative Gallery.
GET /api/conversations ultimately lists via ConversationService.getConversations, which skips isHiddenToolConversation rows (hidden tool chats never pollute the inbox).
/api/conversations/[id] |
| Update conversation |
| DELETE | /api/conversations/[id] | Delete / leave (see route) |
| GET, POST | /api/conversations/[id]/messages | List / send messages |
| POST, GET | /api/conversations/[id]/typing | Typing signal |
| POST, GET | /api/conversations/[id]/read | Mark / read state |
| POST | /api/conversations/upload | Attachment upload |
| POST | /api/conversations/[id]/call-invite | WebRTC invite (direct only) |
| POST | /api/conversations/[id]/call-event | Call signaling event |
GET /api/conversationsQuery params accepted by the route include type (cast to the verified enum above), plus other filter keys wired to ConversationFilters / pagination. Prefer reading app/api/conversations/route.ts for the exact query map — do not assume legacy status=channel samples.
List results omit conversations where isHiddenToolConversation is true (hiddenFromInbox, kind === 'generative_gallery', or legacy genmedia: / imggen: prefixes on productId / subject).
POST /api/conversationsZod create schema (app/api/conversations/route.ts):
type — required enum: direct | entity | opportunity | product | groupparticipantIds — non-empty string arraymetadata — optional object; required when type !== 'direct'entityId for entity, opportunityId for opportunity, productId for product, groupName (min length) for groupkind, hiddenFromInbox, subject, vendorId, …| Method | Path | Notes |
|---|---|---|
| GET | /api/conversations/[id]/messages | Cursor pagination: limit, cursor, direction |
| POST | /api/conversations/[id]/messages | Body: content + optional type, attachments, message metadata |
Message type values in chat types: text | image | file | system | payment_request | env_request | task | poll | rsvp | dao_jar | share_card (SSOT: MESSAGE_TYPE_ALLOWLIST in features/chat/lib/interactive-kind.ts). Message metadata.kind (e.g. payment_request, gallery_upload) is a different namespace from conversation metadata.kind.
| Path | Role |
|---|---|
features/chat/types/index.ts | Conversation, CreateConversationRequest, ConversationFilters |
features/chat/services/conversation-service.ts | List/create + isHiddenToolConversation |
features/chat/services/message-service.ts | Messages |
app/api/conversations/** | HTTP surface |
hooks/use-tunnel-channel.ts | Client subscribe SSOT |
Broader realtime topology.
/api/conversations/[id] |
| Update conversation |
| DELETE | /api/conversations/[id] | Delete / leave (see route) |
| GET, POST | /api/conversations/[id]/messages | List / send messages |
| POST, GET | /api/conversations/[id]/typing | Typing signal |
| POST, GET | /api/conversations/[id]/read | Mark / read state |
| POST | /api/conversations/upload | Attachment upload |
| POST | /api/conversations/[id]/call-invite | WebRTC invite (direct only) |
| POST | /api/conversations/[id]/call-event | Call signaling event |
GET /api/conversationsQuery params accepted by the route include type (cast to the verified enum above), plus other filter keys wired to ConversationFilters / pagination. Prefer reading app/api/conversations/route.ts for the exact query map — do not assume legacy status=channel samples.
List results omit conversations where isHiddenToolConversation is true (hiddenFromInbox, kind === 'generative_gallery', or legacy genmedia: / imggen: prefixes on productId / subject).
POST /api/conversationsZod create schema (app/api/conversations/route.ts):
type — required enum: direct | entity | opportunity | product | groupparticipantIds — non-empty string arraymetadata — optional object; required when type !== 'direct'entityId for entity, opportunityId for opportunity, productId for product, groupName (min length) for groupkind, hiddenFromInbox, subject, vendorId, …| Method | Path | Notes |
|---|---|---|
| GET | /api/conversations/[id]/messages | Cursor pagination: limit, cursor, direction |
| POST | /api/conversations/[id]/messages | Body: content + optional type, attachments, message metadata |
Message type values in chat types: text | image | file | system | payment_request | env_request | task | poll | rsvp | dao_jar | share_card (SSOT: MESSAGE_TYPE_ALLOWLIST in features/chat/lib/interactive-kind.ts). Message metadata.kind (e.g. payment_request, gallery_upload) is a different namespace from conversation metadata.kind.
| Path | Role |
|---|---|
features/chat/types/index.ts | Conversation, CreateConversationRequest, ConversationFilters |
features/chat/services/conversation-service.ts | List/create + isHiddenToolConversation |
features/chat/services/message-service.ts | Messages |
app/api/conversations/** | HTTP surface |
hooks/use-tunnel-channel.ts | Client subscribe SSOT |
Broader realtime topology.
/api/conversations/[id] |
| Update conversation |
| DELETE | /api/conversations/[id] | Delete / leave (see route) |
| GET, POST | /api/conversations/[id]/messages | List / send messages |
| POST, GET | /api/conversations/[id]/typing | Typing signal |
| POST, GET | /api/conversations/[id]/read | Mark / read state |
| POST | /api/conversations/upload | Attachment upload |
| POST | /api/conversations/[id]/call-invite | WebRTC invite (direct only) |
| POST | /api/conversations/[id]/call-event | Call signaling event |
GET /api/conversationsQuery params accepted by the route include type (cast to the verified enum above), plus other filter keys wired to ConversationFilters / pagination. Prefer reading app/api/conversations/route.ts for the exact query map — do not assume legacy status=channel samples.
List results omit conversations where isHiddenToolConversation is true (hiddenFromInbox, kind === 'generative_gallery', or legacy genmedia: / imggen: prefixes on productId / subject).
POST /api/conversationsZod create schema (app/api/conversations/route.ts):
type — required enum: direct | entity | opportunity | product | groupparticipantIds — non-empty string arraymetadata — optional object; required when type !== 'direct'entityId for entity, opportunityId for opportunity, productId for product, groupName (min length) for groupkind, hiddenFromInbox, subject, vendorId, …| Method | Path | Notes |
|---|---|---|
| GET | /api/conversations/[id]/messages | Cursor pagination: limit, cursor, direction |
| POST | /api/conversations/[id]/messages | Body: content + optional type, attachments, message metadata |
Message type values in chat types: text | image | file | system | payment_request | env_request | task | poll | rsvp | dao_jar | share_card (SSOT: MESSAGE_TYPE_ALLOWLIST in features/chat/lib/interactive-kind.ts). Message metadata.kind (e.g. payment_request, gallery_upload) is a different namespace from conversation metadata.kind.
| Path | Role |
|---|---|
features/chat/types/index.ts | Conversation, CreateConversationRequest, ConversationFilters |
features/chat/services/conversation-service.ts | List/create + isHiddenToolConversation |
features/chat/services/message-service.ts | Messages |
app/api/conversations/** | HTTP surface |
hooks/use-tunnel-channel.ts | Client subscribe SSOT |
Broader realtime topology.