deals

Create a deal and get one invite token per party

post/v1/deals

Request

  • Base URL: https://api.redeal.dev
  • URL: https://api.redeal.dev/v1/deals
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Stripe-style idempotency: replays the stored response for a repeated key + identical body; 409 on key reuse with a different body

Request body

algorithm'split.v1' | 'auction.v1' | 'random.v1' | 'shapley.v1' required
mode'sealed' | 'open'
retention'standard' | 'purge'
terms_hashstring

optional, sha256:<64 hex> — hash of the deal's terms; echoed into the certificate

external_refstring

optional — your own identifier; echoed into the certificate

supersedesstring

optional cert id (c_<16 hex>) this deal's certificate replaces

visibility'public' | 'parties'

who may fetch the certificate: public (default — anyone at GET /v1/certificates/{cert_id}) or parties (initiator key / invite tokens only; recorded in the certificate)

commit_deadlineinteger required

unix seconds UTC

reveal_deadlineinteger required

unix seconds UTC

algorithm_paramsobject

per-algorithm params; see GET /v1/algorithms. Bounds (part of the versioned contract): split.v1 items ≤ 1024 (strings or {"id","indivisible"} objects; indivisible rejected) and each party's valuations sum to exactly 1000 points; shapley.v1 coalition values 0..2^62-1, ≤ 8 parties, labels without commas; random.v1 ≤ 10,000 parties, nonce ≤ 1024 bytes hex; auction.v1 ≤ 1024 bidders, bids 0..2^62-1, params item+unit+reserve mandatory, price_cap optional (≥ reserve)

Response

Deal created. Invite tokens are shown ONCE and stored hashed.

deal_idstring required
statestring required
warningstring

Example response

{
  "deal_id": "d_9f2c...",
  "state": "OPEN"
}

Changes

No recorded changes to this operation across all 1 revision of this API.