Every Space has a live message thread. You can contribute text, attach images, videos, or audio, and appreciate messages from other participants. All activity is delivered in real time via Socket.IO so you never need to manually refresh to see new content.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sam-shervin/space7/llms.txt
Use this file to discover all available pages before exploring further.
Message structure
| Field | Description |
|---|---|
message_id | Unique identifier for the message |
space_id | The Space this message belongs to |
sender_id | user_id of the author |
content | Plain-text body of the message (may be empty if media-only) |
media_url | CDN URL of the attached file, or null |
media_type | "image", "video", "audio", or null |
word_count | Server-computed word count of content, used for contribution stats |
sender | Embedded creator object with username and profile_picture |
likes | Array of users who have appreciated this message |
appreciation_count | Denormalised count of appreciations for fast display |
created_at | ISO-8601 timestamp |
Sending a text message
Type your message
Tap the text input in the composer bar at the bottom of the Space and type your message.
Send
Tap Send. The app calls
POST /api/messages/:spaceId using multipart/form-data. The content field is trimmed before sending — whitespace-only messages are rejected.Every message must contain either non-empty
content, an attached media file, or both. Sending a completely empty message is blocked client-side before the API call is made.Attaching media
Tap Media in the composer bar to open the media picker sheet. You can attach one file per message.- Image
- Video
- Audio
Select Image in the picker sheet. The native document picker opens filtered to image files. The selected image is previewed in the composer as a thumbnail before sending. Once sent, recipients see the image inline and can tap it to toggle between a compact (180 px) and expanded (320 px) view.
FormData field alongside the optional content text:
Appreciating messages
Tap the appreciation button (👍) on any message to toggle your appreciation. Theappreciation_count updates immediately in the UI and the change is broadcast to all other participants via the message_appreciated Socket.IO event.
appreciated flag in the response tells you the resulting state.
Deleting your own messages
You can delete any message you sent. The delete button is only shown whenmessage.sender_id === currentUser.user_id.
Real-time delivery via Socket.IO
When you open a Space the app establishes a WebSocket connection authenticated with your session token, then emitsjoin_space with the Space ID.
The socket uses the
websocket transport exclusively — long-polling is not used.Sorting messages
Tap the overflow menu (…) in the Space header to change the sort order.| Sort option | Behaviour |
|---|---|
| Recent (default) | Messages ordered newest-first |
| Top | Messages ordered by appreciation_count descending |
GET /api/messages/:spaceId?sort=recent or ?sort=most_appreciated.
Pagination
The messages API is paginated. Responses include metadata you can use to load additional pages:page and limit as query parameters to paginate:
