Skip to main content
POST
Apply a previewed ALLOCAIT.md setup file

Authorizations

x-api-key
string
header
required

Raw API key shown once when created in the Allocait app (Settings > API keys). Send it verbatim in this header; the server stores and compares only its SHA-256 hash. Allocait generates every key: alc_ followed by 64 lowercase hex characters. Keys issued before 2026-10-10 are 64 hex characters with no prefix and keep working. A key may carry an expiry (90 days or 1 year, or never). A malformed, unknown, revoked or expired key gets 401 with no further detail, and a malformed one is refused before any lookup. Keys cannot be created through this API.

Body

application/json
setup
string
required

The same text you previewed.

digest
string
required

The digest the preview returned. It ties this apply to a preview of the same decisions. A value no preview could have returned is 400.

Pattern: ^[0-9a-f]{64}$
portfolio_id
string<uuid>

The same portfolio_id you previewed with, or none if you sent none.

Response

Applied, or already applied, or nothing to change

file
object
required
target
object | null
required
counts
object
required
items
object[]
required
key
object
required
next
string
required

Says no scenario was made active. An apply never changes the active scenario, holdings, cash, prices or recorded values.

receipt_id
string<uuid>

Pass it to POST /setup/receipts/{id}/undo. Absent when nothing was added or updated.

already_applied
boolean

Present and true when this digest was already applied in the last ten minutes. The stored result comes back and nothing is added twice.

nothing_to_change
boolean

Present and true when the file would add and update nothing.