Create milestone group
Creates 2-20 ordinary escrows that are paid, released or refunded independently and read as one group — the way to pay a project in stages.
https://testnet.universal-escrow.xyz/v1/escrow-groups
Each item of members is exactly a POST /v1/escrows body, with the same rules and defaults; array order is the milestone order. Atomic: every member is created or none is. Each member gets its own platform fee, computed from its own amount and rounded down. An invalid member is 422 validation_failed naming the field as members.<index>.<field> (zero-based); an externalReference already used in the organization (the group's or a member's) is 409 and nothing is created. Supports Idempotency-Key for the whole request (optional; 8-255 characters when sent): the same key with the same body returns the same group; the same key with a different body is a conflict; without a key, a retried request creates a second group. When every member has reached a final state (RELEASED, REFUNDED, RESOLVED, CANCELLED or EXPIRED) one escrow.group.completed webhook is sent. Partial release, partial refund and split dispute outcomes are not supported by the deployed contract (BL-02) — a group of separate escrows is the supported way to pay in parts.
Authorizations
AuthorizationstringheaderrequiredBearer authentication with your secret API key: Bearer esc_test_<prefix>_<secret>. The key needs the escrows:write scope.
Headers
Idempotency-KeystringOptional, 8–255 characters. The same key with the same body replays the original response instead of acting twice; with a different body it is a conflict.
Body
application/jsonexternalReferencestringYour reference for the whole project (e.g. a job id), unique per organization.
descriptionstringWhat the project is. Plain text, for your own reads; buyers see each member's own description.
metadataobjectArbitrary metadata as string keys and values, with the same limits as an escrow's. Echoed on reads and in escrow.group.completed.
membersCreateEscrow[]requiredThe milestones, in order: 2-20 members, each exactly a POST /v1/escrows body with the same rules and defaults. Each member gets its own fee, computed from its own amount.
Response
201 · EscrowGroup · application/jsonThe group with every member, each in status CREATED.
idstringrequiredPublic group id.
organizationIdstringrequiredOwning organization.
environmentstringrequiredEnvironment of the key that created it. One of test, live.
externalReferencestring | nullrequiredYour reference for the project, exactly as sent.
descriptionstring | nullrequiredThe project description, exactly as sent.
metadataobjectrequiredYour own key/value pairs, exactly as sent.
progressEscrowGroupProgressrequiredcompletedAtstring | nullrequiredWhen escrow.group.completed was emitted, or null. Not retracted if a member is later reconciled after a reorg — read progress for the current state.
createdAtstringrequiredRFC 3339.
membersEscrow[]requiredEvery member, in milestone order, each a full escrow.