API

Kova REST API.

Programmatic access to strategies, portfolios, assets, liabilities, simulations, and briefs. Same evaluation engine as the web app, CLI, and MCP tools.

Base URL: https://kovatools.com/api/v1

Authentication

API requests require an active Kova subscription and a Bearer token in the Authorization header. Generate a token from Settings in the web app, or use the CLI browser auth flow.

Authorization: Bearer kova_tk_xxxxxxxxxxxxxxxxxxxx

curl https://kovatools.com/api/v1/strategies \
  -H "Authorization: Bearer kova_tk_xxxxxxxxxxxxxxxxxxxx"

Response Format

Every success response wraps the resource in a named key plus a meta object. Errors return an error object and the same meta shape.

{
  "strategy": { "...": "..." },
  "meta": {
    "request_id": "abc-123",
    "timestamp": "2026-02-15T12:00:00Z"
  }
}

Strategies

GET /api/v1/strategies

List strategies

Returns all strategies owned by the authenticated user, including latest alignment fields when available.

POST /api/v1/strategies

Create strategy

Creates a strategy from a name and full strategy content.

GET /api/v1/strategies/:uuid

Get strategy

Returns full strategy content and metadata.

PUT /api/v1/strategies/:uuid

Update strategy

Updates the name, content, or both.

DELETE /api/v1/strategies/:uuid

Delete strategy

Deletes the strategy. Associated briefs are preserved but unlinked.

Versions

GET /api/v1/strategies/:uuid/versions

List versions

Lists saved version snapshots for a strategy.

GET /api/v1/strategies/:uuid/versions/:version_number

Get version

Returns the full content for a specific strategy version.

POST /api/v1/strategies/:uuid/versions/:version_number/restore

Restore version

Restores a previous version while preserving the current content as a new version.

Portfolio

GET /api/v1/strategies/:uuid/portfolio

Get current portfolio

Returns the most recent composed portfolio: normalized holdings, manual assets and liabilities with UUIDs, and metrics.

Assets

POST /api/v1/strategies/:uuid/assets

Create asset

Registers a non-ticker asset such as an investment account, Bitcoin, real estate, or other holding.

PATCH /api/v1/strategies/:uuid/assets/:asset_uuid

Update asset

Updates provided asset fields with merge semantics.

DELETE /api/v1/strategies/:uuid/assets/:asset_uuid

Delete asset

Removes a manual asset from the strategy.

Liabilities

POST /api/v1/strategies/:uuid/liabilities

Create liability

Registers a persistent obligation such as a line of credit, mortgage, loan, or other debt.

PATCH /api/v1/strategies/:uuid/liabilities/:liability_uuid

Update liability

Updates provided liability fields with merge semantics.

DELETE /api/v1/strategies/:uuid/liabilities/:liability_uuid

Delete liability

Removes a manual liability from the strategy.

Briefs

POST /api/v1/strategies/:uuid/briefs

Create brief

Submits a portfolio snapshot or regenerates against existing portfolio data and starts asynchronous brief generation.

GET /api/v1/strategies/:uuid/briefs/:id

Get brief

Polls for brief status and returns completed alignment, summary, markdown content, allocations, and checks.

GET /api/v1/strategies/:uuid/briefs

List briefs

Lists completed briefs for a strategy, newest first.

Simulations

POST /api/v1/strategies/:uuid/simulations

Create simulation

Runs an ephemeral what-if evaluation against a hypothetical portfolio without saving records.

GET /api/v1/strategies/:uuid/simulations/:id

Get simulation

Polls for a simulation result until completed or failed. Results expire after one hour.

Brief Lifecycle

Creating a brief is asynchronous. POST to create, then poll the show endpoint until status changes from processing to completed or error. Processing responses include polling hints. Each strategy can have one active evaluation at a time; concurrent create requests return 409 evaluation_in_progress with the active brief ID.

POST /api/v1/strategies/:uuid/briefs
  -> 202 Accepted
  -> { "brief": { "id": "brief-uuid", "status": "processing" } }

GET /api/v1/strategies/:uuid/briefs/:id
  -> { "brief": { "status": "completed", "alignment": { "score": 0.82 } } }

Portfolio JSON Schema

JSON portfolio input must conform to the portfolio_v1 shape: stocks, options, cash, timestamp, and notes. Manual assets and liabilities live on the strategy and are included in composed portfolio reads.

{
  "schema_version": "1.0.0",
  "stocks": [
    { "ticker": "VOO", "shares": 50, "cost_basis": 400.00 }
  ],
  "options": [
    { "ticker": "VOO", "type": "call", "strike": 510, "expiry": "2026-06-19", "contracts": 1, "side": "short" }
  ],
  "cash": 8500.00,
  "timestamp": "2026-02-15T12:00:00Z",
  "notes": []
}

Alignment Scale

0.85 - 1.00
Strongly Aligned
0.70 - <0.85
Aligned
0.55 - <0.70
Partially Aligned
0.40 - <0.55
Drifting
0.00 - <0.40
Off-Track

Error Codes

401 unauthorized

Missing or invalid API token

403 subscription_required

Active subscription required

404 not_found

Resource does not exist or is not yours

409 evaluation_in_progress

A strategy already has a running evaluation

422 invalid_params

Malformed or missing request parameters

422 validation_failed

Model validation failed

Prefer MCP?

The same strategy, portfolio, brief, asset, liability, and simulation operations are available as MCP tools your agent can call directly.

See the MCP tools