Skip to content
ndStill is in development. These docs describe the v2 API as designed; the SDKs and the hosted MCP server are previews and not generally available.
Docs

Platform API

Linked orgs, embed keys, component tokens, usage and settings for platforms that embed ndStill, plus the endpoints the embedded components call.

18 endpointsGenerated from the typed registry

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.

Create an embed key#

POST/v2/platform/embed-keys
Request body EmbedKeyCreate
  • namestringrequired
  • modestring enumrequired
    "live""test"
  • componentsEmbedComponent[]required
    "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • allowed_originsstring[]required
  • step_upstring
Response EmbedKeyCreated
  • idId
  • object"embed_key"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

    True for test-mode objects (simulations, sandbox).

  • namestring
  • prefixstring

    First characters, e.g. "ek_live_4f2a". The secret is shown once at creation.

  • modestring enum
    "live""test"
  • componentsEmbedComponent[]
    "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • allowed_originsstring[]
  • statusstring enum
    "active""revoked"
  • last_used_atTimestamp | null
  • created_byRef

    Small reference used for denormalized names in lists (no N+1 lookups in tables).

    Ref: 2 fields
    • idId
    • namestring
  • secretstring
Errors
  • 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.

  • 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.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/platform/embed-keys" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Docs example",
    "mode": "live",
    "components": [
      "approval_inbox"
    ],
    "allowed_origins": [
      "example"
    ],
    "step_up": "passkey_assertion_from_webauthn"
  }'
Response 400
{
  "object": "error",
  "type": "invalid_request",
  "code": "invalid_request",
  "message": "Some details need fixing.",
  "request_id": "req_b1e00ccb73303bcdbb50",
  "fields": {
    "allowed_origins": "Use https origins (http only for localhost): example"
  }
}

The mock answered this sample with an error; its message says why. Adjust the request in Try it below.

Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

List embed keys#

GET/v2/platform/embed-keys
Query parameters all optional
  • modestring enum
    "live""test"
  • statusstring enum
    "active""revoked"
  • 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).

Response list of EmbedKey

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"embed_key"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

    True for test-mode objects (simulations, sandbox).

  • namestring
  • prefixstring

    First characters, e.g. "ek_live_4f2a". The secret is shown once at creation.

  • modestring enum
    "live""test"
  • componentsEmbedComponent[]
    "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • allowed_originsstring[]
  • statusstring enum
    "active""revoked"
  • last_used_atTimestamp | null
  • created_byRef

    Small reference used for denormalized names in lists (no N+1 lookups in tables).

    Ref: 2 fields
    • idId
    • namestring
Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/platform/embed-keys?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "ek_e9a1d81a6ac0c10de416",
      "object": "embed_key",
      "org_id": "org_816477F12F969F8DEC2D94196A",
      "created_at": "2026-09-24T00:43:12.476Z",
      "name": "Staging",
      "prefix": "ek_test_9d03",
      "mode": "test",
      "components": [
        "approval_inbox",
        "spend_view",
        "budget_editor"
      ],
      "allowed_origins": [
        "https://staging.agentry.example",
        "http://localhost:3000"
      ],
      "status": "active",
      "last_used_at": "2026-11-20T00:43:12.476Z",
      "created_by": {
        "id": "usr_01K7WYQ7HR4A0VDC4VA9NCQDB1",
        "name": "Lena Ford"
      }
    },
    {
      "id": "ek_6ad81b92489d62170bf4",
      "object": "embed_key",
      "org_id": "org_816477F12F969F8DEC2D94196A",
      "created_at": "2026-07-26T00:43:12.476Z",
      "name": "Production app",
      "prefix": "ek_live_e59b",
      "mode": "live",
      "components": [
        "approval_inbox",
        "approval_detail",
        "agent_consent"
      ],
      "allowed_origins": [
        "https://app.agentry.example"
      ],
      "status": "active",
      "last_used_at": "2026-11-22T22:43:12.476Z",
      "created_by": {
        "id": "usr_01K7WYQ7HR4A0VDC4VA9NCQDB1",
        "name": "Lena Ford"
      }
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total": 2
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

List linked orgs#

GET/v2/platform/orgs
Query parameters all optional
  • statusstring enum
    "active""pending""revoked"
  • 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).

