> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cyclemate.club/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom routes

> Create, read, edit and delete custom routes and group rides, and attach images to them

## Overview

A custom route is a saved cycling route with a name, a page on cyclemate.club and, when you give it a start time, a group ride riders can RSVP to. Our apps create routes through this API, and so can yours, on behalf of a signed-in rider with [Login with Cyclemate](https://docs.cyclemate.club/api-reference/oauth.md). Every route belongs to a rider. Your app reads, edits and deletes only the routes it created; the rider's other routes do not exist for it.

Once a route exists, pass its `id` as `event_id` to [`POST /multi-modal/v2/`](https://docs.cyclemate.club/api-reference/routing/multimodal) to get directions that follow it.

### How a route is given

Send one of:

* **`stops`**: two to 25 points in one city. We plan the safest cycling route between them. The simplest way to create a route, and the only way to create a dynamic one.
* **`legs`**: your own line, one GeoJSON LineString per leg, each ending at a named stop. Stored as given and matched to the road network.
* **`geometry`**: one GeoJSON LineString, a one-leg route.

### Dynamic and fixed routes

A **dynamic** route is re-planned between its stops as roads change, so riders always get the current safest line. A **fixed** route keeps the line you drew. A route made from `stops` defaults to dynamic; one made from `legs` or `geometry` is fixed.

### After a write

Creating or editing a route's line starts work in the background: a fixed route is matched to the road network, a dynamic one is planned. Until that lands the route answers `route_status: "pending"` and is already viewable and rideable; `ready` means its turn-by-turn steps and safety summary are stored. It usually takes a few seconds.

### Limits

Every rider may create 10 routes in any 24 hours, across our apps and every connected app. A route holds at most 10 images of 10 MiB each, as JPEG, PNG or WebP.

## Endpoints

| Endpoint | What it does |
| - | - |
| [`POST /custom-routes/`](https://docs.cyclemate.club/api-reference/custom-routes/create-route) | Create a route or group ride |
| [`GET /custom-routes/`](https://docs.cyclemate.club/api-reference/custom-routes/list-routes) | Your routes |
| [`GET /custom-routes/{id}/`](https://docs.cyclemate.club/api-reference/custom-routes/get-route) | One route |
| [`PATCH /custom-routes/{id}/`](https://docs.cyclemate.club/api-reference/custom-routes/update-route) | Edit a route |
| [`DELETE /custom-routes/{id}/`](https://docs.cyclemate.club/api-reference/custom-routes/delete-route) | Delete a route |
| [`POST /custom-routes/{id}/images/`](https://docs.cyclemate.club/api-reference/custom-routes/upload-image) | Add an image |
| [`DELETE /custom-routes/{id}/images/{image_id}/`](https://docs.cyclemate.club/api-reference/custom-routes/delete-image) | Remove an image |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.