API keys, webhooks and installs
Create an API key
Creates an API key with scopes and a mode, and returns the key once.
The response contains the full key in key. It is shown only once: we store only a hash. Send it as Authorization: Bearer <key>. A key is bound to this account.
scopes are permission keys, and a key can never hold a scope you do not have yourself. At call time the key is limited further to your current permissions: if your role loses a key or you leave the account, the API key loses it on its next request.
mode decides whether the key can send. With draft_only (default), sends need "confirm": true. With auto_send, the key may send documents to clients without confirmation; creating an auto_send key needs a fresh sign-in. Keys are made in Settings > API keys. See Authentication and Drafts and confirmations.
- Creating an
auto_sendkey needs a fresh sign-in: a web session that is not fresh gets401 fresh_signin_required. API keys cannot perform fresh-sign-in actions. - Send an
Idempotency-Keyheader so a retried request never creates two keys.
- Permission
integrations.manage- Type
- Write. Creates or changes data and writes an audit entry.
- Auth
- API key, MCP token or signed-in session
- Capability
create_api_key- CLI
freeinvoiceautomation key create- Available
- At launch, 1 January 2027
curl --request POST \
--url https://api.freeinvoiceautomation.com/v1/api-keys \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: <unique-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Accounting export script",
"scopes": [
"documents.view",
"clients.view",
"payments.view",
"reports.view"
],
"mode": "draft_only",
"business_ids": [
"0193f29e-11aa-7c3b-8d2e-5a6b7c8d9e0f"
]
}'{
"data": {
"id": "0193f350-5a6b-7c7d-8e9f-0a1b2c3d4e5f",
"name": "Accounting export script",
"prefix": "fia_live_7Hq2",
"scopes": [
"documents.view",
"clients.view",
"payments.view",
"reports.view"
],
"mode": "draft_only",
"business_ids": [
"0193f29e-11aa-7c3b-8d2e-5a6b7c8d9e0f"
],
"rate_limit_per_minute": null,
"source": "user",
"last_used_at": null,
"expires_at": null,
"revoked_at": null,
"created_by": "0193f29d-2c3d-7e4f-9a0b-1c2d3e4f5a6b",
"created_at": "2027-01-05T12:00:00Z",
"key": "fia_live_7Hq2kR9vXw3mN8pL5tY1cB6dF0gJ4sZ"
}
}Authorizations
Bearer <api-key>. An API key from Settings > API keys, or an MCP token. See Authentication.Headers
Body
application/jsondocuments.view. Each must be one you hold.auto_send lets the key send without confirmation and needs a fresh sign-in.Available options: draft_only, auto_send
Response
201 - application/jsonAccounting export script.draft_only (default): sends need "confirm": true. auto_send: the key may send documents without confirmation.Available options: draft_only, auto_send
null for every business its creator can reach.null for the default.user for keys you created; connector_install for keys issued to a Shopify or WordPress install.Available options: user, connector_install
null for no expiry.Errors
Plus the common errors every call can return. See Errors.