Deploy
Deploy the multi-release escrow contract and define its milestone payouts.
Builds the unsigned transaction that deploys a new multi-release v2 escrow through the Trustless Work factory. Each milestone carries its own amount and settles independently. You sign with the signer wallet and submit via Send Transaction — the API never holds keys.
Authentication
Send your API key on every call: x-api-key: <id>.<secret> (or a wallet-session Authorization: Bearer <jwt>). Body is JSON (Content-Type: application/json).
Endpoint
Returns the XDR that you sign with the signer wallet. Differs from multi-release v1 in that roles are pluralised arrays + admin + observers, each milestone carries its own amount/dispute/released, and the factory first arg is signer (V1 used deployer).
Wallet that will sign the deploy transaction.
GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVNStable identifier the platform uses to correlate the escrow.
ENG-67890Short human-readable title for the escrow.
Multi-phase product launch — Q3 2026Long-form description.
Multi-release v2 escrow with three independently releasable milestones.Platform fee in percent (1 = 1%). Scaled to basis points on-chain.
1Optional receiver memo (u32 on-chain).
0Unsigned XDR built successfully.
Base64-encoded unsigned XDR. Sign it with the appropriate wallet and submit to Soroban / Horizon to execute the operation on-chain.
AAAAAgAAAAAtWsgedQ...AAAAAQAAAAA=SHA-256 hash of the prepared transaction. NOTE: it only matches the executed transaction if you sign the XDR exactly as returned — re-preparing (re-simulating) it changes the hash. Prefer contractId for correlation when present.
b1946ac92492d2347c6235b4d2611184a8d53f7a8e6e9b4f0c79a2b30e5c4f3aDeploys only: the address (C…) the new escrow contract WILL have once this transaction executes — known upfront because the service generates the deploy salt. Track your escrow with it (e.g. GET /escrows/:contractId) as soon as the transaction lands; it is stable even if your wallet/SDK re-prepares the transaction.
CAAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQC526Request body or query params fail schema validation (wrong type, missing required field, unknown property).
Missing, malformed, expired, revoked or invalid API key.
API key is valid but does not have the role required for this operation.
Payload is well-formed but a business rule rejects it (e.g. amount out of range, role not allowed for this user).
Unexpected server-side failure. Use the traceId to look up the incident in server logs or contact support.
POST /escrow/multi-release/v2/deploy HTTP/1.1
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1096
{
"signer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"engagementId": "ENG-67890",
"title": "Multi-phase product launch — Q3 2026",
"description": "Multi-release v2 escrow with three independently releasable milestones.",
"roles": {
"approvers": [
"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
],
"serviceProviders": [
"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
],
"platform": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"releaseSigners": [
"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
],
"disputeResolvers": [
"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
],
"admin": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"observers": []
},
"platformFee": 1,
"milestones": [
{
"description": "Phase 1 — UI design delivery",
"amount": 250,
"receiver": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"status": "pending",
"approvalsTarget": 1
}
],
"trustline": {
"contractId": "CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA",
"symbol": "USDC",
"address": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
},
"receiverMemo": 0
}{
"unsignedXdr": "AAAAAgAAAAAtWsgedQ...AAAAAQAAAAA=",
"txHash": "b1946ac92492d2347c6235b4d2611184a8d53f7a8e6e9b4f0c79a2b30e5c4f3a",
"contractId": "CAAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQC526"
}Field notes
Cross-field rules the schema alone cannot express:
Every milestone has its own
amount(> 0, human token units). The escrow total is the sum of milestone amounts.roles.adminmust be distinct from every other role. It later signsupdate-escrow,manage-milestonesandextend-ttl.Each milestone's
approvalsTargetmust be ≤ the number ofroles.approvers.trustlineaccepts either the token'scontractId(C…) or the classicsymbol+addresspair.platformFeeis a percent (1= 1%).
What this endpoint returns
unsignedXdr— sign it exactly as returned; re-preparing it changes the transaction hash.txHash— hash of the prepared transaction.contractId— the address (C…) the escrow will have once the transaction lands. Known upfront and stable — use it to track the escrow:GET /escrows/{contractId}.
Usage example
Same build → sign → submit flow as single-release — see the worked example on the Single Release Deploy page and swap the path for /escrow/multi-release/v2/deploy.
Next steps
Lock the funds: Fund Escrow
Read it back:
GET /escrows/{contractId}
Last updated