Redeal Deals API
The Deals API from Redeal — 8 operation(s) for deals.
Operations 8
POST
/v1/deals/{id}/validate-input
Dry-run the algorithm's input contract before committing (read-only)
#
The Deals API from Redeal — 8 operation(s) for deals.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/redeal-dev:redeal-dev-deals-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Redeal Deals API
version: 0.7.0
description: 'Neutral fairness computation for agents. Parties commit to sealed inputs, Redeal runs a published deterministic algorithm, and issues a signed, transparency-logged certificate anyone can verify.
Quickstart: POST /v1/keys -> POST /v1/deals -> each party POSTs commit then reveal with their invite token -> GET /v1/deals/{id}/certificate -> anyone GETs /v1/verify/{cert_id}.
Agents: prefer the MCP server at /mcp (Streamable HTTP). See /llms.txt.'
license:
name: Apache-2.0
servers:
- url: https://api.redeal.dev
description: production (planned)
- url: http://localhost:8080
description: local dev
tags:
- name: Deals
paths:
/v1/deals/{id}/recompute:
post:
summary: Re-run the engine against retained inputs
description: Answers {matches_certificate}. Never exposes inputs. Parties-only deals require the initiator key or an invite token. 410 for purge-class deals after input destruction.
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: recompute result
'410':
description: inputs destroyed on schedule
tags:
- Deals
operationId: postV1DealsByIdRecompute
x-operation-id-source: derived
/v1/deals:
post:
tags:
- Deals
summary: Create a deal and get one invite token per party
operationId: createDeal
security:
- bearerAuth: []
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
algorithm:
type: string
enum:
- split.v1
- auction.v1
- random.v1
- shapley.v1
mode:
type: string
enum:
- sealed
- open
default: sealed
retention:
type: string
enum:
- standard
- purge
default: standard
parties:
type: array
minItems: 2
items:
oneOf:
- type: string
- type: object
required:
- label
properties:
label:
type: string
weight:
type: integer
minimum: 1
description: optional; default 1 (explicit 1 is normalized to omitted)
statement_hash:
type: string
description: sha256:<64 lowercase hex>
description: 'Party labels (strings) or objects. Labels go on the public certificate permanently: use nicknames, never real names or emails'
terms_hash:
type: string
description: optional, sha256:<64 hex> — hash of the deal's terms; echoed into the certificate
external_ref:
type: string
maxLength: 256
description: optional — your own identifier; echoed into the certificate
supersedes:
type: string
description: optional cert id (c_<16 hex>) this deal's certificate replaces
visibility:
type: string
enum:
- public
- parties
default: public
description: '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_deadline:
type: integer
description: unix seconds UTC
reveal_deadline:
type: integer
description: unix seconds UTC
algorithm_params:
type: object
description: '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)'
required:
- algorithm
- parties
- commit_deadline
- reveal_deadline
responses:
'201':
description: Deal created. Invite tokens are shown ONCE and stored hashed.
content:
application/json:
schema:
type: object
properties:
deal_id:
type: string
example: d_9f2c...
state:
type: string
example: OPEN
invite_tokens:
type: array
items:
type: object
properties:
party:
type: integer
label:
type: string
token:
type: string
warning:
type: string
required:
- deal_id
- state
- invite_tokens
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'409':
$ref: '#/components/responses/Error'
/v1/deals/{id}:
get:
tags:
- Deals
summary: Deal view (never includes revealed inputs)
operationId: getDeal
security:
- bearerAuth: []
description: Authenticate with the initiator API key or any party invite token.
parameters:
- $ref: '#/components/parameters/DealId'
responses:
'200':
description: Deal view
content:
application/json:
schema:
$ref: '#/components/schemas/DealView'
'401':
$ref: '#/components/responses/Error'
'403':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
/v1/deals/{id}/commit:
post:
tags:
- Deals
summary: Commit a sealed input (party invite-token auth)
operationId: commitInput
security:
- bearerAuth: []
parameters:
- $ref: '#/components/parameters/DealId'
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
commitment:
type: string
description: sha256:<hex of sha256(JCS(party_input) ++ salt_bytes)>
required:
- commitment
responses:
'200':
description: Commitment recorded
content:
application/json:
schema:
type: object
properties:
deal_id:
type: string
state:
type: string
party:
type: integer
committed:
type: boolean
next:
type: string
description: instructive next step
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'403':
$ref: '#/components/responses/Error'
'409':
$ref: '#/components/responses/Error'
/v1/deals/{id}/validate-input:
post:
tags:
- Deals
summary: Dry-run the algorithm's input contract before committing (read-only)
description: Validates a party input against the deal's algorithm and declared algorithm_params, returning the same instructive errors a reveal would produce (e.g. VALUATION_TOTAL for split.v1). A commitment binds the exact input bytes, so a contract-violating input committed in error can never be corrected and guarantees a VOID — validate before committing. No state change; nothing is stored.
operationId: validateInput
security:
- bearerAuth: []
parameters:
- $ref: '#/components/parameters/DealId'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
input:
type: object
description: the party_input you plan to commit, within the contract served at GET /v1/algorithms
required:
- input
responses:
'200':
description: Input passes the contract
content:
application/json:
schema:
type: object
properties:
deal_id:
type: string
algorithm:
type: string
valid:
type: boolean
next:
type: string
description: instructive next step
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'403':
$ref: '#/components/responses/Error'
/v1/deals/{id}/reveal:
post:
tags:
- Deals
summary: Reveal an input against a prior commitment
operationId: revealInput
security:
- bearerAuth: []
parameters:
- $ref: '#/components/parameters/DealId'
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
input:
type: object
description: the party_input for the deal's algorithm, within the bounds served at GET /v1/algorithms (out-of-bounds input is rejected, never clamped)
salt:
type: string
description: the salt used in the commitment (default empty)
required:
- input
responses:
'200':
description: Reveal accepted. When all parties reveal, the algorithm runs and the certificate is issued automatically.
content:
application/json:
schema:
type: object
properties:
deal_id:
type: string
state:
type: string
party:
type: integer
revealed:
type: boolean
result:
type:
- object
- 'null'
description: populated once the deal COMPUTED
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'403':
$ref: '#/components/responses/Error'
'409':
$ref: '#/components/responses/Error'
/v1/deals/{id}/entropy:
post:
tags:
- Deals
summary: Pin the drand beacon value (random.v1 only)
description: 'Once all reveals are in, the server fetches the deal''s pre-declared drand round from the public League of Entropy beacon (quicknet), pins the value, computes the draw, and issues the certificate. Callers never supply the value, so nobody can choose entropy. Idempotent: repeat calls after COMPUTED report the result.'
operationId: provideEntropy
security:
- bearerAuth: []
parameters:
- $ref: '#/components/parameters/DealId'
responses:
'200':
description: Beacon value pinned; deal COMPUTED with result, or already-computed report.
content:
application/json:
schema:
type: object
properties:
deal_id:
type: string
state:
type: string
result:
type:
- object
- 'null'
certificate_id:
type:
- string
- 'null'
'400':
$ref: '#/components/responses/Error'
'401':
$ref: '#/components/responses/Error'
'403':
$ref: '#/components/responses/Error'
'409':
$ref: '#/components/responses/Error'
'502':
$ref: '#/components/responses/Error'
/v1/deals/{id}/cancel:
post:
tags:
- Deals
summary: Cancel a deal (initiator only, before counterparties commit)
operationId: cancelDeal
security:
- bearerAuth: []
parameters:
- $ref: '#/components/parameters/DealId'
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: false
content:
application/json:
schema:
type: object
responses:
'200':
description: Deal cancelled
content:
application/json:
schema:
type: object
properties:
deal_id:
type: string
state:
type: string
example: CANCELLED
'401':
$ref: '#/components/responses/Error'
'403':
$ref: '#/components/responses/Error'
'409':
$ref: '#/components/responses/Error'
components:
schemas:
DealView:
type: object
description: The deal view. NEVER contains revealed inputs.
properties:
deal_id:
type: string
algorithm:
type: string
algorithm_params:
type: object
mode:
type: string
enum:
- sealed
- open
retention:
type: string
enum:
- standard
- purge
state:
type: string
enum:
- OPEN
- COMMITTING
- REVEALING
- COMPUTED
- CERTIFIED
- VOID
- EXPIRED
- CANCELLED
initiator:
type: integer
parties:
type: array
items:
type: object
properties:
index:
type: integer
label:
type: string
committed:
type: boolean
commitment:
type:
- string
- 'null'
revealed:
type: boolean
commit_deadline:
type: integer
reveal_deadline:
type: integer
created_at:
type: integer
commits_closed_at:
type:
- integer
- 'null'
reveals_closed_at:
type:
- integer
- 'null'
computed_at:
type:
- integer
- 'null'
result:
type:
- object
- 'null'
void_flakers:
type:
- array
- 'null'
items:
type: integer
certificate_id:
type:
- string
- 'null'
parameters:
IdempotencyKey:
name: Idempotency-Key
in: header
required: false
schema:
type: string
description: 'Stripe-style idempotency: replays the stored response for a repeated key + identical body; 409 on key reuse with a different body'
DealId:
name: id
in: path
required: true
schema:
type: string
example: d_9f2c...
responses:
Error:
description: 'Error. The message is instructive: it names the code and the fix.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: 'AUTH_REQUIRED: pass ''Authorization: Bearer <api_key>''; get a key via POST /v1/keys'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: API key (fp_...) for initiator actions; invite token for party actions