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.
https://api.transitlab.nyc/v1/feedback Key optionalSay 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.
Request
Section titled “Request”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())Authorization
Section titled “Authorization”A key is optional. Without one, requests count against your IP address’s limits. With one, they count against the key’s.
Request body
Section titled “Request body”application/json, required.
-
messagestring requiredWhat happened and what you expected. Up to 4000 characters.
-
contextstringThe page, endpoint, table or query this is about, and any error text. Up to 2000 characters.
-
contactstring (email)An email address, only if you want a reply. We may not write back. Up to 254 characters.
Responses
Section titled “Responses”201 Created
Section titled “201 Created”Stored. id is the report’s number.
-
okboolean required -
idinteger requiredThe report’s number.
-
messagestringA short thanks.
{ "ok": true, "id": 42, "message": "Thank you. We read every report."}Errors
Section titled “Errors”| Status | When |
|---|---|
400 | Bad 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. |
413 | Too large. The body is over 64 KB. |
415 | Unsupported media type. The body is not JSON. Send Content-Type: application/json. |
429 | Too 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. |
503 | Unavailable. Feedback is flooded for the moment. Try again in an hour, or write to hello@transitlab.nyc. |
Error responses carry this body:
-
okboolean required -
errorstring requiredA short code: bad_request, bad_field, bad_contact, missing_message, too_long, junk, too_large, unsupported_media_type, method_not_allowed, rate_limited, busy.
-
messagestring requiredWhat went wrong and what to do, in plain words.
-
fieldstringThe field at fault, for 400 errors.
{ "ok": false, "error": "missing_message", "message": "Send a `message`: what went wrong, what you expected, and where.", "field": "message"}Headers on 429, 503:
-
Retry-AfterintegerSeconds to wait.