List published community posts.
Returns published posts newest-first in one active country/city room. Country is required. Omitted or empty city selects only the nationwide room. Channel defaults to discussion; limit defaults to 30 (max 50).
Authorization
bearerAuth 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
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/community/posts?country=string"{ "data": { "items": [ { "id": "cpo_01jq8zv1a3c5e7g9j1l3n5p7q9", "ownerId": "usr_01jq8z4b2k6h7n8m9p0r3s5t7v", "owner": { "id": "usr_01jq8z4b2k6h7n8m9p0r3s5t7v", "fullName": "Khalid Al-Saud", "avatar": null, "truckName": "Crispy Cart Co." }, "body": "Pop-up tonight on Tahlia — first 20 burgers half-price. See you there!", "conversationId": "cnv_01jq8zw1a3c5e7g9j1l3n5p7q9", "country": "SA", "city": "Riyadh", "channel": "discussion", "likedByMe": false, "status": "published", "likesCount": 42, "repliesCount": 7, "images": [ { "id": "fil_01jq8zu1a3c5e7g9j1l3n5p7q9", "purpose": "community_post", "urls": { "original": "https://cdn.trackme.sa/cp/khalid-post-1-original.jpg", "thumb": "https://cdn.trackme.sa/cp/khalid-post-1-thumb.jpg", "medium": "https://cdn.trackme.sa/cp/khalid-post-1-medium.jpg", "large": "https://cdn.trackme.sa/cp/khalid-post-1-large.jpg" } } ], "createdAt": "2026-05-19T16:18:24.000Z", "updatedAt": "2026-05-19T16:18:24.000Z" }, { "id": "cpo_01jq8zv2b4d6f8h0k2m4o6q8s0", "ownerId": "usr_01jq8z4b2k6h7n8m9p0r3s5t7v", "owner": { "id": "usr_01jq8z4b2k6h7n8m9p0r3s5t7v", "fullName": "Khalid Al-Saud", "avatar": null, "truckName": "Crispy Cart Co." }, "body": "New menu drop next week: lamb shawarma sliders. Comment with toppings.", "conversationId": "cnv_01jq8zw1a3c5e7g9j1l3n5p7q9", "country": "SA", "city": "Riyadh", "channel": "discussion", "likedByMe": false, "status": "published", "likesCount": 18, "repliesCount": 31, "images": [], "createdAt": "2026-05-17T11:02:09.000Z", "updatedAt": "2026-05-17T11:02:09.000Z" } ] }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7", "pagination": { "nextCursor": null, "hasMore": false, "limit": 20 } }}{ "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" }}Upload a file under a typed purpose; receive a fileId and variant URLs. POST
Multipart endpoint. Supply `purpose` (`avatar | truck_photo | menu_item | marketplace | review_image | community_image | category_icon | chat_attachment | kyc_document`), the target `entityId` (omit for `avatar` — defaults to the caller), and `file`. The response carries `fileId` plus `urls` for the rendered variants; pass `fileId` to the feature endpoint that anchors the upload (e.g. `POST /me/avatar`, `POST /chats/:id/messages`). Per-purpose limits: avatar 2MB, truck_photo / marketplace / community_image 5MB, menu_item / review_image 3MB, category_icon 512KB, chat_attachment / kyc_document 10MB. Allowed types are jpg/png/webp for images; pdf is additionally allowed for chat attachments and KYC docs. Magic-byte checks reject renamed files.
Publish a community post (with up to 4 photos). POST
Mint photo `fileId`s via `POST /api/v1/uploads` (`purpose=community_image`) first, then pass them in `fileIds` together with the post body.