---
title: "WRITE: turn one of today's challenges into an accepted detour on the trip route"
method: POST
path: "/actions/accept_challenge"
tags: ["gameplay"]
---

# WRITE: turn one of today's challenges into an accepted detour on the trip route

`POST /actions/accept_challenge`

## Request

- Base URL: `https://findinghorizons.ca/api/v1`
- URL: `https://findinghorizons.ca/api/v1/actions/accept_challenge`
- Auth: OAuth 2 (authorization code, authorization URL `https://findinghorizons.ca/api/mcp/authorize`, token URL `https://findinghorizons.ca/api/mcp/oauth/token`, scopes: `gameplay:write`)

WRITE: turn one of today's challenges into an accepted detour on the trip route. Double-gated exactly as in the app: the trip's allow_detours switch AND the traveller's own detour preference must both be on, otherwise it is refused and the blocking gate is named. The challenge is re-derived server-side for the date and must be on that day's list.

## Headers

- `Idempotency-Key` string, required
- `X-FH-Task` string

## Request body

- object
  - `tripId` string, required
  - `challengeId` string, required: id from get_daily_challenges
  - `date` string, required: The same calendar date the challenge was listed for, YYYY-MM-DD
  - `detourPreferenceEnabled` boolean: The traveller's own detour preference. Omit and it is treated as OFF.
  - `today` string: The traveller's own date, YYYY-MM-DD, where the action needs one
  - `expectedVersion` integer: For a change to a trip: the planVersion you last read

## Response `200`

Done — { ok, api, action, result, card, operation? }

## Other responses

- `202`: Waiting for the traveller's approval in Finding Horizons
- `400`: Bad body / missing Idempotency-Key
- `401`: No or invalid token
- `403`: Scope not granted
- `409`: Conflict: the plan changed since expectedVersion, or the same key is still running
- `422`: The action said no
- `429`: Rate limited

---

[API](https://skmtc.dev/findinghorizons/apis/finding-horizons-api.md) · [All operations](https://skmtc.dev/findinghorizons/apis/finding-horizons-api/llms.txt) · [OpenAPI document](https://skmtc.dev/findinghorizons/apis/finding-horizons-api/revisions/e347f6070173?raw)
