Messaging
Read and moderate user conversations + messages.
Admin-side messaging covers stats, listing conversations + messages, moderating individual messages, and server-side membership management — creating conversations and adding/removing participants without a client session. This is the path a server-side matchmaker uses to grow a conversation's membership over time (e.g. an "anonymous chat with your matches" circle that gains members as they qualify). The user-facing write path lives under /client/messaging/*.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /admin/projects/:projectId/messaging/conversations | Create a conversation (zero or more participants). |
| GET | /admin/projects/:projectId/messaging/conversations | Paginated conversations with participant count. |
| POST | /admin/projects/:projectId/messaging/conversations/:conversationId/participants | Add a participant (idempotent). |
| DELETE | /admin/projects/:projectId/messaging/conversations/:conversationId/participants/:userId | Remove a participant (idempotent). |
| GET | /admin/projects/:projectId/messaging/stats | Aggregate conversation and message counts. |
| GET | /admin/projects/:projectId/messaging/conversations/:conversationId/messages | Paginated messages with sender info. |
| DELETE | /admin/projects/:projectId/messaging/messages/:messageId | Hard-delete a message. |
POST /admin/projects/:projectId/messaging/conversations
Create a conversation server-side. Unlike the client create path, this allows zero or more initial participants — a matchmaker can create an empty circle and populate it over time via the add-participant endpoint as users qualify.
Request
| Field | Type | Required | Default |
|---|---|---|---|
type | "direct" | "group" | no | "group" |
name | string | no | null |
participant_ids | uuid[] | no | [] |
Response 201
Errors
400 INVALID_PAYLOAD— badtype/name/participant_ids.422 USER_NOT_FOUND— a supplied participant id is not a registered user.500 CREATE_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversationscurl -X POST 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations'Curl:
POST /admin/projects/:projectId/messaging/conversations/:conversationId/participants
Add a user to a conversation. Idempotent — re-adding an existing member is a no-op that returns already_member: true. Once added, the user can read, send, and receive messages immediately (membership is the delivery gate). This is the matchmaker primitive: as each user qualifies, the server adds them to the circle's conversation.
Request
| Field | Type | Required | Notes |
|---|---|---|---|
user_id | uuid | yes | The user to add. app_user_id accepted. |
Response 200
Errors
400 INVALID_CONVERSATION_ID/400 INVALID_PAYLOAD.404 CONVERSATION_NOT_FOUND— conversation does not exist.404 USER_NOT_FOUND—user_idis not a registered user.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations/%7B%7BconversationId%7D%7D/participantscurl -X POST 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations/%7B%7BconversationId%7D%7D/participants'Curl:
DELETE /admin/projects/:projectId/messaging/conversations/:conversationId/participants/:userId
Remove a user from a conversation. Idempotent — removing a non-member returns removed: false.
Response 200
Errors
400 INVALID_CONVERSATION_ID/400 INVALID_PAYLOAD.404 CONVERSATION_NOT_FOUND— conversation does not exist.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations/%7B%7BconversationId%7D%7D/participants/%7B%7BuserId%7D%7Dcurl -X DELETE 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations/%7B%7BconversationId%7D%7D/participants/%7B%7BuserId%7D%7D'Curl:
GET /admin/projects/:projectId/messaging/stats
Response 200
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/messaging/statscurl -X GET 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/messaging/stats'Curl:
GET /admin/projects/:projectId/messaging/conversations
Query
| Param | Default |
|---|---|
limit | 50 |
offset | 0 |
Response 200
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversationscurl -X GET 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations'Curl:
GET /admin/projects/:projectId/messaging/conversations/:conversationId/messages
Paginated messages, newest first, with each row carrying inlined sender display info.
Response 200
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations/%7B%7BconversationId%7D%7D/messagescurl -X GET 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations/%7B%7BconversationId%7D%7D/messages'Curl:
DELETE /admin/projects/:projectId/messaging/messages/:messageId
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/messaging/messages/%7B%7BmessageId%7D%7Dcurl -X DELETE 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/messaging/messages/%7B%7BmessageId%7D%7D'Curl: