API ReferenceChats
Create or fetch a conversation with the given participants.
Authorization
bearerAuth AuthorizationBearer <token>
AdonisJS access-token guard (middleware.auth({ guards: ["api"] })). Send Authorization: Bearer <oat_…> (issued by /auth/register, /auth/login, /auth/social/{google,apple}, or /auth/guest).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/chats" \ -H "Content-Type: application/json" \ -d '{ "type": "hiring", "participantIds": [ "usr_01jq8z4f3g5h7j9k1l3m5n7o9p" ], "contextType": "job_post", "contextId": "job_01jq8zk1a3c5e7g9j1l3n5p7q9" }'{ "data": { "conversation": { "id": "cnv_01jq8zn1a3c5e7g9j1l3n5p7q9", "type": "hiring", "contextType": "job_post", "contextId": "job_01jq8zk1a3c5e7g9j1l3n5p7q9", "title": "Re: Line Cook — Smash Burger Specialist", "isGroup": false, "lastMessageAt": "2026-05-20T10:42:18.000Z", "participants": [ "usr_01jq8z4b2k6h7n8m9p0r3s5t7v", "usr_01jq8z4f3g5h7j9k1l3m5n7o9p" ], "createdAt": "2026-05-19T14:08:01.000Z", "lastMessage": { "id": "msg_01jq8zb1a3c5e7g9j1l3n5p7q9", "senderId": "usr_01jq8z4b2k6h7n8m9p0r3s5t7v", "body": "Happy to chat — can we do Thursday at 4pm?", "hasAttachment": false, "createdAt": "2026-05-20T10:42:18.000Z" }, "unreadCount": 2, "lastReadMessageId": "msg_01jq8za0e1f2g3h4i5j6k7l8m9", "peer": { "id": "usr_01jq8z4f3g5h7j9k1l3m5n7o9p", "name": "Salem Al-Otaibi", "avatarUrl": "https://cdn.trackme.app/avatars/usr_01jq8z4f3g5h7j9k1l3m5n7o9p/thumb.webp" } } }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "VALIDATION_ERROR", "message": "Request body is malformed." }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "AUTH_REQUIRED", "message": "Authentication is required to access this resource." }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "VALIDATION_ERROR", "message": "One or more fields are invalid.", "fields": [ { "path": "email", "rule": "email", "message": "Must be a valid email address." } ] }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}List the authenticated user's conversations. GET
Previous Page
Get a single conversation with inbox enrichment. GET
Returns one conversation the caller participates in, enriched with the same fields as the inbox: `lastMessage`, `unreadCount`, the caller's `lastReadMessageId`, and — for 1:1 threads — the `peer` profile (id, name, avatar). Non-participants get 403; a soft-deleted conversation 404s.