requestChange
RequestChange sends a pending Approval back to the agent that asked, with the change the founder wants, and the Action keeps waiting.
curl -X POST https: //api.sb/ leaseline.app/ approvals/ approval_TlxQeWh9uX/ approve \
-H "Authorization: Bearer $SB_TOKEN"
API reference
Approval.approveIts NounsApprovalnpx startup-builder do Approval.approve --data '{"approval": "approval_TlxQeWh9uX"}'
CLI reference
Approval.approveIts NounsApproval{
"name": "do",
"arguments": {
"code": "return await $.Approval.approve({ approval: 'approval_TlxQeWh9uX' })"
}
}
MCP reference
Approval.approveIts NounsApprovalimport { $ } from 'startup-builder'
const approval = await $.Approval.approve({ approval: 'approval_TlxQeWh9uX' })
SDK reference
Approval.approveIts NounsApprovalcurl -X POST https: //api.sb/ leaseline.app/ approvals/ approval_TlxQeWh9uX/ approve \
-H "Authorization: Bearer $SB_TOKEN"
API reference
Approval.approveIts NounsApprovalnpx startup-builder do Approval.approve --data '{"approval": "approval_TlxQeWh9uX"}'
CLI reference
Approval.approveIts NounsApproval{
"name": "do",
"arguments": {
"code": "return await $.Approval.approve({ approval: 'approval_TlxQeWh9uX' })"
}
}
MCP reference
Approval.approveIts NounsApprovalimport { $ } from 'startup-builder'
const approval = await $.Approval.approve({ approval: 'approval_TlxQeWh9uX' })
SDK reference
Approval.approveIts NounsApprovalInputs
| Input | Type | Required | Description |
|---|---|---|---|
approval | Approval | required | The pending Approval. |
change | text | required | What to change before you decide, such as "a cheaper option". |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
approval | Approval | required | The Approval, still pending, with the change attached. |
Effects
| Fact | Value |
|---|---|
| Action class | None: no approval rule names it, so it runs within its seat's Permissions and Limits |
| Who calls it | A Human answers it: the owner of record, or a Human the owner named as approver. An Agent caller is refused with human-required, and the Worker that requested the Action with self-approval |
| Stakes | Who may act |
| Door | Two-way: it runs at once |
| Modes | try previews it and stores nothing; send returns a pending Action; do (default) waits for the result |
| Idempotent | Only with a key: a repeat with the same Idempotency-Key and input returns the first Action, the same key with other input is refused with 409, and a repeat without a key runs again |
| Undo | Action.undo reverses it |
| Emits | Approval.changeRequested |
- Keeps the held Action
pending; the agent answers with a new Approval for the changed Action and cancels this one.
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. |
| The Verb is a Human’s own act, answering an Approval or claiming the Startup, and the caller is an Agent | human-required | Send it to the owner of record, or to the Human the owner named as approver; an Agent prepares the work and waits. | None. |
| The caller is the Worker that requested the Action this Approval holds, and nobody answers their own request | self-approval | Leave it for the owner of record, or the Human the owner named as approver. | None. |
approval is missing, or is not a approval | invalid-input | Send approval as a approval, then call it again. | None. |
change is missing, or is not a text | invalid-input | Send change as a text, then call it again. | None. |
The Idempotency-Key was sent before with another operation or other input | idempotency-mismatch | Send a new key for new input; reuse a key only to retry the same request. | None. |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, no delay window |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval, which a Human answers: the owner of record, or a Human they named to approve for the Founder seat. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |
Example
You, to your agent
Request change the approval I named, approval_TlxQeWh9uX.
curl -X POST https: //api.sb/ leaseline.app/ approvals/ approval_TlxQeWh9uX/ requestChange \
-H "Authorization: Bearer $SB_TOKEN" \
-H "Content-Type: application/ json" \
-d '{"change": "Example change"}'
npx startup-builder do Approval.requestChange --data '{"approval": "approval_TlxQeWh9uX", "change": "Example change"}'
{
"name": "do",
"arguments": {
"code": "return await $.Approval.requestChange({ approval: 'approval_TlxQeWh9uX', change: 'Example change' })"
}
}
import { $ } from 'startup-builder'
const approval = await $.Approval.requestChange({ approval: 'approval_TlxQeWh9uX', change: 'Example change' })
To retry, send the same Idempotency-Key: the retry returns the first Action and runs nothing twice. A new key runs the call again.