{"openapi":"3.1.0","info":{"title":"Trail Challenge API","description":"Development documentation","version":"1.0.0"},"components":{},"paths":{"/health":{"get":{"operationId":"getHealth","summary":"Health check","tags":["meta"],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string","const":"ok"}}}}}}},"/notify-signups":{"post":{"operationId":"postNotifySignups","summary":"Sign up to be notified about a place","tags":["notify"],"responses":{"204":{"description":"Submission accepted"},"400":{"description":"validation_error | turnstile_failed","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"validation_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"turnstile_failed"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"payload_too_large"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"rate_limited"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"500":{"description":"server_error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"server_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"turnstileToken":{"type":"string","minLength":1,"maxLength":2048},"honeypot":{"type":"string"},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"placeKind":{"type":"string","enum":["city","region"]},"placeSlug":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","maxLength":200},"pageUrl":{"type":"string","maxLength":2048},"referrer":{"type":"string","maxLength":2048},"utmSource":{"type":"string","maxLength":200},"utmMedium":{"type":"string","maxLength":200},"utmCampaign":{"type":"string","maxLength":200},"utmContent":{"type":"string","maxLength":200},"utmTerm":{"type":"string","maxLength":200},"firstUtmSource":{"type":"string","maxLength":200},"firstUtmMedium":{"type":"string","maxLength":200},"firstUtmCampaign":{"type":"string","maxLength":200},"firstUtmContent":{"type":"string","maxLength":200},"firstUtmTerm":{"type":"string","maxLength":200}},"required":["turnstileToken","email","placeKind","placeSlug"]}}}}}},"/newsletter-signups":{"post":{"operationId":"postNewsletterSignups","summary":"Sign up for the newsletter","tags":["newsletter"],"responses":{"204":{"description":"Submission accepted"},"400":{"description":"validation_error | turnstile_failed","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"validation_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"turnstile_failed"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"payload_too_large"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"rate_limited"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"500":{"description":"server_error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"server_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"turnstileToken":{"type":"string","minLength":1,"maxLength":2048},"honeypot":{"type":"string"},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"source":{"type":"string","maxLength":200},"pageUrl":{"type":"string","maxLength":2048},"referrer":{"type":"string","maxLength":2048},"utmSource":{"type":"string","maxLength":200},"utmMedium":{"type":"string","maxLength":200},"utmCampaign":{"type":"string","maxLength":200},"utmContent":{"type":"string","maxLength":200},"utmTerm":{"type":"string","maxLength":200},"firstUtmSource":{"type":"string","maxLength":200},"firstUtmMedium":{"type":"string","maxLength":200},"firstUtmCampaign":{"type":"string","maxLength":200},"firstUtmContent":{"type":"string","maxLength":200},"firstUtmTerm":{"type":"string","maxLength":200}},"required":["turnstileToken","email"]}}}}}},"/ambassador-applications":{"post":{"operationId":"postAmbassadorApplications","summary":"Submit an ambassador application","tags":["ambassador-applications"],"responses":{"204":{"description":"Submission accepted"},"400":{"description":"validation_error | turnstile_failed","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"validation_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"turnstile_failed"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"payload_too_large"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"rate_limited"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"500":{"description":"server_error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"server_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"turnstileToken":{"type":"string","minLength":1,"maxLength":2048},"honeypot":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["engineering","design","content","growth","operations","other"]},"link":{"type":"string","maxLength":2048,"format":"uri"},"message":{"type":"string","minLength":1,"maxLength":4000},"source":{"type":"string","maxLength":200},"pageUrl":{"type":"string","maxLength":2048},"referrer":{"type":"string","maxLength":2048},"utmSource":{"type":"string","maxLength":200},"utmMedium":{"type":"string","maxLength":200},"utmCampaign":{"type":"string","maxLength":200},"utmContent":{"type":"string","maxLength":200},"utmTerm":{"type":"string","maxLength":200},"firstUtmSource":{"type":"string","maxLength":200},"firstUtmMedium":{"type":"string","maxLength":200},"firstUtmCampaign":{"type":"string","maxLength":200},"firstUtmContent":{"type":"string","maxLength":200},"firstUtmTerm":{"type":"string","maxLength":200}},"required":["turnstileToken","name","email","role","message"]}}}}}},"/city-requests":{"post":{"operationId":"postCityRequests","summary":"Submit a city request","tags":["city-requests"],"responses":{"204":{"description":"Submission accepted"},"400":{"description":"validation_error | turnstile_failed","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"validation_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"turnstile_failed"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"payload_too_large"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"rate_limited"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"500":{"description":"server_error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"server_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"turnstileToken":{"type":"string","minLength":1,"maxLength":2048},"honeypot":{"type":"string"},"city":{"type":"string","minLength":1,"maxLength":200},"details":{"type":"string","maxLength":4000},"source":{"type":"string","maxLength":200},"pageUrl":{"type":"string","maxLength":2048},"referrer":{"type":"string","maxLength":2048},"utmSource":{"type":"string","maxLength":200},"utmMedium":{"type":"string","maxLength":200},"utmCampaign":{"type":"string","maxLength":200},"utmContent":{"type":"string","maxLength":200},"utmTerm":{"type":"string","maxLength":200},"firstUtmSource":{"type":"string","maxLength":200},"firstUtmMedium":{"type":"string","maxLength":200},"firstUtmCampaign":{"type":"string","maxLength":200},"firstUtmContent":{"type":"string","maxLength":200},"firstUtmTerm":{"type":"string","maxLength":200}},"required":["turnstileToken","city"]}}}}}},"/trails":{"get":{"operationId":"getTrails","summary":"List trails","tags":["trails"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"distance":{"type":"string"},"elevationGain":{"type":["string","null"]},"enabled":{"type":"boolean"},"isOsmp":{"type":"boolean"},"isBcpos":{"type":"boolean"}},"required":["id","title","description","distance","elevationGain","enabled","isOsmp","isBcpos"],"additionalProperties":false}}}}},"400":{"description":"validation_error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"validation_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"500":{"description":"server_error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"server_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}}},"parameters":[{"in":"query","name":"enabled","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"isOsmp","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"isBcpos","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"offset","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}]}},"/trails/{id}":{"get":{"operationId":"getTrailsById","summary":"Get a trail by id","tags":["trails"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"distance":{"type":"string"},"elevationGain":{"type":["string","null"]},"enabled":{"type":"boolean"},"isOsmp":{"type":"boolean"},"isBcpos":{"type":"boolean"}},"required":["id","title","description","distance","elevationGain","enabled","isOsmp","isBcpos"],"additionalProperties":false}}}},"400":{"description":"validation_error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"validation_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"not_found"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}},"500":{"description":"server_error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","const":"server_error"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["ok","error"],"additionalProperties":false}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1,"maxLength":64},"required":true}]}}}}