Response list of PlatformLink

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"platform_link"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

    True for test-mode objects (simulations, sandbox).

  • platform_idId
  • linked_orgobject
    3 fields
    • idId
    • namestring
    • kindOrgKind
      "business""individual"
  • permissionsarray of string enum
    "read_spend""manage_policy""approvals""accounts""freeze"
  • statusstring enum
    "active""pending""revoked"
  • agentsnumber
  • spend_mtdMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • decisions_mtdnumber
Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/platform/orgs?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "plink_01M44R7GHRM9D3N3RYM18E1A8P",
      "object": "platform_link",
      "org_id": "org_816477F12F969F8DEC2D94196A",
      "created_at": "2026-10-05T00:43:12.312Z",
      "platform_id": "plt_816477F12F969F8DEC2D94196A",
      "linked_org": {
        "id": "org_01M44R7GHR830M9R2KQABW91K6",
        "name": "Pine & Co. Accounting",
        "kind": "individual"
      },
      "permissions": [
        "manage_policy",
        "freeze"
      ],
      "status": "pending",
      "agents": 2,
      "spend_mtd": {
        "amount": 2946500,
        "asset": "USD"
      },
      "decisions_mtd": 5014
    },
    {
      "id": "plink_01KZFD5THRA1JB07FFHZSM67MJ",
      "object": "platform_link",
      "org_id": "org_816477F12F969F8DEC2D94196A",
      "created_at": "2026-08-08T00:43:12.312Z",
      "platform_id": "plt_816477F12F969F8DEC2D94196A",
      "linked_org": {
        "id": "org_01KZFD5THRNDQZ20K86S8PXATC",
        "name": "Harbor Freight Ops",
        "kind": "individual"
      },
      "permissions": [
        "approvals",
        "read_spend"
      ],
      "status": "active",
      "agents": 11,
      "spend_mtd": {
        "amount": 7241700,
        "asset": "USD"
      },
      "decisions_mtd": 17754
    }
  ],
  "has_more": true,
  "next_cursor": "Mg==",
  "total": 6
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Retrieve an embed key#

GET/v2/platform/embed-keys/{id}
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response EmbedKey

The same EmbedKey object as List embed keys.

Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/platform/embed-keys/ek_e9a1d81a6ac0c10de416" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "id": "ek_e9a1d81a6ac0c10de416",
  "object": "embed_key",
  "org_id": "org_816477F12F969F8DEC2D94196A",
  "created_at": "2026-09-24T00:43:12.476Z",
  "name": "Staging",
  "prefix": "ek_test_9d03",
  "mode": "test",
  "components": [
    "approval_inbox",
    "spend_view",
    "budget_editor"
  ],
  "allowed_origins": [
    "https://staging.agentry.example",
    "http://localhost:3000"
  ],
  "status": "active",
  "last_used_at": "2026-11-20T00:43:12.476Z",
  "created_by": {
    "id": "usr_01K7WYQ7HR4A0VDC4VA9NCQDB1",
    "name": "Lena Ford"
  }
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Retrieve a linked org#

GET/v2/platform/orgs/{id}
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response PlatformLink

The same PlatformLink object as List linked orgs.

Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/platform/orgs/plink_01M44R7GHRM9D3N3RYM18E1A8P" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "id": "plink_01M44R7GHRM9D3N3RYM18E1A8P",
  "object": "platform_link",
  "org_id": "org_816477F12F969F8DEC2D94196A",
  "created_at": "2026-10-05T00:43:12.312Z",
  "platform_id": "plt_816477F12F969F8DEC2D94196A",
  "linked_org": {
    "id": "org_01M44R7GHR830M9R2KQABW91K6",
    "name": "Pine & Co. Accounting",
    "kind": "individual"
  },
  "permissions": [
    "manage_policy",
    "freeze"
  ],
  "status": "pending",
  "agents": 2,
  "spend_mtd": {
    "amount": 2946500,
    "asset": "USD"
  },
  "decisions_mtd": 5014
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Get embed agent limits#

GET/v2/embed/agents/{id}/limits
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response EmbedAgentLimits
  • object"embed_agent_limits"
  • agentobject
    3 fields
    • idId
    • namestring
    • statusstring
  • window"month"
  • budgetMoney

    Monthly budget.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • per_paymentMoney

    Largest single payment.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • approve_aboveMoney

    Payments above this wait for a person.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • spentMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • updated_atTimestamp | null
  • updated_bystring | null
