Approvals API
Payments held for a person, and the two-step approve and reject calls.
Base URL https://api.ndstill.com/v2. Send Authorization: Bearer with a key, Ndstill-Version: 2026-11-01, and an Idempotency-Key on every POST. Conventions, scopes and errors are in the API overview and Errors and decline reasons. Examples come from the mock backend; the shapes are the TypeScript types in packages/api.
List approvals#
/v2/approvals- statusstring enum
"pending""rejected""expired""approved" - team_idId
- agent_idId
- counterparty_idId
- routestring
- amount_gtenumber
- amount_usd_gtenumber
Amount range in USD cents across assets (USDC counts at par).
- amount_usd_ltenumber
- older_than_minutesnumber
Only approvals waiting at least this long.
- cursorstring
- limitnumber
1–200, default 50.
- qstring
Free-text search over names, ids and descriptors.
- sortstring
Sort field, prefix "-" for descending ("-created_at" is the default).
- created_gteTimestamp
created_at >= (ISO).
- created_lteTimestamp
created_at <= (ISO).
Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:
- idId
- object"approval"
- org_idId
- created_atTimestamp
- updated_atTimestampoptional
- test_modebooleanoptional
True for test-mode objects (simulations, sandbox).
- decision_idId
- intent_idId
- agentRef
Small reference used for denormalized names in lists (no N+1 lookups in tables).
Ref: 2 fields
- idId
- namestring
- counterpartyobject
2 fields
- idId
- namestring
- amountMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- railRail
"card""network_token""checkout_token""stablecoin""bank""ai""cloud" - funding_sourceRef
Small reference used for denormalized names in lists (no N+1 lookups in tables).
Ref: 2 fields
- idId
- namestring
- teamRef | null
Small reference used for denormalized names in lists (no N+1 lookups in tables).
Ref: 2 fields
- idId
- namestring
- reason_heldstring
Why it is held, plain language (first reason); full list in `reasons`.
- reasonsReason[]
Reason: 5 fields
- codestring
- stagestring enumoptional
Pipeline stage that produced it (absent for post-decision reasons).
"freeze""approval""policy""mandate""authenticate""entitlement""funding""counterparty""risk""budget""record" - effectstring enumoptional
"hold" or "decline" (what this reason did on its own).
"hold""decline" - messagestringoptional
Server-written sentence; used when the client has no template for the code.
- paramsReasonParamsoptional
ReasonParams: 15 fields
- agent_namestringoptional
- scope_namestringoptional
Whose budget: "Travel desk", "Engineering team", "the org".
- windowstring enumoptional
"day""week""month""quarter""total" - amountMoneyoptional
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- limitMoneyoptional
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- over_byMoneyoptional
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- thresholdMoneyoptional
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- counterpartystringoptional
- categorystringoptional
- mandate_counterpartystringoptional
- mandate_maxMoneyoptional
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- countnumberoptional
- minutesnumberoptional
- by_personstringoptional
- notestringoptional
- routeobject
7 fields
- namestring
- approver_user_idsstring[]
- approversRef[]
Ref: 2 fields
- idId
- namestring
- teamRef | null
Small reference used for denormalized names in lists (no N+1 lookups in tables).
Ref: 2 fields
- idId
- namestring
- channelsarray of string enum
"whatsapp""slack""console""push""email""teams" - timeout_minutesnumber
- on_timeoutstring enum
"reject""escalate"
- required_assuranceAssurance
"passkey""any""dual" - statusstring enum
"pending""rejected""expired""approved" - decided_byobject[]
5 fields
- userRef
Small reference used for denormalized names in lists (no N+1 lookups in tables).
Ref: 2 fields
- idId
- namestring
- decisionstring enum
"approve""reject" - atTimestamp
- assurancestring enum
"passkey""whatsapp""slack""console""email" - notestringoptional
- signaturesobject[]
5 fields
- kidstring
- alg"ES256"
- signerRef
Small reference used for denormalized names in lists (no N+1 lookups in tables).
Ref: 2 fields
- idId
- namestring
- signed_hashstring
- atTimestamp
- expires_atTimestamp
- decided_atTimestamp | null
- bulk_eligibleboolean
Bulk approve is only allowed for same-counterparty low amounts when policy allows it.
- 400invalid_request
A query parameter is invalid.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X GET "https://api.ndstill.com/v2/approvals?limit=2" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"object": "list",
"data": [
{
"id": "apr_01M82QT3HYAYSVA6YRYFQASMH5",
"object": "approval",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-22T23:00:11.454Z",
"decision_id": "dec_01M82QT3H059V6ZSQSTH4QPDJP",
"intent_id": "pi_01M82QT3FE0762T6H2HZ4R09MM",
"agent": {
"id": "agt_01KV02CEME1GNDVJ717S9GRP4C",
"name": "Ground transport"
},
"counterparty": {
"id": "cpy_01JZVEZAME5HGWVEX5W4QZ1N8M",
"name": "Uber"
},
"amount": {
"amount": 4512,
"asset": "USD"
},
"rail": "card",
"funding_source": {
"id": "fs_01KHHYDEME7D9A5AA3XYHBJD5E",
"name": "Agent spend (ndStill account)"
},
"team": {
"id": "team_01K98QFDMEY82YFGH9FZ0NDM5Y",
"name": "Travel"
},
"reason_held": "Policy requires a person to approve this payment.",
"reasons": [
{
"code": "approval_required_policy",
"stage": "approval",
"effect": "hold"
}
],
"route": {
"name": "Travel approvers",
"approver_user_ids": [
"usr_01KA2FEKMEXA9J1D00GSGZA54W"
],
"approvers": [
{
"id": "usr_01KA2FEKMEXA9J1D00GSGZA54W",
"name": "Sam Ortiz"
}
],
"team": {
"id": "team_01K98QFDMEY82YFGH9FZ0NDM5Y",
"name": "Travel"
},
"channels": [
"console",
"push",
"slack"
],
"timeout_minutes": 240,
"on_timeout": "escalate"
},
"required_assurance": "any",
"status": "pending",
"decided_by": [],
"signatures": [],
"expires_at": "2026-11-23T09:45:11.374Z",
"decided_at": null,
"bulk_eligible": true
},
{
"id": "apr_01M826YJMK9XMF32Z0BV8CW6KS",
"object": "approval",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-22T18:05:32.179Z",
"decision_id": "dec_01M826YJKNYQ1TQZ29PESDNBHA",
"intent_id": "pi_01M826YJJ3HE29RY4KJ0P53Z6S",
"agent": {
"id": "agt_01KW0P2WME52Y6RB8NQX9XBJ35",
"name": "Ad buyer"
},
"counterparty": {
"id": "cpy_01JZVEZAMECTNY0THXT1FNJJ6H",
"name": "Google Ads"
},
"amount": {
"amount": 70100,
"asset": "USD"
},
"rail": "card",
"funding_source": {
"id": "fs_01KQ667RMECZZYAME5T23SR7EN",
"name": "Ramp"
},
"team": {
"id": "team_01K9K129ME4AYMHG1X82H1CXCD",
"name": "Growth"
},
"reason_held": "14 payments in 10 minutes is faster than usual for Ad buyer.",
"reasons": [
{
"code": "velocity",
"stage": "risk",
"effect": "hold",
"params": {
"count": 14,
"minutes": 10,
"agent_name": "Ad buyer"
}
}
],
"route": {
"name": "Growth approvers",
"approver_user_ids": [
"usr_01KB6H0NMEJW981TCPQXMYEASB",
"usr_01K9R5VQME4Q4FSCTVNGTV56C2"
],
"approvers": [
{
"id": "usr_01KB6H0NMEJW981TCPQXMYEASB",
"name": "Jordan Kim"
},
{
"id": "usr_01K9R5VQME4Q4FSCTVNGTV56C2",
"name": "Priya Raman"
}
],
"team": {
"id": "team_01K9K129ME4AYMHG1X82H1CXCD",
"name": "Growth"
},
"channels": [
"console",
"push",
"slack"
],
"timeout_minutes": 240,
"on_timeout": "escalate"
},
"required_assurance": "passkey",
"status": "pending",
"decided_by": [],
"signatures": [],
"expires_at": "2026-11-23T21:56:11.374Z",
"decided_at": null,
"bulk_eligible": false
}
],
"has_more": true,
"next_cursor": "Mg==",
"total": 129
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Retrieve an approval#
/v2/approvals/{id}- idIdrequired
A prefixed ID from this org.
The same Approval object as List approvals.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 404not_found
No object with that id in this org.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X GET "https://api.ndstill.com/v2/approvals/apr_01M82QT3HYAYSVA6YRYFQASMH5" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"id": "apr_01M82QT3HYAYSVA6YRYFQASMH5",
"object": "approval",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-22T23:00:11.454Z",
"decision_id": "dec_01M82QT3H059V6ZSQSTH4QPDJP",
"intent_id": "pi_01M82QT3FE0762T6H2HZ4R09MM",
"agent": {
"id": "agt_01KV02CEME1GNDVJ717S9GRP4C",
"name": "Ground transport"
},
"counterparty": {
"id": "cpy_01JZVEZAME5HGWVEX5W4QZ1N8M",
"name": "Uber"
},
"amount": {
"amount": 4512,
"asset": "USD"
},
"rail": "card",
"funding_source": {
"id": "fs_01KHHYDEME7D9A5AA3XYHBJD5E",
"name": "Agent spend (ndStill account)"
},
"team": {
"id": "team_01K98QFDMEY82YFGH9FZ0NDM5Y",
"name": "Travel"
},
"reason_held": "Policy requires a person to approve this payment.",
"reasons": [
{
"code": "approval_required_policy",
"stage": "approval",
"effect": "hold"
}
],
"route": {
"name": "Travel approvers",
"approver_user_ids": [
"usr_01KA2FEKMEXA9J1D00GSGZA54W"
],
"approvers": [
{
"id": "usr_01KA2FEKMEXA9J1D00GSGZA54W",
"name": "Sam Ortiz"
}
],
"team": {
"id": "team_01K98QFDMEY82YFGH9FZ0NDM5Y",
"name": "Travel"
},
"channels": [
"console",
"push",
"slack"
],
"timeout_minutes": 240,
"on_timeout": "escalate"
},
"required_assurance": "any",
"status": "pending",
"decided_by": [],
"signatures": [],
"expires_at": "2026-11-23T09:45:11.374Z",
"decided_at": null,
"bulk_eligible": true
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Approve an approval#
/v2/approvals/{id}/approveApprove a held payment. The pipeline runs again first: approval never skips a freeze, a budget or a changed policy. Policies can require a passkey assertion.
- idIdrequired
A prefixed ID from this org.
- passkey_assertionstring
WebAuthn assertion over the decision hash when assurance requires it (demo: any string).
- notestring
The same Approval object as List approvals.
- 400invalid_request
A field is missing or invalid; fields names each one.
- 400step_up_required
A person must confirm with a passkey first, when the org requires it.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 404not_found
No object with that id in this org.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/approvals/apr_01M82XPRQZK3A5VJ11YJGQM8FP/approve" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"passkey_assertion": "passkey_assertion_from_webauthn"
}'{
"id": "apr_01M82XPRQZK3A5VJ11YJGQM8FP",
"object": "approval",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-23T00:43:13.535Z",
"decision_id": "dec_01M82XPRQ16YEJ7MHD6VHE179E",
"intent_id": "pi_01M82XPRNF89TFZB3MJVVT4NCF",
"agent": {
"id": "agt_01KYW6M8REDTGCTQ2ZK0CMDADJ",
"name": "Cloud cost guard"
},
"counterparty": {
"id": "cpy_01JZVEZAMED5J5FK7SGCRECEET",
"name": "Delta Air Lines"
},
"amount": {
"amount": 4200,
"asset": "USD"
},
"rail": "network_token",
"funding_source": {
"id": "fs_01KFYEF2ME7CHTSE5WKHECPTR7",
"name": "Operating (ndStill account)"
},
"team": {
"id": "team_01K8HHWYMEW49G6SJBNWRTEJCX",
"name": "Platform"
},
"reason_held": "This would use the last of Cloud cost guard's monthly budget.",
"reasons": [
{
"code": "budget_nearly_exhausted",
"stage": "budget",
"effect": "hold",
"params": {
"scope_name": "Cloud cost guard",
"window": "month"
}
}
],
"route": {
"name": "Platform approvers",
"approver_user_ids": [
"usr_01KB6H0NMEJW981TCPQXMYEASB"
],
"approvers": [
{
"id": "usr_01KB6H0NMEJW981TCPQXMYEASB",
"name": "Jordan Kim"
}
],
"team": {
"id": "team_01K8HHWYMEW49G6SJBNWRTEJCX",
"name": "Platform"
},
"channels": [
"console",
"push",
"slack"
],
"timeout_minutes": 240,
"on_timeout": "escalate"
},
"required_assurance": "any",
"status": "approved",
"decided_by": [
{
"user": {
"id": "usr_01K7WYQ6MEYNYVHTQCVYZCTCDX",
"name": "Dana Whitfield"
},
"decision": "approve",
"at": "2026-11-23T00:43:13.499Z",
"assurance": "console"
}
],
"signatures": [],
"expires_at": "2026-11-23T12:23:13.455Z",
"decided_at": "2026-11-23T00:43:13.499Z",
"bulk_eligible": true
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Reject an approval#
/v2/approvals/{id}/rejectReject a held payment with a reason the agent receives.
- idIdrequired
A prefixed ID from this org.
- reasonstringrequired
The same Approval object as List approvals.
- 400invalid_request
A field is missing or invalid; fields names each one.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 404not_found
No object with that id in this org.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/approvals/apr_01M82QT3HYAYSVA6YRYFQASMH5/reject" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"reason": "Not this vendor"
}'{
"id": "apr_01M82QT3HYAYSVA6YRYFQASMH5",
"object": "approval",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-22T23:00:11.454Z",
"decision_id": "dec_01M82QT3H059V6ZSQSTH4QPDJP",
"intent_id": "pi_01M82QT3FE0762T6H2HZ4R09MM",
"agent": {
"id": "agt_01KV02CEME1GNDVJ717S9GRP4C",
"name": "Ground transport"
},
"counterparty": {
"id": "cpy_01JZVEZAME5HGWVEX5W4QZ1N8M",
"name": "Uber"
},
"amount": {
"amount": 4512,
"asset": "USD"
},
"rail": "card",
"funding_source": {
"id": "fs_01KHHYDEME7D9A5AA3XYHBJD5E",
"name": "Agent spend (ndStill account)"
},
"team": {
"id": "team_01K98QFDMEY82YFGH9FZ0NDM5Y",
"name": "Travel"
},
"reason_held": "Policy requires a person to approve this payment.",
"reasons": [
{
"code": "approval_required_policy",
"stage": "approval",
"effect": "hold"
}
],
"route": {
"name": "Travel approvers",
"approver_user_ids": [
"usr_01KA2FEKMEXA9J1D00GSGZA54W"
],
"approvers": [
{
"id": "usr_01KA2FEKMEXA9J1D00GSGZA54W",
"name": "Sam Ortiz"
}
],
"team": {
"id": "team_01K98QFDMEY82YFGH9FZ0NDM5Y",
"name": "Travel"
},
"channels": [
"console",
"push",
"slack"
],
"timeout_minutes": 240,
"on_timeout": "escalate"
},
"required_assurance": "any",
"status": "rejected",
"decided_by": [
{
"user": {
"id": "usr_01K7WYQ6MEYNYVHTQCVYZCTCDX",
"name": "Dana Whitfield"
},
"decision": "reject",
"at": "2026-11-23T00:43:13.509Z",
"assurance": "console",
"note": "Not this vendor"
}
],
"signatures": [],
"expires_at": "2026-11-23T09:45:11.374Z",
"decided_at": "2026-11-23T00:43:13.509Z",
"bulk_eligible": true
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Approve several held payments#
/v2/approvals/bulk-approve- idsstring[]required
- passkey_assertionstring
- object"bulk_approve"
- approvednumber
- skippedstring[]
- 400invalid_request
A field is missing or invalid; fields names each one.
- 400step_up_required
A person must confirm with a passkey first, when the org requires it.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/approvals/bulk-approve" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"ids": []
}'{
"object": "error",
"type": "invalid_request",
"code": "invalid_request",
"message": "Pick the payments to approve.",
"request_id": "req_1e4d228eb9a67363725d",
"fields": {
"ids": "Required"
}
}The mock answered this sample with an error; its message says why. Adjust the request in Try it below.
Runs against the in-browser mock with a test key. Nothing leaves your browser.