Authentication

All API requests require authentication using API keys. Each key is scoped to a specific organization and has configurable permissions.

API Key Headers

Include these headers with every request:

HeaderDescription
api-keyYour API key (starts with fob_stm_)
api-secretYour API secret

Example

curl -X GET "https://statements.finopsbricks.com/api/v1/transactions" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Creating API Keys

  1. Navigate to Settings - API Keys in your organization
  2. Click Create new API Key
  3. Enter a name for the key
  4. Select a permission preset or customize permissions
  5. Optionally set an expiry date
  6. Copy and securely store the secret (shown only once)

Permission Presets

PresetDescription
Full AccessRead and write access to all resources
Read OnlyRead-only access to all resources
Transactions OnlyFull access to transactions, read-only for others
CustomDefine your own permission matrix

Permission Matrix

Permissions are defined as a matrix of resources and actions:

Resourcereadcreateeditdelete
transactionsYes/NoYes/NoYes/NoYes/No
accountsYes/NoYes/NoYes/NoYes/No
statementsYes/NoYes/NoYes/NoYes/No
rulesYes/NoYes/NoYes/NoYes/No

Error Responses

Missing Credentials

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Missing API credentials"
  }
}

Invalid Credentials

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API credentials"
  }
}

Expired Key

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "API key expired"
  }
}

Insufficient Permissions

{
  "error": {
    "code": "FORBIDDEN",
    "message": "API key lacks transactions:create permission"
  }
}

Security: Never expose your API secret in client-side code or public repositories. The secret is shown only once when creating the key.