Skip to main content
Every request to a /api/v1/ endpoint must include a valid API key. FileRouter uses standard HTTP Bearer authentication — you send your key in the Authorization header, and the API validates it on every request. There are no cookies, sessions, or OAuth flows for the REST API.

Get Your API Key

You create and manage API keys from the FileRouter dashboard at filerouter.dev. Each key ties to your account and scopes permissions accordingly. Treat your API key like a password — don’t commit it to version control or expose it in client-side code.

Send the Authorization Header

Include the following header on every API request:
The TypeScript FileRouterClient reads FILEROUTER_API_KEY from your environment automatically. You don’t need to set the header manually when using the SDK.

401 Unauthorized

If you omit the Authorization header, send an invalid key, or use a key that has been disabled or has expired, the API returns HTTP 401 with an application/problem+json body:
401 error response
API keys can be disabled or expired by you or an administrator. If you receive a 401 and your key looks correct, open the FileRouter dashboard to verify the key is still active and hasn’t passed its expiry date.

Security Best Practices

  • Store your API key in an environment variable (e.g., FILEROUTER_API_KEY) rather than hardcoding it.
  • Rotate keys regularly and revoke any key you suspect has been compromised.
  • Use separate keys for development and production environments so you can revoke one without affecting the other.