Skip to content

create

PUT
/trail-share

Creates a trail share.

Authorizations

Parameters

Query Parameters

requestKey
string

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

Request Body

object
trail
required

Trail Id

string
>= 15 characters <= 15 characters
user
required

User Id

string
>= 15 characters <= 15 characters
permission
required

Permissions for user

string
Allowed values: view edit
Example
{
"trail": "z94vgei3jdc37k4",
"user": "z014o6bpcg680mg",
"permission": "view"
}

Responses

200

object
collectionId
required
string
collectionName
required
string
created
required
string
expand
required
object
trail
required
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
integer
elevation_gain
required
integer
elevation_loss
required
integer
expand
required
object
author
required
object
avatar
required
string
bio
required
string
collectionId
required
string
collectionName
required
string
created
required
string
emailVisibility
required
boolean
id
required
string
token
required
string
updated
required
string
username
required
string
verified
required
boolean
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>
id
required
string
permission
required
string
trail
required
string
updated
required
string
user
required
string
Examples

Success

{
"collectionId": "1mns8mlal6uf9ku",
"collectionName": "trail_share",
"created": "2025-01-03 12:41:01.998Z",
"expand": {
"trail": {
"author": "3mugf953w4a9fg5",
"category": "pbwx1lg2nmcih0w",
"collectionId": "e864strfxo14pm4",
"collectionName": "trails",
"created": "2024-12-30 18:57:35.453Z",
"date": "2024-12-30 00:00:00.000Z",
"description": "",
"difficulty": "moderate",
"distance": 5631.307320599051,
"duration": 0,
"elevation_gain": 76,
"elevation_loss": 76,
"expand": {
"author": {
"avatar": "23xxesym0e9w18z2904frnpgy7_OzsVanAmWP.jpg",
"bio": "Enim beatae labore vel. Pariatur hic doloribus quia quasi eos. Cumque error nobis.",
"collectionId": "_pb_users_auth_",
"collectionName": "users",
"created": "2024-06-29 19:23:47.731Z",
"emailVisibility": false,
"id": "3mugf953w4a9fg5",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGlLZXlVaWQiOiIzMjk3NmExMi03ODE1LTQ1NGQtYTU5Yi1hNzY0ZTE4NmJjNjIiLCJzZWFyY2hSdWxlcyI6eyJjaXRpZXM1MDAiOnt9LCJ0cmFpbHMiOnsiZmlsdGVyIjoicHVibGljID0gdHJ1ZSBPUiBhdXRob3IgPSAzbXVnZjk1M3c0YTlmZzUgT1Igc2hhcmVzID0gM211Z2Y5NTN3NGE5Zmc1In19fQ.swips6eep2qMd0Nf3hdZr711N2fHyikOo7syWvuLEIA",
"updated": "2025-01-03 12:32:15.270Z",
"username": "Flomp",
"verified": true
}
},
"gpx": "blob_0E0x721wan.gpx",
"id": "z94vgei3jdc37k4",
"lat": 47.385232,
"location": "",
"lon": 9.655863,
"name": "Die Pottsau",
"photos": [
"23xxesym0e9w18z2904frnpgy7_2SQmCCI6DV.jpg",
"caret_right_solid_9154Rrvk6B.svg"
],
"public": false,
"summit_logs": [
"95bb1d77c8dfa98"
],
"thumbnail": 1,
"updated": "2024-12-30 18:59:56.924Z",
"waypoints": [
"7f6d2a8c9d50136",
"60c2d435a5b66ed"
]
}
},
"id": "93jrstjcngapleb",
"permission": "view",
"trail": "z94vgei3jdc37k4",
"updated": "2025-01-03 12:41:01.998Z",
"user": "znhd3hgrxl85c9f"
}

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
string
expected
string
received
string
path
Array<string>
message
string
Examples

Exception

{
"message": "invalid_params",
"detail": [
{
"code": "invalid_type",
"expected": "string",
"received": "number",
"path": [
"text"
],
"message": "Expected string, received number"
}
]
}