---
title: "Correct facts about a toilet"
method: POST
path: "/api/v1/toilets/{id}/votes"
---

# Correct facts about a toilet

`POST /api/v1/toilets/{id}/votes`

## Request

- Base URL: `https://wcway.com`
- URL: `https://wcway.com/api/v1/toilets/{id}/votes`
- Auth: none required

For the web page of this site only. It needs a Turnstile token unless an account is signed in. Each person has one vote per fact, and the latest vote counts. A value replaces the shown value when it gets more than half of all votes in the last 24 months and at least 2 votes. The source value counts as one vote. On a tie the shown value stays. A majority for existence gone hides nothing: a moderator decides. One address adds one new voter per toilet per day.

## Path parameters

- `id` string, required

## Request body

- object
  - `device_id` string: Random number that the browser makes once and keeps. The server stores only its hash. A signed-in account needs none.
  - `votes` object[], required
    - `attribute` 'access' | 'fee' | 'fee_amount' | 'wheelchair' | 'changing_table' | 'gender' | 'opening_hours' | 'name' | 'operator' | 'existence', required
    - `value` string, required: access: public, permissive, customers or scheme. fee: free or paid. fee_amount: amount and ISO 4217 code, for example 0.50 EUR. wheelchair: yes, limited or no. changing_table: yes or no. gender: unisex, female and male, separated by commas. opening_hours: OpenStreetMap opening_hours syntax. name and operator: text. existence: yes or gone.
  - `turnstile_token` string: Cloudflare Turnstile token from the page of this site. A signed-in account needs none.

## Response `201`

The votes are saved and counted.

- object

## Other responses

- `400`: The body is invalid.
- `403`: The request came from another origin, or the Turnstile check failed.
- `404`: No toilet has this id.
- `429`: Rate limit reached. Wait Retry-After seconds.
- `503`: Contributions are off.

---

[API](https://skmtc.dev/wcway/apis/wcway-api.md) · [All operations](https://skmtc.dev/wcway/apis/wcway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wcway/apis/wcway-api/revisions/34f42e2ca0e8?raw)