Errors
  • 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.

Example request
Request
curl -X GET "https://api.ndstill.com/v2/embed/agents/{id}/limits" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Get embed frame config#

GET/v2/embed/frame-config
Query parameters all optional
  • keyIdrequired
Response EmbedFrameConfig
  • object"embed_frame_config"
  • key_idId
  • key_prefixstring
  • modestring enum
    "live""test"
  • statusstring enum
    "active""revoked"
  • platformobject
    3 fields
    • idId
    • namestring
    • support_emailstring
  • allowed_originsstring[]

    Exact origins allowed to frame the components (CSP frame-ancestors) and to talk to them.

  • componentsEmbedComponent[]
    "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • themeEmbedTheme

    The platform's default theme; per-mount overrides stay inside the same allow-list.

    EmbedTheme: 4 fields
    • accentstring enum
      "ink""blue""violet""teal""amber""rose"
    • radiusenum
      04812
    • fontstring enum
      "system""geist""inter"
    • modestring enum
      "light""dark""auto"
Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/embed/frame-config" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 400
{
  "object": "error",
  "type": "invalid_request",
  "code": "invalid_request",
  "message": "Pass the embed key: ?key=ek_…",
  "request_id": "req_094a4054854c7d0379ca",
  "fields": {
    "key": "Required"
  }
}

The mock answered this sample with an error; its message says why. Adjust the request in Try it below.

Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Get embed spend#

GET/v2/embed/spend
Query parameters all optional
  • agent_idId
  • daysenum
    73090
Response EmbedSpend
  • object"embed_spend"
  • daysnumber
  • fromTimestamp
  • toTimestamp
  • agentRef | null

    Small reference used for denormalized names in lists (no N+1 lookups in tables).

    Ref: 2 fields
    • idId
    • namestring
  • totalMoney

    Authorized and settled payments in the window.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • paymentsnumber
  • heldobject
    2 fields
    • countnumber
    • amountMoney

      An amount: integer minor units + asset.

      Money: 2 fields
      • amountnumber
      • assetAssetCode
        "USD""USDC""EUR""GBP"
  • declinednumber
  • dailyobject[]
    2 fields
    • daystring
    • amountMoney

      An amount: integer minor units + asset.

      Money: 2 fields
      • amountnumber
      • assetAssetCode
        "USD""USDC""EUR""GBP"
  • by_agentobject[]
    4 fields
    • agentRef

      Small reference used for denormalized names in lists (no N+1 lookups in tables).

      Ref: 2 fields
      • idId
      • namestring
    • statusstring
    • spentMoney

      An amount: integer minor units + asset.

      Money: 2 fields
      • amountnumber
      • assetAssetCode
        "USD""USDC""EUR""GBP"
    • budgetobject | null
      2 fields
      • limitMoney

        An amount: integer minor units + asset.

        Money: 2 fields
        • amountnumber
        • assetAssetCode
          "USD""USDC""EUR""GBP"
      • windowstring
  • by_categoryobject[]
    2 fields
    • categorystring
    • amountMoney

      An amount: integer minor units + asset.

      Money: 2 fields
      • amountnumber
      • assetAssetCode
        "USD""USDC""EUR""GBP"
Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/embed/spend" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "embed_spend",
  "days": 30,
  "from": "2026-10-25T00:00:00.000Z",
  "to": "2026-11-23T00:43:13.431Z",
  "agent": null,
  "total": {
    "amount": 2281131,
    "asset": "USD"
  },
  "payments": 126,
  "held": {
    "count": 3,
    "amount": {
      "amount": 234600,
      "asset": "USD"
    }
  },
  "declined": 10,
  "daily": [
    {
      "day": "2026-10-25",
      "amount": {
        "amount": 49086,
        "asset": "USD"
      }
    },
    {
      "day": "2026-10-26",
      "amount": {
        "amount": 164625,
        "asset": "USD"
      }
    },
    {
      "day": "2026-10-27",
      "amount": {
        "amount": 0,
        "asset": "USD"
      }
    }
  ],
  "by_agent": [
    {
      "agent": {
        "id": "agt_01KR2YB51RV7BT7XQN3F0CX3W7",
        "name": "Billing reconciler"
      },
      "status": "active",
      "spent": {
        "amount": 1814156,
        "asset": "USD"
      },
      "budget": {
        "limit": {
          "amount": 3000000,
          "asset": "USD"
        },
        "window": "month"
      }
    },
    {
      "agent": {
        "id": "agt_01KQN3ESDRCBFKXCQA7HCMJ322",
        "name": "Usage monitor"
      },
      "status": "active",
      "spent": {
        "amount": 261465,
        "asset": "USD"
      },
      "budget": {
        "limit": {
          "amount": 900000,
          "asset": "USD"
        },
        "window": "month"
      }
    },
    {
      "agent": {
        "id": "agt_01KRJCQF1R0FTHQQVMY076KHKD",
        "name": "Support triage"
      },
      "status": "active",
      "spent": {
        "amount": 119677,
        "asset": "USD"
      },
      "budget": {
        "limit": {
          "amount": 300000,
          "asset": "USD"
        },
        "window": "month"
      }
    }
  ],
  "by_category": [
    {
      "category": "Data labeling",
      "amount": {
        "amount": 1041084,
        "asset": "USD"
      }
    },
    {
      "category": "Contractors",
      "amount": {
        "amount": 773072,
        "asset": "USD"
      }
    },
    {
      "category": "AI models",
      "amount": {
        "amount": 433063,
        "asset": "USD"
      }
    }
  ]
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Get embed sandbox#

