Skip to content

create

PUT
/trail

Creates a trail.

Authorizations

Parameters

Query Parameters

requestKey
string

Unique request id. Prevents auto cancel when sending multiple requests.

Request Body

object
name
required

Name of the trail

string
public
required

Visible for everyone

boolean
category

Category Id

string
>= 15 characters <= 15 characters
date

Date of the trail

string format: date
description

Description of the trail

string
difficulty

Difficulty of the trail

string
Allowed values: easy moderate hard
distance

Distance in meters

number
duration

Duration in seconds

number
elevation_gain

Elevation gain in vertical meters

number
elevation_loss

Elevation loss in vertical meters

number
lat

Latitude of the starting point

number
>= -90 <= 90
location

Nearest city/village

string
lon

Longitude of the starting point

number
>= -180 <= 180
thumbnail

Index of the photo that should be used as the thumbnail.

integer
author
required

User Id

string
>= 15 characters <= 15 characters
Example
{
"name": "at error minus",
"public": false,
"category": "l3q348pprel6opd",
"date": "2025-01-03T00:36:48.554Z",
"description": "Minima architecto maiores maiores architecto. Nobis aliquid magni magni ipsum. Itaque maxime mollitia. Laboriosam placeat ipsa omnis magni atque non.",
"difficulty": "moderate",
"distance": 46585640.67167308,
"duration": 8687485.195364153,
"elevation_gain": 4089694.238652264,
"elevation_loss": 12108588.345680581,
"lat": 86.60827022966254,
"location": "sunt",
"lon": 112.96378311445648,
"thumbnail": 0,
"author": "3mugf953w4a9fg5"
}

Responses

200

object
author
required
string
category
required
string
collectionId
required
string
collectionName
required
string
created
required
string
date
required
string
description
required
string
difficulty
required
string
distance
required
number
duration
required
number
elevation_gain
required
number
elevation_loss
required
number
gpx
required
string
id
required
string
lat
required
number
location
required
string
lon
required
number
name
required
string
photos
required
Array<string>
public
required
boolean
summit_logs
required
Array<string>
thumbnail
required
integer
updated
required
string
waypoints
required
Array<string>
Examples

Success

{
"author": "3mugf953w4a9fg5",
"category": "l3q348pprel6opd",
"collectionId": "e864strfxo14pm4",
"collectionName": "trails",
"created": "2025-01-03 11:36:58.976Z",
"date": "2025-01-03 00:36:48.554Z",
"description": "Minima architecto maiores maiores architecto. Nobis aliquid magni magni ipsum. Itaque maxime mollitia. Laboriosam placeat ipsa omnis magni atque non.",
"difficulty": "moderate",
"distance": 46585640.67167308,
"duration": 8687485.195364153,
"elevation_gain": 4089694.238652264,
"elevation_loss": 12108588.345680581,
"gpx": "",
"id": "d9ba280yjycrk0k",
"lat": 86.60827022966254,
"location": "sunt",
"lon": 112.96378311445648,
"name": "at error minus",
"photos": [],
"public": false,
"summit_logs": [],
"thumbnail": 0,
"updated": "2025-01-03 11:36:58.976Z",
"waypoints": []
}

400

object
message
required
string
detail
required
object
code
required
integer
message
required
string
data
required
object
author
required
object
code
required
string
message
required
string
Examples

Exception

{
"message": "Failed to create record.",
"detail": {
"code": 400,
"message": "Failed to create record.",
"data": {
"author": {
"code": "validation_missing_rel_records",
"message": "Failed to find all relation records with the provided ids."
}
}
}
}

x-400:Invalid Params

object
message
required
string
detail
required
Array<object>
object
code
required
string
validation
string
message
required
string
path
required
Array<string>
Examples

Exception

{
"message": "invalid_params",
"detail": [
{
"code": "invalid_string",
"validation": "date",
"message": "Invalid date",
"path": [
"date"
]
},
{
"code": "custom",
"message": "invalid-date",
"path": [
"date"
]
}
]
}