Limits
Requests
Each key has its own limits, counted across all of your calls.
| Window | Default |
|---|---|
| Per minute | 600 |
| Per hour | 10,000 |
Over a limit the API answers 429. The message says how many seconds to wait:
{ "message": "Rate limit exceeded. Retry after 21s." }
If you need more, ask the Health Nexus team: the limits are set per key.
Verification codes and sign-in attempts
Steps that send a code by email or text message are limited separately, because each one reaches a real inbox or phone.
| Limit | Default |
|---|---|
| Code steps for one person, per hour | 10 |
| Text messages to one phone number, per hour | 5 |
| Password attempts for one email, per hour | 20 |
| Code steps for your key, per hour | one tenth of the key's hourly request limit |
| Text-message steps for your key, per hour | one hundredth of the key's hourly request limit |
These replies carry a code, the seconds to wait, and a Retry-After header:
{ "success": false, "code": "email_code_limit", "message": "Too many verification requests for this email. Retry after 1840s.", "retryAfterSec": 1840 }
A resend is also limited to once every 60 seconds for the same verification token. While a flow has an unverified phone, a resend sends a text message as well, so it counts toward the text-message limits.
Backing off
- Wait the number of seconds the reply gives (
Retry-AfterandretryAfterSecon the verification limits, the message on the request limit) before trying again. - Do not retry in a tight loop: a refused call still counts.
- For people, show a message: "Please wait a few minutes before asking for another code."
Sizes and times
| What | Limit |
|---|---|
| Lab upload | One PDF, up to 20 MB |
| Upload link | Valid for 15 minutes |
| Verification token | Valid for 10 minutes; each step returns a new one |