Authentication
Authenticate every Net Amount REST API and Remote MCP request with a server-side Bearer API key.
Bearer header format
Send your API key in the HTTP Authorization header using the Bearer scheme over HTTPS. Every endpoint—including REST routes under https://api.netamount.com and the Remote MCP endpoint at POST https://netamount.com/mcp—uses the same header format.
Authorization: Bearer YOUR_API_KEYTo verify a new key without spending a billable request, call GET /account/balance. The endpoint is always free, validates your credentials, and returns your active plan and remaining monthly capacity.
curl https://api.netamount.com/account/balance \
-H "Authorization: Bearer $NET_AMOUNT_API_KEY"API key security and SHA-256 storage
Create and manage keys from /dashboard/keys (organization workspaces require the admin role). Net Amount displays the plaintext secret once at creation and stores only its SHA-256 hash—plaintext keys cannot be viewed or recovered later.
- Load keys from server-side environment variables or a secret manager (such as
NET_AMOUNT_API_KEY). Never embed keys in browser JavaScript, mobile app bundles, public Git repositories, or URL query strings. - API keys authorize tax lookups, calculations, and workspace compliance endpoints only. They can never modify billing settings, create or revoke other API keys, or change team memberships.
Entity-scoped API keys
Workspaces using legal entities (Starter and Growth) can leave a key workspace-wide or restrict it to specific subsidiaries when creating the key using defaultEntityId and allowedEntityIds:
| Setting | Behavior |
|---|---|
defaultEntityId | Automatically applied to tax calculations, commits, and ledger queries when the request omits entityId, entityCode, and ein. Must be listed in allowedEntityIds when both are configured. |
allowedEntityIds | Array of 1 to 200 entity IDs the key may access. List endpoints filter automatically to allowed entities; explicit requests for disallowed entities or workspace-wide writes return 403 (forbidden), and single-record reads outside scope return 404. |
See API key entity scoping for multi-entity hierarchy and subsidiary isolation details.
Handling 401, 403, and 429 responses
All authentication, authorization, and rate-limit failures return a structured JSON error body and carry a $0 billing guarantee—failed requests never count against your monthly allowance or incur overage charges.
| HTTP | Error code | Cause and action |
|---|---|---|
401 | unauthorized | Missing, malformed, invalid, or turned-off Bearer API key. Verify the Authorization header and confirm the key is active in /dashboard/keys. Do not retry automatically. |
403 | plan_upgrade_required, forbidden | The endpoint requires Starter or Growth, or an entity-scoped key attempted to access a disallowed entity or workspace-wide write. Fix the plan or key scope before retrying. |
429 | rate_limited | Account throughput limit reached. Read the integer Retry-After response header and wait at least that many seconds before retrying with jitter. |
Throughput and active key quotas are shared across your workspace's REST API keys, Remote MCP server, and web dashboard: 300 req/min (burst 30, unlimited active keys) on Starter, and dedicated limits (600+ req/min, burst 60) on Growth. Unsubscribed workspaces are limited to 30 req/min (burst 10, 1 active key) for free reference and balance checks until a plan is active.
Zero-downtime key rotation
On Starter and Growth plans (unlimited active keys), rotate credentials with zero downtime by overlapping the replacement key before turning off the old one:
- Create a new API key in /dashboard/keys with the same label convention and any required
defaultEntityId/allowedEntityIdsscope. - Update your secret store and deploy the new
NET_AMOUNT_API_KEYvalue across all application instances and MCP clients. - Confirm traffic is succeeding with the new key (for example, via a free
GET /account/balancehealth check) and confirm the old key is no longer seeing requests. - Turn off the old key in /dashboard/keys. Revocation takes effect immediately.
Unsubscribed workspaces allow 1 active key at a time until Starter or Growth is active. To rotate a key before activating a plan, turn off the existing key in /dashboard/keys, generate a replacement immediately, and redeploy your environment variable.