Amba

Messaging

Read and moderate user conversations + messages.

Messaging endpoints are strictly admin-side: stats, listing conversations + messages, and moderating individual messages. The user-facing write path lives under /client/messaging/*.

Source: apps/api/src/routes/admin/messaging.ts.

Endpoints

MethodPathDescription
GET/admin/projects/:projectId/messaging/statsAggregate conversation and message counts.
GET/admin/projects/:projectId/messaging/conversationsPaginated conversations with participant count.
GET/admin/projects/:projectId/messaging/conversations/:conversationId/messagesPaginated messages with sender info.
DELETE/admin/projects/:projectId/messaging/messages/:messageIdHard-delete a message.

GET /admin/projects/:projectId/messaging/stats

Response 200

{
  "data": {
    "total_conversations": 1234,
    "total_messages": 54321,
    "active_conversations_24h": 42
  }
}

Try it:

GET/admin/projects/%7B%7BprojectId%7D%7D/messaging/stats
developer auth
curl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/messaging/stats'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/admin/projects/{projectId}/messaging/stats' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

GET /admin/projects/:projectId/messaging/conversations

Query

ParamDefault
limit50
offset0

Response 200

{
  "data": [{ "id": "…", "type": "…", "created_at": "…", "participant_count": 3 }],
  "total": 100,
  "offset": 0,
  "limit": 50
}

Try it:

GET/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations
developer auth
curl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/admin/projects/{projectId}/messaging/conversations' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

GET /admin/projects/:projectId/messaging/conversations/:conversationId/messages

Paginated messages, newest first, joined to app_users for sender info.

Response 200

{
  "data": [
    {
      "id": "…",
      "conversation_id": "…",
      "sender_id": "…",
      "body": "…",
      "created_at": "…",
      "sender": { "id": "…", "display_name": "…", "avatar_url": "…" }
    }
  ],
  "total": 1234,
  "offset": 0,
  "limit": 50
}

Try it:

GET/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations/%7B%7BconversationId%7D%7D/messages
developer auth
curl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/messaging/conversations/%7B%7BconversationId%7D%7D/messages'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/admin/projects/{projectId}/messaging/conversations/{conversationId}/messages' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

DELETE /admin/projects/:projectId/messaging/messages/:messageId

{ "data": { "deleted": true } }

Try it:

DELETE/admin/projects/%7B%7BprojectId%7D%7D/messaging/messages/%7B%7BmessageId%7D%7D
developer auth
curl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/messaging/messages/%7B%7BmessageId%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X DELETE '${BASE_URL}/admin/projects/{projectId}/messaging/messages/{messageId}' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'