GET/v2/platform/embed/sandbox
Response EmbedSandbox
  • object"embed_sandbox"
  • embed_keyobject
    5 fields
    • idId
    • prefixstring
    • namestring
    • allowed_originsstring[]
    • componentsEmbedComponent[]
      "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • orgsobject[]
    5 fields
    • idId
    • namestring
    • kindOrgKind
      "business""individual"
    • peopleobject[]
      3 fields
      • idId
      • namestring
      • roleRole
        "owner""admin""approver""finance""developer""viewer"
    • samplesobject
      4 fields
      • approval_idId | null
      • agent_idId | null
      • payment_idId | null
      • consent_request_idId | null
Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/platform/embed/sandbox" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "embed_sandbox",
  "embed_key": {
    "id": "ek_a0d1e4480250b33193a2",
    "prefix": "ek_test_0095",
    "name": "Sandbox (embed demo host)",
    "allowed_origins": [
      "http://localhost:3500",
      "http://127.0.0.1:3500"
    ],
    "components": [
      "approval_inbox",
      "approval_detail",
      "agent_consent"
    ]
  },
  "orgs": [
    {
      "id": "org_A99F918124609C9DAAACB209D8",
      "name": "Acme Robotics",
      "kind": "business",
      "people": [
        {
          "id": "usr_01K7WYQ6MEYNYVHTQCVYZCTCDX",
          "name": "Dana Whitfield",
          "role": "owner"
        },
        {
          "id": "usr_01K8M49NMEY9DX1Y08XB7WT6RT",
          "name": "Marcus Lee",
          "role": "admin"
        },
        {
          "id": "usr_01KA2FEKMEXA9J1D00GSGZA54W",
          "name": "Sam Ortiz",
          "role": "approver"
        }
      ],
      "samples": {
        "approval_id": "apr_01M82QT3HYAYSVA6YRYFQASMH5",
        "agent_id": "agt_01KQ667RMEP9Y30VHM3RCA9HZN",
        "payment_id": "pi_01M82VJYNEJFCMY9VHY5PS5W12",
        "consent_request_id": "cr_demo"
      }
    },
    {
      "id": "org_E0256B74CFCD72D5B45157840A",
      "name": "Maya Chen",
      "kind": "individual",
      "people": [
        {
          "id": "usr_01K878A4E91E1RSRDQ6F2NE0S1",
          "name": "Maya Chen",
          "role": "owner"
        }
      ],
      "samples": {
        "approval_id": "apr_01M82WT4B955HAP4VHDGNB257P",
        "agent_id": "agt_01KQ5ARXE9RYVCH22GZDJ4CE1N",
        "payment_id": "pi_01M82RXFCNP1ZFB33HHFYZQ75S",
        "consent_request_id": "cr_demo"
      }
    }
  ]
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Get platform settings#

