Upload a photo to use it in an experience guide page.
See also: Publish a multi-day tour.
How to authenticate · OpenAPI spec for these endpoints
/api/v1/photos.json
Uploads an image and returns the new photo. Use its id wherever a photo id is expected.
Multipart uploads: This endpoint accepts only Content-Type: multipart/form-data. Send the
image in the file field.
The photo has no parent and belongs to the authenticated user. A photo that is not used anywhere is deleted 24 hours after upload.
x-rwgps-api-key
string
required
x-rwgps-auth-token
string
required
file
file
required
photo
object
id
integer
url
string
highlighted
boolean
caption
string
or null
lat
number
or null
lng
number
or null
elevation
integer
or null
location
string
or null
locality
string
or null
administrative_area
string
or null
country_code
string
or null
created_at
date-time
curl \
-H "x-rwgps-api-key: $API_KEY" \
-H "x-rwgps-auth-token: $AUTH_TOKEN" \
-X POST \
-F file=@route.gpx \
https://ridewithgps.com/api/v1/photos.json
{
"photo": {
"id": 123,
"url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
"highlighted": false,
"caption": "View from Pittock Mansion",
"lat": 45.521529,
"lng": -122.691804,
"elevation": 290,
"location": "Pittock Mansion",
"locality": "Portland",
"administrative_area": "OR",
"country_code": "US",
"created_at": "2000-01-01T12:00:00Z"
}
}