UniversalEscrow
DocumentationAPI reference
Milestone groups

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.

POST

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

Authorizationstringheaderrequired

Bearer authentication with your secret API key: Bearer esc_test_<prefix>_<secret>. The key needs the escrows:write scope.

How authentication works

Headers

Idempotency-Keystring

Optional, 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/json
externalReferencestring

Your reference for the whole project (e.g. a job id), unique per organization.

descriptionstring

What the project is. Plain text, for your own reads; buyers see each member's own description.

metadataobject

Arbitrary metadata as string keys and values, with the same limits as an escrow's. Echoed on reads and in escrow.group.completed.

membersCreateEscrow[]required

The 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/json

The group with every member, each in status CREATED.

idstringrequired

Public group id.

organizationIdstringrequired

Owning organization.

environmentstringrequired

Environment of the key that created it. One of test, live.

externalReferencestring | nullrequired

Your reference for the project, exactly as sent.

descriptionstring | nullrequired

The project description, exactly as sent.

metadataobjectrequired

Your own key/value pairs, exactly as sent.

progressEscrowGroupProgressrequired
completedAtstring | nullrequired

When escrow.group.completed was emitted, or null. Not retracted if a member is later reconciled after a reorg — read progress for the current state.

createdAtstringrequired

RFC 3339.

membersEscrow[]required

Every member, in milestone order, each a full escrow.