Policies
List policy versions (newest first)
GET
/v1/policiesParameters
walletin query,stringlimitin query,integer
Responses
200All versions, optionally filtered by wallet
policiesobject[](required)
Example
curl -X GET https://api.cofferline.com/v1/policies \ -H "authorization: Bearer $TOKEN"
Submit a policy document; creates immutable version n+1 for its wallet
PUT
/v1/policiesVersions are hash-addressed and append-only — history is never rewritten. Re-submitting the latest document verbatim returns the existing version instead of minting a duplicate. Only version, wallet and chain_id are required: anything omitted is filled from the published platform defaults, stored as part of the document, and listed in defaulted.
Request body
version1(required)walletstring(required)chain_idinteger(required)floatobjectexecutionobjectgasobjectstablesobjectspendobjectalertsobjectprediction_marketsobjectrebalanceobject
Responses
200Unchanged — latest version already matches
walletstring(required)versioninteger(required)hashstring(required)created_atstring(required)unchangedbooleandocumentobject(required)defaultedstring[](required)
201New immutable version created
walletstring(required)versioninteger(required)hashstring(required)created_atstring(required)unchangedbooleandocumentobject(required)defaultedstring[](required)
400Document failed validation
Example
curl -X PUT https://api.cofferline.com/v1/policies \
-H "authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
-d '{"version":1,"wallet":"…","chain_id":0}'