Skip to main content
GET
/
api
/
photos
List Photos
curl --request GET \
  --url https://api.example.com/api/photos
{
  "success": true,
  "data": [
    {
      "id": "<string>",
      "context": "<string>",
      "routeId": {},
      "routeCallId": {},
      "userId": "<string>",
      "imageUrl": "<string>",
      "caption": {},
      "status": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "user": {
        "id": "<string>",
        "name": {},
        "imageUrl": {}
      }
    }
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "totalCount": 123,
    "totalPages": 123,
    "hasNextPage": true,
    "hasPreviousPage": true
  }
}

Overview

Retrieve photos from the public gallery with flexible filtering options. Only returns ACTIVE photos by default. This is a public endpoint that does not require authentication.

Query Parameters

context
string
Filter by photo context. Valid values:
  • ROUTE_CALL_COVER - Route call cover photos
  • ROUTE_GALLERY - Route gallery photos
  • ROUTE_CALL_GALLERY - Route call gallery photos
routeId
string
Filter by route ID (UUID format)
routeCallId
string
Filter by route call ID (UUID format)
status
string
default:"ACTIVE"
Filter by photo status. Valid values:
  • ACTIVE - Active photos (default)
  • FLAGGED - Flagged photos
  • REJECTED - Rejected photos
  • DELETED - Deleted photos
page
integer
default:"1"
Page number for pagination (minimum: 1)
limit
integer
default:"20"
Items per page (minimum: 1, maximum: 100)

Response

success
boolean
Indicates if the request was successful
data
array
Array of photo objects
id
string
Photo UUID
context
string
Photo context (ROUTE_CALL_COVER, ROUTE_GALLERY, or ROUTE_CALL_GALLERY)
routeId
string | null
Associated route ID (if applicable)
routeCallId
string | null
Associated route call ID (if applicable)
userId
string
User ID of the photo uploader
imageUrl
string
Full URL to the image file
caption
string | null
Optional caption (max 500 characters)
status
string
Photo status (ACTIVE, FLAGGED, REJECTED, or DELETED)
createdAt
string
ISO 8601 timestamp of when the photo was uploaded
updatedAt
string
ISO 8601 timestamp of last update
user
object
User information
id
string
User ID
name
string | null
User name
imageUrl
string | null
User profile image URL
pagination
object
Pagination metadata
page
integer
Current page number
limit
integer
Items per page
totalCount
integer
Total number of photos matching filters
totalPages
integer
Total number of pages
hasNextPage
boolean
Whether there is a next page
hasPreviousPage
boolean
Whether there is a previous page

Example Request

curl --request GET \
  --url 'https://api.losinmaduros.com/api/photos?context=ROUTE_GALLERY&page=1&limit=20'

Example Response

{
  "success": true,
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "context": "ROUTE_GALLERY",
      "routeId": "987e6543-e21b-12d3-a456-426614174000",
      "routeCallId": null,
      "userId": "user_2abc123def456",
      "imageUrl": "https://your-project.supabase.co/storage/v1/object/public/photos/routes/image.jpg",
      "caption": "Beautiful route!",
      "status": "ACTIVE",
      "moderatedAt": null,
      "moderatedBy": null,
      "moderationNotes": null,
      "createdAt": "2026-02-10T10:00:00Z",
      "updatedAt": "2026-02-10T10:00:00Z",
      "user": {
        "id": "user_2abc123def456",
        "name": "John",
        "imageUrl": "https://example.com/avatar.jpg"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "totalCount": 125,
    "totalPages": 7,
    "hasNextPage": true,
    "hasPreviousPage": false
  }
}

Build docs developers (and LLMs) love