GET/v2/platform/settings
Response PlatformSettings
  • object"platform_settings"
  • display_namestring
  • support_emailstring
  • themeEmbedTheme

    What platforms may theme (frontend plan §8). Gate strip and status colours never change.

    EmbedTheme: 4 fields
    • accentstring enum
      "ink""blue""violet""teal""amber""rose"
    • radiusenum
      04812
    • fontstring enum
      "system""geist""inter"
    • modestring enum
      "light""dark""auto"
  • allowed_originsstring[]
  • revenue_share_bpsnumber

    Basis points of linked-org spend shared with the platform.

  • agreementobject
    4 fields
    • acceptedboolean
    • accepted_atTimestamp | null
    • accepted_bystring | null
    • versionstring
  • statementsobject[]
    5 fields
    • periodstring
    • spendMoney

      An amount: integer minor units + asset.

      Money: 2 fields
      • amountnumber
      • assetAssetCode
        "USD""USDC""EUR""GBP"
    • decisionsnumber
    • shareMoney

      An amount: integer minor units + asset.

      Money: 2 fields
      • amountnumber
      • assetAssetCode
        "USD""USDC""EUR""GBP"
    • statusstring enum
      "pending""paid""accruing"
Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/platform/settings" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "platform_settings",
  "display_name": "Agentry",
  "support_email": "support@agentry.example",
  "theme": {
    "accent": "violet",
    "radius": 8,
    "font": "geist",
    "mode": "auto"
  },
  "allowed_origins": [
    "https://app.agentry.example",
    "https://staging.agentry.example"
  ],
  "revenue_share_bps": 40,
  "agreement": {
    "accepted": true,
    "accepted_at": "2026-05-07T00:43:12.476Z",
    "accepted_by": "Lena Ford",
    "version": "2026-06"
  },
  "statements": [
    {
      "period": "2026-11",
      "spend": {
        "amount": 28893100,
        "asset": "USD"
      },
      "decisions": 57459,
      "share": {
        "amount": 115572,
        "asset": "USD"
      },
      "status": "accruing"
    },
    {
      "period": "2026-10",
      "spend": {
        "amount": 29293800,
        "asset": "USD"
      },
      "decisions": 44977,
      "share": {
        "amount": 117175,
        "asset": "USD"
      },
      "status": "pending"
    },
    {
      "period": "2026-09",
      "spend": {
        "amount": 19183300,
        "asset": "USD"
      },
      "decisions": 67678,
      "share": {
        "amount": 76733,
        "asset": "USD"
      },
      "status": "paid"
    }
  ]
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Get platform usage#

GET/v2/platform/usage
Response PlatformUsage
  • object"platform_usage"
  • periodstring
  • linked_orgsnumber
  • decisionsnumber
  • spendMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • revenue_shareMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • componentsobject[]
    2 fields
    • componentstring
    • loadsnumber
  • allowed_originsstring[]
Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/platform/usage" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "platform_usage",
  "period": "2026-11",
  "linked_orgs": 5,
  "decisions": 57459,
  "spend": {
    "amount": 28893100,
    "asset": "USD"
  },
  "revenue_share": {
    "amount": 115572,
    "asset": "USD"
  },
  "components": [
    {
      "component": "Approval inbox",
      "loads": 1207
    },
    {
      "component": "Agent consent",
      "loads": 669
    },
    {
      "component": "Spend view",
      "loads": 5986
    }
  ],
  "allowed_origins": [
    "https://app.agentry.example",
    "https://staging.agentry.example"
  ]
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Update limits an embed#

PATCH/v2/embed/agents/{id}/limits
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body EmbedLimitsUpdate
  • budgetMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumberrequired
    • assetAssetCoderequired
      "USD""USDC""EUR""GBP"
  • per_paymentMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumberrequired
    • assetAssetCoderequired
      "USD""USDC""EUR""GBP"
  • approve_aboveMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumberrequired
    • assetAssetCoderequired
      "USD""USDC""EUR""GBP"
  • step_upstring
Response EmbedAgentLimits

The same EmbedAgentLimits object as Get embed agent limits.

Errors
  • 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.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example request
Request
curl -X PATCH "https://api.ndstill.com/v2/embed/agents/{id}/limits" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Session embed#

