{"openapi":"3.1.0","info":{"title":"Revva API","version":"1.0.0","description":"The Revva API builds route links, hosts roadbooks for your riders, publishes your organizers' events on Revva's agenda and reports the daily stats of your links.\nSend JSON over HTTPS to `https://api.revva.app/v1` from your server, with your secret key from [my.revva.app](https://my.revva.app/developers) as `Authorization: Bearer sk_live_…`.\nLimits and the error format are described below.\n\n## Limits\n\n| Limit | Value | Over it |\n| --- | --- | --- |\n| Rate | 120 requests per minute, per key | 429 `rate_limited`, `Retry-After` in seconds |\n| Rate per IP | 300 requests per minute, per IP, counted before the key is checked | 429 `rate_limited`, `Retry-After` in seconds |\n| Stats | 20 calls per minute to `GET /stats`, per key, on top of the rate; an answer from the 15-minute cache is not counted | 429 `rate_limited`, `Retry-After` in seconds |\n| Roadbooks | 500 created per account and per UTC day, all its keys together; a `ref` already used is not counted | 429 `quota_exceeded` |\n| Events | 200 created per app and per UTC day; a `ref` already used is not counted | 429 `quota_exceeded` |\n| Request body | 64 KiB on `POST /links`, 64 KiB on `PATCH /roadbooks/{id}`, 8 MiB on `POST /roadbooks` (a GPX of 5 MB at most), 64 KiB on `POST /events` and `PATCH /events/{id}` | 413 `payload_too_large` |\n| Text | `title` 80 characters, `q` 120, `description` 2,000 | Cut, not refused |\n| Via points | 2 to 25 in `via` | 400 `too_few_points` or `too_many_points` |\n| Your `ref` | 64 characters of `[A-Za-z0-9._-]` | 400 `validation_error` |\n\n## Errors\n\nEvery error has the shape of the `Error` model: `{ \"error\": { \"code\", \"message\", \"detail\"? } }`. Branch on `code`, since `message` is for humans and may change. A missing, unknown or revoked key answers 401 `invalid_key`, and each operation lists the codes it can answer."},"servers":[{"url":"https://api.revva.app/v1"}],"tags":[{"name":"Links","description":"Build `https://revva.app/go` links on your server, with your public key, and their `https://revva.app/go/<code>` short form."},{"name":"Roadbooks","description":"Roadbooks Revva hosts and shares by link, made from a GPX or via points. Find one again by its id, or list them filtered by your `ref`, to rename or delete it."},{"name":"Events","description":"Events your organizers publish on Revva's agenda. Each one is reviewed before riders see it, unless Revva trusts your app; its page is `https://revva.app/e/{code}`."},{"name":"Stats","description":"Daily totals of the links that carry your public key. Counts only, nothing about a rider."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sk_live_…","description":"A key pasted here stays in your browser and is only sent to api.revva.app. `POST /roadbooks` and `POST /events` create a real roadbook or event, so give it a `ref` starting with `test-` and delete it afterwards."}},"schemas":{"Link":{"type":"object","properties":{"url":{"type":"string","description":"The `https://revva.app/go` link, with your public key.","example":"https://revva.app/go?gpx=https%3A%2F%2Fexample.com%2Faravis.gpx&title=Tour+des+Aravis&ref=aravis-2026&key=pk_live_000000000000000000000000"},"shortUrl":{"type":["string","null"],"description":"The same link as `https://revva.app/go/<code>`, which opens the same page as `url`. Null when the link is over 2000 bytes, or when the short link could not be made just then: `url` always works.","example":"https://revva.app/go/k7Hq2xP"}},"required":["url","shortUrl"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["missing_source","multiple_sources","bad_coordinates","too_few_points","too_many_points","gpx_not_https","bad_id","bad_day","validation_error","invalid_key","not_found","payload_too_large","gpx_unreachable","rate_limited","quota_exceeded","server_error","duplicate","app_not_branded","banner_unreachable","conflict"],"description":"Stable, machine-readable: branch on this.","example":"invalid_key"},"message":{"type":"string","description":"A short English sentence for humans. It may change.","example":"Missing, unknown or revoked secret key."},"existingId":{"type":"string","description":"Only on `duplicate`: the id of the event already listed."},"detail":{"type":"string","description":"More context when there is some: the field that failed validation, or why a GPX could not be read."}},"required":["code","message"]}},"required":["error"],"description":"The shape of every error, whatever the endpoint and the status."},"LinkInput":{"type":"object","properties":{"via":{"type":"array","items":{"$ref":"#/components/schemas/Point"},"maxItems":25,"description":"2 to 25 points, ridden in order."},"gpxUrl":{"type":"string","description":"A public https URL of a GPX file, 5 MB at most. Revva reads it when a rider opens the link, and again every 24 hours.","example":"https://example.com/route.gpx"},"to":{"type":"object","properties":{"lat":{"type":"number","example":45.188},"lng":{"type":"number","example":5.724}},"required":["lat","lng"],"description":"A destination, routed from where the rider is."},"q":{"type":"string","maxLength":120,"description":"A place to search. Longer than 120 characters, it is cut, not refused.","example":"Col du Galibier"},"title":{"type":"string","maxLength":80,"description":"Plain text shown as the title. Longer than 80 characters, it is cut, not refused.","example":"Tour des Aravis"},"ref":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","description":"Your own reference, carried by the link into your stats (`GET /stats?ref=`): [A-Za-z0-9._-], 64 characters at most.","example":"aravis-2026"},"lang":{"type":"string","pattern":"^[A-Za-z]{2}(?:-[A-Za-z]{2})?$","description":"The language of the link's page, such as \"fr\" or \"pt-BR\". Without it, the rider's own language.","example":"fr"}},"description":"Exactly one source (via, gpxUrl, to or q), then options. A source the parser refuses answers a link error code, the same one a hand-written /go link gets."},"Point":{"type":"object","properties":{"lat":{"type":"number","example":45.188},"lng":{"type":"number","example":5.724},"name":{"type":"string","description":"Shown to the rider; a named point is announced as a stop by the guidance.","example":"Grenoble"}},"required":["lat","lng"],"description":"A WGS 84 position: latitude within 90, longitude within 180."},"Roadbook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f"},"url":{"type":"string","description":"The `https://revva.app/go` link to share, with your public key.","example":"https://revva.app/go?roadbook=6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f&key=pk_live_000000000000000000000000"},"title":{"type":"string","example":"Tour des Aravis"},"distanceM":{"type":"number","description":"Length in meters.","example":101685},"durationS":{"type":"number","description":"Riding time in seconds, estimated.","example":10039},"elevationGainM":{"type":["number","null"],"description":"Meters climbed, from the GPX altitudes. Only the creation response (201) carries it: null in every other response, and when the GPX has no altitudes or the source is via.","example":1500},"approximate":{"type":"boolean","description":"True for via points joined by straight lines because no road could be computed.","example":false},"ref":{"type":["string","null"],"example":"test-aravis"},"createdAt":{"type":"string","format":"date-time","example":"2026-10-20T08:30:00.000Z"}},"required":["id","url","title","distanceM","durationS","elevationGainM","approximate","ref","createdAt"],"description":"A roadbook shared by link only, owned by your app."},"RoadbookInput":{"type":"object","properties":{"gpx":{"type":"string","description":"The GPX file's text, 5000000 bytes at most (UTF-8). Its track (trk) is kept exactly; without one, its route (rte)."},"gpxUrl":{"type":"string","description":"A public https URL of a GPX file, fetched once at creation. Later changes to the file do not reach the roadbook.","example":"https://example.com/aravis.gpx"},"via":{"type":"array","items":{"$ref":"#/components/schemas/Point"},"minItems":2,"maxItems":25,"description":"2 to 25 points, ridden in order. Routed on roads, or straight lines marked approximate when it cannot be."},"title":{"type":"string","maxLength":80,"description":"Shown as the roadbook's title. Longer than 80 characters, it is cut, not refused. Without one, the GPX's own name, or \"Itinéraire\".","example":"Tour des Aravis"},"description":{"type":"string","maxLength":2000,"description":"Plain text under the title. Longer than 2000 characters, it is cut, not refused.","example":"Two days around the Aravis passes, from Annecy."},"ref":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","description":"Your own id for the roadbook, unique per app: [A-Za-z0-9._-], 64 characters at most. Sending a ref already used creates nothing and returns that roadbook with 200, so a retry is safe.","example":"test-aravis"}},"description":"Exactly one source (gpx, gpxUrl or via), then options. Any other count of sources is a validation_error."},"RoadbookPage":{"type":"object","properties":{"roadbooks":{"type":"array","items":{"$ref":"#/components/schemas/Roadbook"}},"nextCursor":{"type":["string","null"],"description":"The cursor of the next page, null on the last one."}},"required":["roadbooks","nextCursor"]},"RoadbookUpdate":{"type":"object","properties":{"title":{"type":"string","maxLength":80,"description":"The new title, cut at 80 characters. An empty title keeps the current one.","example":"Tour des Aravis"},"description":{"type":["string","null"],"maxLength":2000,"description":"The new description, cut at 2000 characters; null clears it.","example":"Two days around the Aravis passes, from Annecy."}},"description":"Only the fields sent change. The track cannot change."},"Event":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f"},"ref":{"type":["string","null"],"example":"test-aravis-2027"},"status":{"type":"string","enum":["pending","approved","rejected"],"description":"`pending` until Revva reviews it, then `approved` (riders see it) or `rejected` (`moderationNote` says why).","example":"pending"},"moderationNote":{"type":["string","null"],"description":"Why the event was rejected, when it was."},"underReview":{"type":"boolean","description":"True while an approved event's edit is being looked at again; it stays visible meanwhile.","example":false},"url":{"type":"string","description":"The event's page on revva.app. It answers \"event not found\" until the event is approved.","example":"https://revva.app/e/aB3dE5"},"title":{"type":"string","example":"Balade des Aravis"},"description":{"type":["string","null"]},"startsAt":{"type":"string","format":"date-time","example":"2027-05-01T07:00:00.000Z"},"endsAt":{"type":["string","null"],"format":"date-time"},"place":{"type":"string","example":"Annecy, place de la Mairie"},"latitude":{"type":"number","example":45.8992},"longitude":{"type":"number","example":6.1294},"registrationUrl":{"type":"string","example":"https://example.com/aravis"},"category":{"type":["string","null"],"enum":["group_ride","meetup","track_day","training","trip","competition","show","other",null],"example":"group_ride"},"bannerImageUrl":{"type":["string","null"],"description":"The banner as Revva hosts it, or null."},"createdAt":{"type":"string","format":"date-time","example":"2026-10-25T08:30:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-10-25T08:30:00.000Z"}},"required":["id","ref","status","moderationNote","underReview","url","title","description","startsAt","endsAt","place","latitude","longitude","registrationUrl","category","bannerImageUrl","createdAt","updatedAt"],"description":"An event on Revva's agenda, published by your app."},"EventInput":{"type":"object","properties":{"title":{"type":"string","description":"The event's name. Longer than 80 characters, it is cut, not refused.","example":"Balade des Aravis"},"startsAt":{"type":"string","format":"date-time","description":"ISO 8601 with an offset (`Z` or `±hh:mm`), in the future and within 18 months.","example":"2027-05-01T09:00:00+02:00"},"endsAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 with an offset, after `startsAt`. Optional.","example":"2027-05-01T18:00:00+02:00"},"registrationUrl":{"type":"string","description":"The https page where riders register or learn more.","example":"https://example.com/aravis"},"place":{"type":"string","description":"Where riders meet, 200 characters at most.","example":"Annecy, place de la Mairie"},"latitude":{"type":"number","description":"Of the meeting point, -90 to 90.","example":45.8992},"longitude":{"type":"number","description":"Of the meeting point, -180 to 180.","example":6.1294},"description":{"type":["string","null"],"description":"Plain text. Longer than 2,000 characters, it is cut, not refused.","example":"A day around the Aravis passes, lunch at La Clusaz."},"category":{"type":["string","null"],"description":"One of `group_ride`, `meetup`, `track_day`, `training`, `trip`, `competition`, `show`, `other`.","example":"group_ride"},"bannerUrl":{"type":["string","null"],"description":"A public https URL of a JPEG, PNG or WebP image of 2 MB at most, fetched within 5 s and hosted by Revva; otherwise banner_unreachable.","example":"https://example.com/aravis.jpg"},"ref":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","description":"Your own id for the event, unique per app: [A-Za-z0-9._-], 64 characters at most. Sending a ref already used creates and counts nothing and returns that event with 200, so a retry is safe.","example":"test-aravis-2027"}},"required":["title","startsAt","registrationUrl","place","latitude","longitude"],"description":"A new event. The service checks the dates, URLs, coordinates and category; a value it refuses is a validation_error naming the field."},"EventPage":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"nextCursor":{"type":["string","null"],"description":"The cursor of the next page, null on the last one."}},"required":["events","nextCursor"]},"EventUpdate":{"type":"object","properties":{"title":{"type":"string","description":"The event's name. Longer than 80 characters, it is cut, not refused.","example":"Balade des Aravis"},"startsAt":{"type":"string","format":"date-time","description":"ISO 8601 with an offset (`Z` or `±hh:mm`), in the future and within 18 months.","example":"2027-05-01T09:00:00+02:00"},"endsAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 with an offset, after `startsAt`. Optional.","example":"2027-05-01T18:00:00+02:00"},"registrationUrl":{"type":"string","description":"The https page where riders register or learn more.","example":"https://example.com/aravis"},"place":{"type":"string","description":"Where riders meet, 200 characters at most.","example":"Annecy, place de la Mairie"},"latitude":{"type":"number","description":"Of the meeting point, -90 to 90.","example":45.8992},"longitude":{"type":"number","description":"Of the meeting point, -180 to 180.","example":6.1294},"description":{"type":["string","null"],"description":"Plain text. Longer than 2,000 characters, it is cut, not refused.","example":"A day around the Aravis passes, lunch at La Clusaz."},"category":{"type":["string","null"],"description":"One of `group_ride`, `meetup`, `track_day`, `training`, `trip`, `competition`, `show`, `other`.","example":"group_ride"},"bannerUrl":{"type":["string","null"],"description":"A public https URL of a JPEG, PNG or WebP image of 2 MB at most, fetched within 5 s and hosted by Revva; otherwise banner_unreachable.","example":"https://example.com/aravis.jpg"},"ref":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","description":"Cannot change: a different ref is a validation_error.","example":"test-aravis-2027"}},"description":"Only the fields sent change; null clears an optional one. Changing the date, the place, the coordinates or the link sends an approved event back to review, unless Revva trusts your app."},"Stats":{"type":"object","properties":{"days":{"type":"array","items":{"$ref":"#/components/schemas/DailyStats"}},"stale":{"type":"boolean","description":"True when the totals could not be refreshed: these are then the last ones known. Retry later for fresh ones.","example":false}},"required":["days","stale"]},"DailyStats":{"type":"object","properties":{"day":{"type":"string","description":"The UTC day, YYYY-MM-DD.","example":"2026-10-20"},"pageViews":{"type":"integer","description":"revva.app/go pages viewed.","example":412},"storeTaps":{"type":"integer","description":"Taps on an App Store or Play Store button of those pages.","example":37},"appOpens":{"type":"integer","description":"Links opened in the Revva app.","example":158},"previewsShown":{"type":"integer","description":"Route previews shown in the app.","example":141},"ridesStarted":{"type":"integer","description":"Rides started from a link.","example":64},"uniqueVisitors":{"type":"integer","description":"People who viewed a revva.app/go page that day, each counted once. Approximate (about 1%).","example":298},"uniqueAppOpens":{"type":"integer","description":"Riders who opened a link in the app that day, each counted once. Approximate (about 1%).","example":131},"uniqueRiders":{"type":"integer","description":"Riders who started a ride from a link that day, each counted once. Approximate (about 1%).","example":58}},"required":["day","pageViews","storeTaps","appOpens","previewsShown","ridesStarted","uniqueVisitors","uniqueAppOpens","uniqueRiders"],"description":"One UTC day of your links. Counts only, with no rider, position or ride. Unique counts are per day: a person who comes back the next day counts again, so they do not add up into a number of people over several days. They are measured without cookies or any stored identifier."}},"parameters":{}},"paths":{"/links":{"post":{"tags":["Links"],"summary":"Build a route link","description":"Checks the source as a hand-written `https://revva.app/go` link is checked and returns the canonical link with your public key, and its short form `https://revva.app/go/<code>`. The same body always gives the same link and the same short link. The body is 64 KiB at most, and `title` and `q` are cut at 80 and 120 characters.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInput"},"example":{"gpxUrl":"https://example.com/aravis.gpx","title":"Tour des Aravis","ref":"aravis-2026"}}}},"responses":{"200":{"description":"The link, ready to share.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"400":{"description":"A link code, the one a /go link with this source gets, or `validation_error`:\n\n- `missing_source`: give one source: via, gpxUrl, to or q.\n- `multiple_sources`: give only one source: via, gpxUrl, to or q.\n- `bad_coordinates`: a coordinate is not valid: latitude within 90, longitude within 180.\n- `too_few_points`: via needs at least 2 points.\n- `too_many_points`: via takes at most 25 points.\n- `gpx_not_https`: gpxUrl must be an https URL.\n- `validation_error`: the body, a query parameter or the JSON itself does not match the schema; `detail` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_source":{"value":{"error":{"code":"missing_source","message":"Give one source: via, gpxUrl, to or q."}}},"multiple_sources":{"value":{"error":{"code":"multiple_sources","message":"Give only one source: via, gpxUrl, to or q."}}},"bad_coordinates":{"value":{"error":{"code":"bad_coordinates","message":"A coordinate is not valid: latitude within 90, longitude within 180."}}},"too_few_points":{"value":{"error":{"code":"too_few_points","message":"via needs at least 2 points."}}},"too_many_points":{"value":{"error":{"code":"too_many_points","message":"via takes at most 25 points."}}},"gpx_not_https":{"value":{"error":{"code":"gpx_not_https","message":"gpxUrl must be an https URL."}}},"validation_error":{"value":{"error":{"code":"validation_error","message":"The request is not valid."}}}}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"413":{"description":"Over 64 KiB:\n\n- `payload_too_large`: the body is over this endpoint's limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"value":{"error":{"code":"payload_too_large","message":"The request body is too large."}}}}}}},"429":{"description":"- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}}},"/roadbooks":{"post":{"tags":["Roadbooks"],"summary":"Create a roadbook","description":"Creates a roadbook shared by link only, from a GPX, a GPX URL or 2 to 25 via points, and returns its link; Revva computes the guidance once for every rider. A new roadbook answers 201, and a `ref` already used by one of your roadbooks creates and counts nothing and returns that roadbook with 200, so a retry after a timeout is safe. The body is 8 MiB at most (a 5 MB GPX, JSON-escaped), and an account creates 500 roadbooks per UTC day at most, all its keys together. `elevationGainM` comes from the GPX altitudes and is only in this response; later reads answer null.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoadbookInput"},"example":{"gpxUrl":"https://example.com/aravis.gpx","title":"Tour des Aravis","ref":"test-aravis"}}}},"responses":{"200":{"description":"The roadbook this `ref` already names. Nothing was created or counted; `elevationGainM` is null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roadbook"}}}},"201":{"description":"The new roadbook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roadbook"}}}},"400":{"description":"The body does not match the schema, or a source the /go parser refuses:\n\n- `validation_error`: the body, a query parameter or the JSON itself does not match the schema; `detail` names the field.\n- `bad_coordinates`: a coordinate is not valid: latitude within 90, longitude within 180.\n- `gpx_not_https`: gpxUrl must be an https URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"value":{"error":{"code":"validation_error","message":"The request is not valid."}}},"bad_coordinates":{"value":{"error":{"code":"bad_coordinates","message":"A coordinate is not valid: latitude within 90, longitude within 180."}}},"gpx_not_https":{"value":{"error":{"code":"gpx_not_https","message":"gpxUrl must be an https URL."}}}}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"413":{"description":"Over 8 MiB:\n\n- `payload_too_large`: the body is over this endpoint's limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"value":{"error":{"code":"payload_too_large","message":"The request body is too large."}}}}}}},"422":{"description":"- `gpx_unreachable`: the GPX could not be fetched or parsed; `detail` says why, nothing is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"gpx_unreachable":{"value":{"error":{"code":"gpx_unreachable","message":"The GPX could not be fetched or read."}}}}}}},"429":{"description":"- `quota_exceeded`: more than 500 roadbooks (or 200 events) created today (UTC) by this account, all its keys together.\n- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"quota_exceeded":{"value":{"error":{"code":"quota_exceeded","message":"Daily creation quota exceeded."}}},"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}},"get":{"tags":["Roadbooks"],"summary":"List your roadbooks","description":"Your app's roadbooks, newest first, 20 per page by default. Pass `nextCursor` back as `cursor` for the next page; it is null on the last one. Filter by `ref` to find the roadbook you gave that ref: the page holds it alone, or nothing (200, an empty `roadbooks`) when none of your roadbooks has it.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Roadbooks per page: 1 to 100, 20 by default.","example":20},"required":false,"description":"Roadbooks per page: 1 to 100, 20 by default.","name":"limit","in":"query"},{"schema":{"type":"string","description":"`nextCursor` of the previous page. Anything else is a validation_error."},"required":false,"description":"`nextCursor` of the previous page. Anything else is a validation_error.","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","description":"Only the roadbook with this `ref` (refs are unique per app): [A-Za-z0-9._-], 64 characters at most, else a validation_error. A ref none of your roadbooks has, another app's included, gives 200 with an empty list, not a 404.","example":"test-aravis"},"required":false,"description":"Only the roadbook with this `ref` (refs are unique per app): [A-Za-z0-9._-], 64 characters at most, else a validation_error. A ref none of your roadbooks has, another app's included, gives 200 with an empty list, not a 404.","name":"ref","in":"query"}],"responses":{"200":{"description":"A page of roadbooks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoadbookPage"}}}},"400":{"description":"- `validation_error`: the body, a query parameter or the JSON itself does not match the schema; `detail` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"value":{"error":{"code":"validation_error","message":"The request is not valid."}}}}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"429":{"description":"- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}}},"/roadbooks/{id}":{"get":{"tags":["Roadbooks"],"summary":"Get a roadbook","description":"One of your roadbooks, by the id the creation returned. `elevationGainM` is null here.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The roadbook's id. Another app's roadbook, or a malformed id, is not_found.","example":"6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f"},"required":true,"description":"The roadbook's id. Another app's roadbook, or a malformed id, is not_found.","name":"id","in":"path"}],"responses":{"200":{"description":"The roadbook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roadbook"}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"404":{"description":"- `not_found`: not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"value":{"error":{"code":"not_found","message":"Not found."}}}}}}},"429":{"description":"- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}},"patch":{"tags":["Roadbooks"],"summary":"Update a roadbook","description":"Changes the title or the description; riders holding the link see the change. The track cannot change: create a new roadbook for a new track. The body is 64 KiB at most.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The roadbook's id. Another app's roadbook, or a malformed id, is not_found.","example":"6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f"},"required":true,"description":"The roadbook's id. Another app's roadbook, or a malformed id, is not_found.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoadbookUpdate"},"example":{"title":"Tour des Aravis, two days"}}}},"responses":{"200":{"description":"The roadbook, updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Roadbook"}}}},"400":{"description":"- `validation_error`: the body, a query parameter or the JSON itself does not match the schema; `detail` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"value":{"error":{"code":"validation_error","message":"The request is not valid."}}}}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"404":{"description":"- `not_found`: not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"value":{"error":{"code":"not_found","message":"Not found."}}}}}}},"413":{"description":"Over 64 KiB:\n\n- `payload_too_large`: the body is over this endpoint's limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"value":{"error":{"code":"payload_too_large","message":"The request body is too large."}}}}}}},"429":{"description":"- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}},"delete":{"tags":["Roadbooks"],"summary":"Delete a roadbook","description":"Deletes the roadbook for good. Its link then tells riders the roadbook is no longer shared, and its `ref` is free again.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The roadbook's id. Another app's roadbook, or a malformed id, is not_found.","example":"6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f"},"required":true,"description":"The roadbook's id. Another app's roadbook, or a malformed id, is not_found.","name":"id","in":"path"}],"responses":{"204":{"description":"Deleted, no body."},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"404":{"description":"- `not_found`: not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"value":{"error":{"code":"not_found","message":"Not found."}}}}}}},"429":{"description":"- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}}},"/events":{"post":{"tags":["Events"],"summary":"Create an event","description":"Publishes an event on Revva's agenda, credited to your app's approved partner name (without one, app_not_branded). It is `pending` until Revva reviews it, unless Revva trusts your app; its `url` answers \"event not found\" until it is approved. A new event answers 201, and a `ref` already used by one of your events creates and counts nothing and returns that event with 200, so a retry after a timeout is safe. An app creates 200 events per UTC day at most, and the body is 64 KiB at most. An event with the same title, start and place as one already listed is a duplicate, whose `existingId` names it.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInput"},"example":{"title":"Balade des Aravis","startsAt":"2027-05-01T09:00:00+02:00","registrationUrl":"https://example.com/aravis","place":"Annecy, place de la Mairie","latitude":45.8992,"longitude":6.1294,"category":"group_ride","ref":"test-aravis-2027"}}}},"responses":{"200":{"description":"The event this `ref` already names. Nothing was created or counted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"201":{"description":"The new event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"The body does not match the schema, or a value the rules refuse:\n\n- `validation_error`: the body, a query parameter or the JSON itself does not match the schema; `detail` names the field.\n- `banner_unreachable`: the banner could not be fetched, or is not a JPEG, PNG or WebP of 2 MB at most.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"value":{"error":{"code":"validation_error","message":"The request is not valid."}}},"banner_unreachable":{"value":{"error":{"code":"banner_unreachable","message":"The banner could not be fetched or is not a JPEG, PNG or WebP of 2 MB at most."}}}}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"404":{"description":"- `not_found`: not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"value":{"error":{"code":"not_found","message":"Not found."}}}}}}},"409":{"description":"- `duplicate`: an event with the same title, start and place is already listed; `existingId` is its id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"duplicate":{"value":{"error":{"code":"duplicate","message":"An event with the same title, start and place is already listed."}}}}}}},"413":{"description":"Over 64 KiB:\n\n- `payload_too_large`: the body is over this endpoint's limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"value":{"error":{"code":"payload_too_large","message":"The request body is too large."}}}}}}},"422":{"description":"- `app_not_branded`: your app has no approved partner name to credit the organizer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"app_not_branded":{"value":{"error":{"code":"app_not_branded","message":"Your app has no approved partner name to credit the organizer."}}}}}}},"429":{"description":"- `quota_exceeded`: more than 500 roadbooks (or 200 events) created today (UTC) by this account, all its keys together.\n- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"quota_exceeded":{"value":{"error":{"code":"quota_exceeded","message":"Daily creation quota exceeded."}}},"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}},"get":{"tags":["Events"],"summary":"List your events","description":"Your app's events, newest first, 20 per page by default. Pass `nextCursor` back as `cursor` for the next page; it is null on the last one. Filter by `ref` to find the event you gave that ref, or by `status`.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Events per page: 1 to 100, 20 by default.","example":20},"required":false,"description":"Events per page: 1 to 100, 20 by default.","name":"limit","in":"query"},{"schema":{"type":"string","description":"`nextCursor` of the previous page. Anything else is a validation_error."},"required":false,"description":"`nextCursor` of the previous page. Anything else is a validation_error.","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","description":"Only the event with this `ref`. A ref none of your events has gives 200 with an empty list.","example":"test-aravis-2027"},"required":false,"description":"Only the event with this `ref`. A ref none of your events has gives 200 with an empty list.","name":"ref","in":"query"},{"schema":{"type":"string","enum":["pending","approved","rejected"],"description":"Only the events in this moderation status.","example":"pending"},"required":false,"description":"Only the events in this moderation status.","name":"status","in":"query"}],"responses":{"200":{"description":"A page of events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}}},"400":{"description":"- `validation_error`: the body, a query parameter or the JSON itself does not match the schema; `detail` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"value":{"error":{"code":"validation_error","message":"The request is not valid."}}}}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"404":{"description":"- `not_found`: not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"value":{"error":{"code":"not_found","message":"Not found."}}}}}}},"429":{"description":"- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}}},"/events/{id}":{"get":{"tags":["Events"],"summary":"Get an event","description":"One of your events, by the id the creation returned, with its moderation status.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The event's id. Another app's event, or a malformed id, is not_found.","example":"6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f"},"required":true,"description":"The event's id. Another app's event, or a malformed id, is not_found.","name":"id","in":"path"}],"responses":{"200":{"description":"The event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"404":{"description":"- `not_found`: not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"value":{"error":{"code":"not_found","message":"Not found."}}}}}}},"429":{"description":"- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}},"patch":{"tags":["Events"],"summary":"Update an event","description":"Changes the fields sent. A change to the date, the place, the coordinates or the link sends an approved event back to review (`pending`, its page hidden meanwhile), unless Revva trusts your app; other changes keep it live. An edit racing another one is a conflict: read the event again and retry. The body is 64 KiB at most.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The event's id. Another app's event, or a malformed id, is not_found.","example":"6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f"},"required":true,"description":"The event's id. Another app's event, or a malformed id, is not_found.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventUpdate"},"example":{"title":"Balade des Aravis, édition 2027"}}}},"responses":{"200":{"description":"The event, updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"- `validation_error`: the body, a query parameter or the JSON itself does not match the schema; `detail` names the field.\n- `banner_unreachable`: the banner could not be fetched, or is not a JPEG, PNG or WebP of 2 MB at most.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"value":{"error":{"code":"validation_error","message":"The request is not valid."}}},"banner_unreachable":{"value":{"error":{"code":"banner_unreachable","message":"The banner could not be fetched or is not a JPEG, PNG or WebP of 2 MB at most."}}}}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"404":{"description":"- `not_found`: not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"value":{"error":{"code":"not_found","message":"Not found."}}}}}}},"409":{"description":"- `duplicate`: an event with the same title, start and place is already listed; `existingId` is its id.\n- `conflict`: the event changed while you were editing it; read it again and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"duplicate":{"value":{"error":{"code":"duplicate","message":"An event with the same title, start and place is already listed."}}},"conflict":{"value":{"error":{"code":"conflict","message":"The event changed while you were editing it. Read it again and retry."}}}}}}},"413":{"description":"Over 64 KiB:\n\n- `payload_too_large`: the body is over this endpoint's limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payload_too_large":{"value":{"error":{"code":"payload_too_large","message":"The request body is too large."}}}}}}},"429":{"description":"- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}},"delete":{"tags":["Events"],"summary":"Delete an event","description":"Deletes the event for good: it leaves the agenda, its page answers \"event not found\", and its `ref` is free again.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The event's id. Another app's event, or a malformed id, is not_found.","example":"6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f"},"required":true,"description":"The event's id. Another app's event, or a malformed id, is not_found.","name":"id","in":"path"}],"responses":{"204":{"description":"Deleted, no body."},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"404":{"description":"- `not_found`: not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"value":{"error":{"code":"not_found","message":"Not found."}}}}}}},"429":{"description":"- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}}},"/stats":{"get":{"tags":["Stats"],"summary":"Daily stats of your links","description":"Totals per UTC day of every link carrying your public key, one row per day of the window, zeros included. Dates are YYYY-MM-DD, at most 90 days, none in the future. Counts only. An answer is cached for 15 minutes per window and `ref`; at most 20 calls per minute that the cache does not answer.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The first day, YYYY-MM-DD in UTC.","example":"2026-10-01"},"required":true,"description":"The first day, YYYY-MM-DD in UTC.","name":"from","in":"query"},{"schema":{"type":"string","description":"The last day, included, YYYY-MM-DD in UTC, not in the future. At most 90 days from `from`.","example":"2026-10-20"},"required":true,"description":"The last day, included, YYYY-MM-DD in UTC, not in the future. At most 90 days from `from`.","name":"to","in":"query"},{"schema":{"type":"string","description":"Only the links carrying this `ref`: [A-Za-z0-9._-], 64 characters at most.","example":"aravis-2026"},"required":false,"description":"Only the links carrying this `ref`: [A-Za-z0-9._-], 64 characters at most.","name":"ref","in":"query"}],"responses":{"200":{"description":"One row per day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"}}}},"400":{"description":"`from`, `to` or `ref` is missing or not valid:\n\n- `validation_error`: the body, a query parameter or the JSON itself does not match the schema; `detail` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"value":{"error":{"code":"validation_error","message":"The request is not valid."}}}}}}},"401":{"description":"- `invalid_key`: missing, unknown or revoked secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_key":{"value":{"error":{"code":"invalid_key","message":"Missing, unknown or revoked secret key."}}}}}}},"429":{"description":"On top of the key's rate limit, at most 20 calls per minute that the cache does not answer:\n\n- `rate_limited`: more than 120 requests in a minute for this key, or 300 from this IP; wait the `Retry-After` seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying, on `rate_limited`.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"value":{"error":{"code":"rate_limited","message":"Too many requests. Retry after the delay in Retry-After."}}}}}}},"500":{"description":"- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}},"503":{"description":"The stats could not be read and none are cached; retry later:\n\n- `server_error`: something went wrong on our side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"server_error":{"value":{"error":{"code":"server_error","message":"Something went wrong on our side."}}}}}}}}}}},"webhooks":{}}