Authentication and quotas
The API key header, the quota windows on every key, watched-flight limits, and what a 429 or a 402 looks like.
The key
Every request carries your key in the x-api-key header. Authorization: Bearer <key> is accepted too.
curl "https://api.flightbyte.dev/v1/flights/TK/1848/2026-09-12" \
-H "x-api-key: $FLIGHTBYTE_KEY"A free key comes from signing up; paid plans are issued from the request form. Treat keys as secrets: keep them server-side, never in a browser or a mobile app. If a key leaks, rotate it in the dashboard; the old one stops working the moment the new one is issued. To protect the dashboard that holds your keys, turn on two-factor sign-in.
The only endpoints that work without a key are the flag images under /v1/flags, which are meant to be referenced straight from HTML.
Quotas
Your keys share three independent windows: requests per minute, per day and per month, sized by your plan. The minute window resets on the minute and the day at 00:00 UTC. The month is your usage period: it resets at 00:00 UTC on the day your plan renews, or on Free the day of the month you signed up.
Every response tells you where you stand:
X-RateLimit-Limit-Minute: 120
X-RateLimit-Remaining-Minute: 117
X-RateLimit-Reset-Minute: 1789306080
X-RateLimit-Limit-Day: 10000
X-RateLimit-Remaining-Day: 9814
X-RateLimit-Reset-Day: 1789344000Reset values are Unix seconds. A window with no limit sends no headers.
Subscriptions are counted separately: each one a key creates in a usage period is a watched flight. Free has a cap of 3, and the fourth subscription in a period is refused with 402 and "code": "watched_flight_limit", while the three you have keep running, unless the account holds prepaid credits. Paid plans bill flights past the plan's allowance and have no cap unless you set one: on the dashboard's Plan page you can cap what extra flights may cost in a period, and a subscription that would pass it is refused with 402 and "code": "overage_cap_reached". See when watched flights run out.
When a window is full
The request is refused with 429, a Retry-After header, and a body that names the window:
{
"statusCode": 429,
"error": "TooManyRequests",
"message": "Quota exceeded for the current minute window (120/120).",
"window": "minute",
"retryAfterSeconds": 23,
"path": "/v1/flights/TK/1848/2026-09-12",
"timestamp": "2026-09-12T10:41:37.000Z",
"requestId": "5129839a-26c5-49d2-bf4c-eb4f47d10a03"
}A refused request does not consume any window. The three checks happen atomically, so a request that fails the daily limit does not eat a minute or a month.
Webhooks are free of quota
Quotas count the requests you make. Webhook deliveries, and the polling FlightByte does on your behalf, are never counted against them; watched flights are metered separately by your plan.
When watched flights run out
A new subscription that would pass the period's watched flights is refused with 402, and code says which limit it met:
watched_flight_limit: the plan caps watched flights a month (Free: 3).overage_cap_reached: on a paid plan, the cap on a period's extra flights set on the dashboard's Plan page would be passed. The body addscapCents, the cap in US cents. A cap of$0stops at the plan's own flights.credits_exhausted: on Free, the period's flights are used and so are the account's prepaid credits, or they expired. Instead oflimit,usedandresetsAt, the body carriesbalance(0) andexpiresAt.
{
"statusCode": 402,
"error": "PaymentRequired",
"message": "This account caps extra flights at $20.00 a usage period, which with the plan's 100 covers 350 watched flights, and all 350 are used. Existing subscriptions keep running; raise or clear the cap on the Plan page to watch more before the count resets.",
"path": "/v1/subscriptions",
"timestamp": "2026-09-12T10:41:37.000Z",
"requestId": "5129839a-26c5-49d2-bf4c-eb4f47d10a03",
"code": "overage_cap_reached",
"limit": 350,
"used": 350,
"resetsAt": "2026-10-18T00:00:00.000Z",
"capCents": 2000
}limit is the watched flights the period allows: the plan's cap, or its allowance plus the extra flights the cap pays for. used is how many were created this period, and resetsAt is when the count starts over. The refused subscription is not counted or billed, and the ones running keep running. It answers the same until the period resets, the plan changes or, for overage_cap_reached, the cap is raised or removed, or for credits_exhausted, the account tops up.
Prepaid credits
For no monthly fee, a Free account can buy watched flights in packs on the Plan page: 200 for $20, 600 for $55 or 2,000 for $180. Once the period's 3 Free flights are used, each new subscription spends one credit instead of answering 402. A credit is one watched flight however many webhooks it sends, and it is not counted in the period's watched flights. A subscription that is refused, or fails to be created, spends nothing.
While the account holds credits, its keys make 60 requests a minute, and past Free's 120 requests a period they draw on 40 lookups per credit bought. The month headers count those lookups in: X-RateLimit-Remaining-Month is what is left of Free's requests plus the lookups left, and X-RateLimit-Limit-Month is used plus remaining. With both used up, a request answers 429 for the month window.
The whole balance expires 12 months after the last top-up, and any new pack moves that date for all of it. When FlightByte suspends a subscription because its flight number operates several legs, or gives up on a flight that never appeared upstream, the credit it spent goes back to the balance; deleting a subscription yourself does not. Credits are spent only on Free: on a paid plan the plan's own flights apply and the balance waits until the plan ends. Once the credits run out or expire, new subscriptions past the Free flights answer 402 with "code": "credits_exhausted":
{
"statusCode": 402,
"error": "PaymentRequired",
"message": "This account's Free flights for the period and its prepaid credits are used. Existing subscriptions keep running; buy a pack on the Plan page to watch more.",
"path": "/v1/subscriptions",
"timestamp": "2026-11-12T10:41:37.000Z",
"requestId": "5129839a-26c5-49d2-bf4c-eb4f47d10a03",
"code": "credits_exhausted",
"balance": 0,
"expiresAt": "2027-11-10T09:00:00.000Z"
}Usage emails
We email the account's address when a period's watched flights reach 80% and 100% of the plan's allowance, when the extra flights make a bigger plan the cheaper one, and when the overage cap refuses a subscription. Each goes at most once a period; on Free only the 100% one is sent, and none while the account holds credits. Credits have their own: when a fifth of the last top-up is left, when the balance runs out, and a month before it expires, each once per top-up.
Dart SDK
The official FlightByte package for Dart 3.5+. Look a flight up, watch it, and verify signed flight status webhooks on a Dart server, in a CLI, or in the backend behind your Flutter app.
Account security
Two-factor sign-in for the dashboard with an authenticator app or a passkey, recovery codes, the second check before sensitive changes, and signing out other browsers.