Skip to content

requestChange

RequestChange sends a pending Approval back to the agent that asked, with the change the founder wants, and the Action keeps waiting.

Approval.approveMode do
curl -X POST https://api.sb/leaseline.app/approvals/approval_TlxQeWh9uX/approve \
  -H "Authorization: Bearer $SB_TOKEN"
API referenceApproval.approveIts NounsApproval
npx startup-builder do Approval.approve --data '{"approval":"approval_TlxQeWh9uX"}'
CLI referenceApproval.approveIts NounsApproval
{
  "name": "do",
  "arguments": {
    "code": "return await $.Approval.approve({ approval: 'approval_TlxQeWh9uX' })"
  }
}
MCP referenceApproval.approveIts NounsApproval
import { $ } from 'startup-builder'

const approval = await $.Approval.approve({ approval: 'approval_TlxQeWh9uX' })
SDK referenceApproval.approveIts NounsApproval
Approval.approveMode do
curl -X POST https://api.sb/leaseline.app/approvals/approval_TlxQeWh9uX/approve \
  -H "Authorization: Bearer $SB_TOKEN"
API referenceApproval.approveIts NounsApproval
npx startup-builder do Approval.approve --data '{"approval":"approval_TlxQeWh9uX"}'
CLI referenceApproval.approveIts NounsApproval
{
  "name": "do",
  "arguments": {
    "code": "return await $.Approval.approve({ approval: 'approval_TlxQeWh9uX' })"
  }
}
MCP referenceApproval.approveIts NounsApproval
import { $ } from 'startup-builder'

const approval = await $.Approval.approve({ approval: 'approval_TlxQeWh9uX' })
SDK referenceApproval.approveIts NounsApproval

Inputs

InputTypeRequiredDescription
approvalApprovalrequiredThe pending Approval.
changetextrequiredWhat to change before you decide, such as "a cheaper option".

Outputs

OutputTypeRequiredDescription
approvalApprovalrequiredThe Approval, still pending, with the change attached.

Effects

FactValue
Action classNone: no approval rule names it, so it runs within its seat's Permissions and Limits
Who calls itA 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
StakesWho may act
DoorTwo-way: it runs at once
Modestry previews it and stores nothing; send returns a pending Action; do (default) waits for the result
IdempotentOnly 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
UndoAction.undo reverses it
EmitsApproval.changeRequested
  • Keeps the held Action pending; the agent answers with a new Approval for the changed Action and cancels this one.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operationforbiddenUse 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 Agenthuman-requiredSend 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 requestself-approvalLeave it for the owner of record, or the Human the owner named as approver.None.
approval is missing, or is not a approvalinvalid-inputSend approval as a approval, then call it again.None.
change is missing, or is not a textinvalid-inputSend change as a text, then call it again.None.
The Idempotency-Key was sent before with another operation or other inputidempotency-mismatchSend a new key for new input; reuse a key only to retry the same request.None.

When it waits

GateDefault
Decision classLow: two-way, no delay window
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt 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

Approval.requestChangeMode do
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.