Skip to content
Docs

Report a problem or a wish

Tell the people who run Transit Lab that something is wrong or missing: a query or the API misbehaved, the docs or a table's contents look wrong, or you need something we do not have.

POST https://api.transitlab.nyc/v1/feedback Key optional

Say what happened and what you expected in message. Put the page, endpoint, table or query it is about, and any error text, in context. No key is needed, so you can also report a key that does not work. If a valid key is sent as Authorization: Bearer tl_live_…, its id is stored with the report; a missing, unknown or revoked key does not stop it. Do not send secrets or personal data. A person reads every report; nothing is sent back to you unless you leave an email in contact. Limits: 10 reports an hour per IP address and per key, and a 64 KB body. The same words from the same sender twice count once. The IP address is kept only as a salted hash.

curl https://api.transitlab.nyc/v1/feedback \
-H "Content-Type: application/json" \
-d '{"message":"run_sql returns a 500 for a count(*) on bus_lanes. I expected a number.","context":"POST /v1/sql: select count(*) from bus_lanes\nError: 500 server"}'
import requests
r = requests.post(
"https://api.transitlab.nyc/v1/feedback",
json={
"message": "run_sql returns a 500 for a count(*) on bus_lanes. I expected a number.",
"context": "POST /v1/sql: select count(*) from bus_lanes\nError: 500 server",
},
timeout=60,
)
r.raise_for_status()
print(r.json())
const res = await fetch("https://api.transitlab.nyc/v1/feedback", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"message": "run_sql returns a 500 for a count(*) on bus_lanes. I expected a number.",
"context": "POST /v1/sql: select count(*) from bus_lanes\nError: 500 server"
}),
})
if (!res.ok) throw new Error(`HTTP ${res.status}`)
console.log(await res.json())

A key is optional. Without one, requests count against your IP address’s limits. With one, they count against the key’s.

application/json, required.

  • message string required

    What happened and what you expected. Up to 4000 characters.

  • context string

    The page, endpoint, table or query this is about, and any error text. Up to 2000 characters.

  • contact string (email)

    An email address, only if you want a reply. We may not write back. Up to 254 characters.

Stored. id is the report’s number.

  • ok boolean required

  • id integer required

    The report’s number.

  • message string

    A short thanks.

Example
{
"ok": true,
"id": 42,
"message": "Thank you. We read every report."
}
StatusWhen
400Bad request. The body is not valid: a missing or too short message, a field over its limit, a bad contact, or text that is plainly not a report. message says which.
413Too large. The body is over 64 KB.
415Unsupported media type. The body is not JSON. Send Content-Type: application/json.
429Too many requests. Too many reports from this address or key (10 an hour), or too many requests (60 a minute). Retry-After says when to try again.
503Unavailable. Feedback is flooded for the moment. Try again in an hour, or write to hello@transitlab.nyc.

Error responses carry this body:

  • ok boolean required

  • error string required

    A short code: bad_request, bad_field, bad_contact, missing_message, too_long, junk, too_large, unsupported_media_type, method_not_allowed, rate_limited, busy.

  • message string required

    What went wrong and what to do, in plain words.

  • field string

    The field at fault, for 400 errors.

Example (400)
{
"ok": false,
"error": "missing_message",
"message": "Send a `message`: what went wrong, what you expected, and where.",
"field": "message"
}

Headers on 429, 503:

  • Retry-After integer

    Seconds to wait.