Agreement routes: update
The Agreement Verbs update as api.sb routes, with inputs, result, refusals and an example.
Reference for Agreement, one group of Agreement routes.
Agreement.update
Changes the given properties of an Agreement. Verb page.
PATCH /{namespace}/ agreements/ {id}Path: id. Body, as JSON: the other inputs. Emits Agreement.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Agreement. |
term | text | How long it runs and how it ends. | |
signedAt | datetime | When the last Party signed. | |
terminatedAt | datetime | When it ended under its term; it stays on record. | |
payoutSchedule | string | For a Supplier’s Agreement: how often the released earned balance pays out. | |
clearanceDays | integer | For a Supplier’s Agreement: days an Order’s earnings wait after confirmation before they can pay out. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
agreement | Agreement | required | The Agreement. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X PATCH https: //api.sb/ leaseline.app/ agreements/ agreement_zHIUnX8LwY \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"signedAt": "2026-10-22T12: 00: 00Z"}'{
"api": "https: //api.sb/ leaseline.app",
"agreement": {
"$id": "https: //api.sb/ leaseline.app/ agreements/ agreement_zHIUnX8LwY",
"$type": "Agreement",
"status": "draft",
"signedAt": "2026-10-22T12: 00: 00Z"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Agreement.update",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}