Skip to main content
POST
Initiate settlement

Authorizations

Authorization
string
header
required

Auth0 JWT access token. See Authentication for details.

Body

application/json
idempotency_key
string
required

Your key for safe retries, unique within the environment. A retry with the same key returns the existing resource. Keys starting with 'match-' are reserved for keys KeyStone derives and are refused.

Required string length: 1 - 255
parties
SettlementPartyInput · object[]
required
Minimum array length: 1
legs
SettlementLegInput · object[]
required
Minimum array length: 1
template_id
string<uuid> | null
template_slug
string | null
Maximum string length: 100
external_reference
string | null
Maximum string length: 255
timeout_at
string<date-time> | null

Optional explicit deadline override. When omitted, the deadline defaults to now + the template's timeout_seconds.

Response

Successful Response

id
string<uuid>
required
idempotency_key
string
required
platform_id
string<uuid>
required
environment_id
string<uuid>
required
template_id
string<uuid>
required
template_version
integer
required
external_reference
string | null
required
settlement_type
string
required
parties
SettlementPartyRead · object[]
required
legs
SettlementLegRead · object[]
required
state
string
required
timeout_at
string<date-time>
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
timeout_claimable
boolean
required
read-only

True when the deadline passed while the settlement's exit still belonged to the chain (deposits pending). The contract accepts deposits and execution strictly before the deadline, so the settlement can no longer execute; where it is registered on-chain, either party can call the permissionless claimTimeout to resolve it, then claimRefund per deposited leg. KeyStone never calls claimTimeout itself.

trade_type
string | null
linked_settlement_id
string<uuid> | null
coordinator
string | null
coordinator_chain
string | null
triggered_by
Triggered By · object | null
audit_anchor_hash
string | null
repo_terms
RepoTermsRead · object | null