curl --request POST \
--url https://api.example.com/api/photos \
--header 'Content-Type: application/json' \
--data '
{
"context": "<string>",
"routeId": "<string>",
"routeCallId": "<string>",
"caption": "<string>"
}
'{
"success": true,
"data": {
"id": "<string>",
"context": "<string>",
"routeId": {},
"routeCallId": {},
"userId": "<string>",
"imageUrl": "<string>",
"caption": {},
"status": "<string>",
"createdAt": "<string>"
},
"message": "<string>"
}Upload a photo to a route gallery, route call cover, or route call gallery
curl --request POST \
--url https://api.example.com/api/photos \
--header 'Content-Type: application/json' \
--data '
{
"context": "<string>",
"routeId": "<string>",
"routeCallId": "<string>",
"caption": "<string>"
}
'{
"success": true,
"data": {
"id": "<string>",
"context": "<string>",
"routeId": {},
"routeCallId": {},
"userId": "<string>",
"imageUrl": "<string>",
"caption": {},
"status": "<string>",
"createdAt": "<string>"
},
"message": "<string>"
}Authorization: Bearer YOUR_ACCESS_TOKEN
multipart/form-data.
ROUTE_CALL_COVER - Cover photo for a route call (organizer only)ROUTE_GALLERY - Photo for a route’s general galleryROUTE_CALL_GALLERY - Photo for a specific route call gallery (confirmed attendees only)context is ROUTE_GALLERYcontext is ROUTE_CALL_COVER or ROUTE_CALL_GALLERYACTIVE on upload)curl --request POST \
--url https://api.losinmaduros.com/api/photos \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'image=@/path/to/photo.jpg' \
--form 'context=ROUTE_GALLERY' \
--form 'routeId=987e6543-e21b-12d3-a456-426614174000' \
--form 'caption=Beautiful route through the park!'
{
"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 through the park!",
"status": "ACTIVE",
"createdAt": "2026-02-10T10:00:00Z",
"updatedAt": "2026-02-10T10:00:00Z",
"user": {
"id": "user_2abc123def456",
"name": "John",
"imageUrl": "https://example.com/avatar.jpg"
},
"route": {
"id": "987e6543-e21b-12d3-a456-426614174000",
"name": "Casa de Campo",
"slug": "casa-de-campo"
}
},
"message": "Photo uploaded successfully"
}
image