Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: K-φ Fn API
version: 1.0.0
description: 'Read your K-φ data (statements, cash, forecasts, scenarios) and save scenarios. The tenant always comes from the credential. Every response is { data, meta }; every error { error: { code, message } }.'
tags:
- name: Fn
paths:
/api/v1/fn:
get:
x-audience: build
operationId: fn_list
summary: The BUILD functions this credential may call
description: The BUILD's functions this credential may call, with their input and output schemas.
x-scope: run:build
security:
- bearer: []
responses:
'200':
description: OK
tags:
- Fn
/api/v1/fn/{name}:
post:
x-audience: build
operationId: fn_call
summary: Call a BUILD function
description: 'run:build calls functions that only read; run:build:write also those declared "writes": true. The input is checked against the function''s schema (400 bad_input), the answer against its output schema (502 bad_output).'
x-scope: run:build
security:
- bearer: []
parameters:
- name: name
in: path
required: true
schema:
type: string
- name: ext
in: query
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
description: 'OK: { data: <the function''s output>, meta }'
'400':
description: The input does not match the schema
'403':
description: Scope refused
'404':
description: No such function
'502':
description: The function failed or answered outside its schema
'503':
description: Not ready
'504':
description: No answer in 30 s
tags:
- Fn
components:
securitySchemes:
bearer:
type: http
scheme: bearer
description: API key, OAuth access token, extension key (kphix_…) or extension session token (kxs1.…)
apiKeyHeader:
type: apiKey
in: header
name: X-API-Key
description: API key with the gl:ingest scope (ERP connectors)
x-scopes:
gl:ingest: Push GL data from an ERP (/api/gl/mappings, /api/gl/schema, /api/gl/ingest)
mcp:tools: All read scopes (read:gl read:cash read:forecast read:sheets read:data)
mcp:write: All MCP write scopes (write:scenarios write:config write:data write:sheets)
read:gl: Read statements, KPIs, ratios, GL lines, versions, dimensions, variance, data lake, FX rates and FP&A settings
read:cash: Read bank positions, transactions, balance history, cash forecast, AR/AP
read:forecast: Read forecasts, budgets, scenarios (levers, list, run) and valuations
read:sheets: Read the Google Sheets registered as inputs of the account, each tab as JSON (/api/v1/sheets/…), and their webhooks' deliveries (2026-11-02)
write:sheets: 'Register and remove the Google Sheets the account serves as JSON (read only: K-φ never writes to a sheet), and the webhooks told when one changes'
read:data: 'Read the Data library (/api/v1/data/…): market, macro and public series with their source and licence (2026-11-03)'
write:vars: 'Define, load and remove the account''s own variables (var.<CODE>) of the Data library, and nothing else: never the books (2026-11-05)'
write:scenarios: Save scenarios (Simulation page)
write:config: 'Change tenant configuration: flow rules, classification overrides, budget versions and templates, valuation refresh'
write:data: 'Import rows from a spreadsheet Claude read (Excel in, 2026-10-29): cash forecasts, a GL version, a bank statement; preview first, then commit'
run:build: 'Call the BUILD''s functions that only read (POST /api/v1/fn/<name>): the logic the account built, served as an API (2026-10-29)'
run:build:write: 'Also call the BUILD''s functions that change data (declared "writes": true in its kphi.json)'
x-limits:
per_ip_per_min: 200
extension_per_min: 120
extension_per_day: 20000