Status: specification for Public API v1. Not live yet.
Every request is authenticated with an API key sent as a bearer token:
Authorization: Bearer fnv_live_a1b2c3d4e5f6_<secret>Keys sent any other way are rejected. A key in the URL query string returns 400 because URLs
end up in logs and browser history.
Key anatomy
fnv_live_a1b2c3d4e5f6_Zk9...Qw
└──┬───┘ └────┬─────┘ └──┬───┘
prefix key id secretfnv_live_identifies a Fininvo production key, so secret scanners can detect it.- The 12 character key id is not secret. It appears in the Developers page and in logs. Quote it to support.
- The secret is shown once, at creation. Fininvo stores only a keyed hash of it.
What a key is bound to
| Binding | Meaning |
|---|---|
| Account | A key only ever sees data of the account that created it. This cannot be changed by any request parameter. |
| Product | ERP, HRMS or Payroll. One product per key. |
| Company | ERP keys are bound to one company. A key created for "all companies" must send X-Fininvo-Company: <companyId> on each request. |
| Scopes | The list of things the key may do. |
| IP allowlist | Optional list of IP addresses or CIDR ranges. When set, calls from anywhere else return 401. |
| Expiry | Mandatory. Maximum 365 days. |
Scopes
Scopes follow product.resource:action. Grant the smallest set that works.
ERP
| Scope | Allows |
|---|---|
erp.customers:read | List and read customers |
erp.customers:write | Create and update customers |
erp.items:read | List and read items and stock levels |
erp.invoices:read | List and read invoices |
erp.invoices:write | Create draft invoices |
erp.payments:read | List and read received payments |
HRMS
| Scope | Allows |
|---|---|
hr.employees:read | Employee directory fields and departments |
hr.employees.sensitive:read | Adds identity numbers, bank details, salary, date of birth and personal contact details. Only the account owner can grant it. |
hr.attendance:read | Attendance records |
hr.attendance:write | Push punches from devices |
hr.leave:read | Leave requests and balances |
Payroll
| Scope | Allows |
|---|---|
payroll.runs:read | Processed payroll runs and the salary journal summary |
payroll.payslips:read | Payslips of processed runs. Only the account owner can grant it. |
Payroll is read-only through the API. Runs are created, approved and paid by people in the Payroll product.
Shared
| Scope | Allows |
|---|---|
events:read | List recent events for reconciliation (see Webhooks) |
Write scopes are available only when write access is enabled for your account. Creating a key with a write scope asks for your password again, and your MFA code if MFA is on.
Scopes marked "Only the account owner can grant it" carry salary or identity data. Only the account owner can create, rotate or edit a key that holds one. Rotating a key with a write scope or an owner-only scope asks for your password (and MFA code) again, and so does adding entries to a key's IP allowlist or removing it.
Creating a key
- Settings → Developers → API keys → Create key.
- Name, scopes, expiry, optional IP allowlist.
- Copy the key and store it in your secret manager.
- Tick the confirmation that you have stored it. The dialog cannot be reopened.
Account owners receive an email whenever a key is created, rotated or revoked.
Lifecycle
stateDiagram-v2
[*] --> Active: Created
Active --> Active: Rotated / edited
Active --> Suspended: Suspended by Fininvo
Suspended --> Active: Reinstated
Active --> Expired: Expiry date passed
Active --> Revoked: Revoked
Suspended --> Revoked: Revoked
Expired --> [*]
Revoked --> [*]The full request check order is in Integration flows.
Rotating a key
Rotate before expiry, on a schedule, and whenever someone with access leaves.
- Open the key and choose Rotate.
- Pick an overlap of 0 to 24 hours. During the overlap both the old and the new secret work.
- Deploy the new secret.
- After the overlap the old secret stops working automatically.
Choose an overlap of 0 if you suspect the old secret has leaked.
You get reminder emails 14 days and 3 days before a key expires. An expired key returns 401
with code key_expired.
Revoking a key
Choose Revoke on the key. It stops working within seconds and cannot be restored. Create a new key if you need access again.
Fininvo may also suspend or revoke a key to protect your account, for example when a key is reported as leaked. You are emailed when that happens.
Checking a key
curl https://fininvo.com/api/v1/public/me -H "Authorization: Bearer $FININVO_API_KEY"Returns the key name, product, scopes, company and current limits. Use it as a health check in your deployment.
Authentication errors
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_key | Missing, malformed or unknown key, or wrong secret |
| 401 | key_revoked | The key was revoked |
| 401 | key_suspended | The key is suspended. Contact support. |
| 401 | key_expired | Past its expiry date |
| 401 | ip_not_allowed | Caller IP is not in the key allowlist |
| 401 | account_suspended | The Fininvo account is suspended. Contact support. |
| 400 | key_in_query | The key was sent in the URL. Send it in the Authorization header. |
| 403 | insufficient_scope | The key lacks the scope named in details.requiredScope |
| 403 | api_not_enabled | API access is not on for this account or plan |
| 429 | too_many_failed_attempts | Too many invalid keys from this IP. Wait 15 minutes. |
| 503 | api_disabled | The API is temporarily switched off by Fininvo |
Repeated invalid attempts from one IP address are blocked for 15 minutes, so do not retry a
401 in a loop. Fix the key first.
