Add Gallery Media - API v2.4 - CoastSnap - SPOTTERON

Add medium to gallery

Uploads an image and adds it as a new medium to the specified gallery. The gallery must belong to a spot that the authenticated user is authorized to edit and must have state in_progress.

Endpoint: https://www.spotteron.com/api/v2.4/galleries/{gallery_id}/media
Authentication: Bearer token
Method: POST
Content-Type: multipart/form-data
Return format: JSON
Request body:
Name Required Type Info
data[attributes][file] true FILE The image to upload. Content-Type: image/jpeg. Max size: 12 MB.

Example request

curl -X POST "https://www.spotteron.com/api/v2.4/galleries/7/media" \
  -H "Authorization: Bearer <TOKEN>" \
  -F "data[attributes][file]=@photo.jpg"

Example Response

Returns an empty success response.