POST/v2/embed/session
Request body EmbedSessionRequest
  • tokenstringrequired
  • componentEmbedComponentrequired
    "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • originstring

    The host page origin the iframe talks to; must equal the origin the token was minted for.

  • key_idId

    The embed key in the iframe URL; must equal the token's key.

  • requestobject

    The /v2 request the component wants to make (checked against the component's scope).

    2 fields
    • methodstringrequired
    • pathstringrequired
Response EmbedSession
  • object"embed_session"
  • token_idId
  • modestring enum
    "live""test"
  • issued_atTimestamp
  • expires_atTimestamp
  • componentEmbedComponent
    "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • componentsEmbedComponent[]
    "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • originstring
  • orgobject
    3 fields
    • idId
    • namestring
    • kindOrgKind
      "business""individual"
  • userobject
    3 fields
    • idId
    • namestring
    • roleRole
      "owner""admin""approver""finance""developer""viewer"
  • platformobject
    2 fields
    • idId
    • namestring
  • embed_keyobject
    2 fields
    • idId
    • prefixstring
  • permissionsEmbedPermissions

    What a component may do, from the token's user role in the linked org.

    EmbedPermissions: 4 fields
    • decide_approvalsboolean
    • freezeboolean
    • edit_limitsboolean
    • grant_consentboolean
Errors
  • 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.

  • 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.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/embed/session" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "example",
    "component": "approval_inbox"
  }'
Response 401
{
  "object": "error",
  "type": "authentication",
  "code": "token_invalid",
  "message": "This component token isn't valid. The app needs to load the component again with a fresh token.",
  "request_id": "req_388e4409080037757a3d"
}

The mock answered this sample with an error; its message says why. Adjust the request in Try it below.

Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Mint component tokens#

POST/v2/platform/component-tokens
Request body ComponentTokenMint
  • embed_key_idIdrequired

    The embed key whose allowed origins and components bound this token.

  • org_idIdrequired

    The linked org the components act in.

  • user_idIdrequired

    The person using the platform's app; must be a member of `org_id`.

  • componentsEmbedComponent[]required

    Components this token may open (a subset of the key's components).

    "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • originstringrequired

    The page origin that will host the iframe; must be one of the key's allowed origins.

  • ttl_secondsnumber

    Lifetime. Live keys: 60–3600 s. Test keys: 1–3600 s (short values exercise expiry). Default 600.

Response ComponentTokenMinted
  • object"component_token"
  • tokenstring

    The bearer token. Pass it to the iframe through the loader; never put it in a URL.

  • token_idId
  • modestring enum
    "live""test"
  • expires_atTimestamp
  • issued_atTimestamp
  • componentsEmbedComponent[]
    "approval_inbox""approval_detail""agent_consent""spend_view""budget_editor""freeze_button""activity_list""receipt_view"
  • originstring
  • orgobject
    2 fields
    • idId
    • namestring
  • userobject
    3 fields
    • idId
    • namestring
    • roleRole
      "owner""admin""approver""finance""developer""viewer"
  • embed_keyobject
    2 fields
    • idId
    • prefixstring
Errors
  • 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.

  • 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.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/platform/component-tokens" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "embed_key_id": null,
    "org_id": null,
    "user_id": "usr_01KBNZD0HRHRBH4QB5MVSFKF2N",
    "components": [
      "approval_inbox"
    ],
    "origin": "example"
  }'
Response 400
{
  "object": "error",
  "type": "invalid_request",
  "code": "invalid_request",
  "message": "Name the embed key to mint with.",
  "request_id": "req_d41b9f8a88f1515fab3c",
  "fields": {
    "embed_key_id": "Required"
  }
}

The mock answered this sample with an error; its message says why. Adjust the request in Try it below.

Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Revoke an embed key#

POST/v2/platform/embed-keys/{id}/revoke
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response EmbedKey

The same EmbedKey object as List embed keys.

Errors
  • 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.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/platform/embed-keys/ek_a0d1e4480250b33193a2/revoke" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "id": "ek_a0d1e4480250b33193a2",
  "object": "embed_key",
  "org_id": "org_816477F12F969F8DEC2D94196A",
  "created_at": "2026-11-09T00:43:13.431Z",
  "name": "Sandbox (embed demo host)",
  "prefix": "ek_test_0095",
  "mode": "test",
  "components": [
    "approval_inbox",
    "approval_detail",
    "agent_consent"
  ],
  "allowed_origins": [
    "http://localhost:3500",
    "http://127.0.0.1:3500"
  ],
  "status": "revoked",
  "last_used_at": null,
  "created_by": {
    "id": "usr_01K7WYQ7HR4A0VDC4VA9NCQDB1",
    "name": "Lena Ford"
  },
  "updated_at": "2026-11-23T00:43:13.681Z"
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Link an org#

POST/v2/platform/orgs
Request body PlatformLinkCreate
  • org_namestringrequired
  • kindOrgKindrequired
    "business""individual"
  • admin_emailstringrequired
  • permissionsarray of string enumrequired
    "read_spend""manage_policy""approvals""accounts""freeze"
Response PlatformLink

The same PlatformLink object as List linked orgs.

Errors
  • 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.

  • 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.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/platform/orgs" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "org_name": "Docs Customer Inc",
    "kind": "business",
    "admin_email": "admin@docs-customer.example",
    "permissions": [
      "read",
      "approvals"
    ]
  }'
Response 200
{
  "id": "plink_01M82XPRWGQFYRGPC6GZX3R2QR",
  "object": "platform_link",
  "org_id": "org_816477F12F969F8DEC2D94196A",
  "created_at": "2026-11-23T00:43:13.680Z",
  "platform_id": "plt_816477F12F969F8DEC2D94196A",
  "linked_org": {
    "id": "org_01M82XPRWGEBTJ8RKN2P55RNXH",
    "name": "Docs Customer Inc",
    "kind": "business"
  },
  "permissions": [
    "read",
    "approvals"
  ],
  "status": "pending",
  "agents": 0,
  "spend_mtd": {
    "amount": 0,
    "asset": "USD"
  },
  "decisions_mtd": 0
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Unlink an org#

POST/v2/platform/orgs/{id}/revoke
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response PlatformLink

The same PlatformLink object as List linked orgs.

Errors
  • 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.

Example request only (not run: it changes the org for good)
Request
curl -X POST "https://api.ndstill.com/v2/platform/orgs/plink_01M82XPRWGQFYRGPC6GZX3R2QR/revoke" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)"
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Update platform settings#

PATCH/v2/platform/settings
Request body PlatformSettingsUpdate
  • display_namestring
  • support_emailstring
  • themeEmbedTheme

    What platforms may theme (frontend plan §8). Gate strip and status colours never change.

    EmbedTheme: 4 fields
    • accentstring enumrequired
      "ink""blue""violet""teal""amber""rose"
    • radiusenumrequired
      04812
    • fontstring enumrequired
      "system""geist""inter"
    • modestring enumrequired
      "light""dark""auto"
  • allowed_originsstring[]
  • accept_agreementobject
    2 fields
    • signerstringrequired
    • versionstringrequired
Response PlatformSettings

The same PlatformSettings object as Get platform settings.

Errors
  • 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.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X PATCH "https://api.ndstill.com/v2/platform/settings" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Content-Type: application/json" \
  -d '{}'
Response 200
{
  "object": "platform_settings",
  "display_name": "Agentry",
  "support_email": "support@agentry.example",
  "theme": {
    "accent": "violet",
    "radius": 8,
    "font": "geist",
    "mode": "auto"
  },
  "allowed_origins": [
    "https://app.agentry.example",
    "https://staging.agentry.example"
  ],
  "revenue_share_bps": 40,
  "agreement": {
    "accepted": true,
    "accepted_at": "2026-05-07T00:43:12.476Z",
    "accepted_by": "Lena Ford",
    "version": "2026-06"
  },
  "statements": [
    {
      "period": "2026-11",
      "spend": {
        "amount": 28893100,
        "asset": "USD"
      },
      "decisions": 57459,
      "share": {
        "amount": 115572,
        "asset": "USD"
      },
      "status": "accruing"
    },
    {
      "period": "2026-10",
      "spend": {
        "amount": 29293800,
        "asset": "USD"
      },
      "decisions": 44977,
      "share": {
        "amount": 117175,
        "asset": "USD"
      },
      "status": "pending"
    },
    {
      "period": "2026-09",
      "spend": {
        "amount": 19183300,
        "asset": "USD"
      },
      "decisions": 67678,
      "share": {
        "amount": 76733,
        "asset": "USD"
      },
      "status": "paid"
    }
  ]
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.