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

OAuth apps and consent API

OAuth 2.1 clients (MCP clients, platforms), grants and the agent consent screen.

8 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 OAuth app#

POST/v2/oauth-apps
Request body OAuthAppCreate
  • namestringrequired
  • kindstring enumrequired
    "platform""mcp_client""integration"
  • redirect_urisstring[]required
  • scopesstring[]required
Response OAuthApp
  • idId
  • object"oauth_app"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

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

  • namestring
  • kindstring enum
    "platform""mcp_client""integration"
  • publisherobject
    2 fields
    • namestring
    • verifiedboolean
  • client_idstring
  • redirect_urisstring[]
  • scopesstring[]
  • grantsOAuthGrant[]
    OAuthGrant: 7 fields
    • idIdoptional

      Present on every grant the API returns; older objects may lack it.

    • userRef

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

      Ref: 2 fields
      • idId
      • namestring
    • agentRef | null

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

      Ref: 2 fields
      • idId
      • namestring
    • scopesstring[]
    • granted_atTimestamp
    • allowanceobject | nulloptional

      The spending allowance the person set on the consent screen.

      2 fields
      • limitMoney

        An amount: integer minor units + asset.

        Money: 2 fields
        • amountnumber
        • assetAssetCode
          "USD""USDC""EUR""GBP"
      • windowstring enum
        "day""week""month"
    • last_used_atTimestamp | nulloptional
  • statusstring enum
    "active""revoked"
  • last_used_atTimestamp | null
  • registrationstring enumoptional

    How the client registered: MCP clients use dynamic client registration.

    "manual""dynamic"
  • client_typestring enumoptional

    Public clients (PKCE, no secret) or confidential ones.

    "public""confidential"
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/oauth-apps" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Docs MCP client",
    "kind": "mcp_client",
    "redirect_uris": [
      "https://example.com/callback"
    ],
    "scopes": [
      "pay",
      "check_budget"
    ]
  }'
Response 200
{
  "id": "oapp_01M82XPRPQ0GDWQVKG5AHQ4A39",
  "object": "oauth_app",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-23T00:43:13.495Z",
  "name": "Docs MCP client",
  "kind": "mcp_client",
  "publisher": {
    "name": "Acme Robotics",
    "verified": false
  },
  "client_id": "oc_6d4b9c90fef45b1dbbdc",
  "redirect_uris": [
    "https://example.com/callback"
  ],
  "scopes": [
    "pay",
    "check_budget"
  ],
  "grants": [],
  "status": "active",
  "last_used_at": null,
  "registration": "manual",
  "client_type": "public"
}
Try it

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

List OAuth apps#

GET/v2/oauth-apps
Query parameters all optional
  • kindstring enum
    "platform""mcp_client""integration"
  • 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 OAuthApp

Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:

The same OAuthApp object as Create an OAuth app.

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/oauth-apps?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "oapp_01M5R85VME8B7WEE74V9K5F2CW",
      "object": "oauth_app",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-10-25T00:43:11.374Z",
      "name": "Acme Slack approvals",
      "kind": "integration",
      "publisher": {
        "name": "Acme Robotics",
        "verified": false
      },
      "client_id": "oc_22c9751f8e26ddbdbe52",
      "redirect_uris": [
        "https://slack.com/oauth/v2/ndstill/callback"
      ],
      "scopes": [
        "approvals:write",
        "agents:freeze"
      ],
      "grants": [
        {
          "id": "ogr_6f7c4f07103df08d37a890",
          "user": {
            "id": "usr_01K7WYQ6MEYNYVHTQCVYZCTCDX",
            "name": "Dana Whitfield"
          },
          "agent": null,
          "scopes": [
            "approvals:write",
            "agents:freeze"
          ],
          "granted_at": "2026-10-25T00:43:11.374Z",
          "allowance": null,
          "last_used_at": "2026-11-22T15:49:11.374Z"
        },
        {
          "id": "ogr_5da8738cda52340506d722",
          "user": {
            "id": "usr_01K8M49NMEY9DX1Y08XB7WT6RT",
            "name": "Marcus Lee"
          },
          "agent": null,
          "scopes": [
            "approvals:write",
            "agents:freeze"
          ],
          "granted_at": "2026-10-26T00:43:11.374Z",
          "allowance": null,
          "last_used_at": "2026-11-21T04:10:11.374Z"
        },
        {
          "id": "ogr_3e836f87afcca3d5a6bdf3",
          "user": {
            "id": "usr_01K9R5VQME4Q4FSCTVNGTV56C2",
            "name": "Priya Raman"
          },
          "agent": null,
          "scopes": [
            "approvals:write",
            "agents:freeze"
          ],
          "granted_at": "2026-10-27T00:43:11.374Z",
          "allowance": null,
          "last_used_at": "2026-11-21T17:06:11.374Z"
        }
      ],
      "status": "active",
      "last_used_at": "2026-11-22T23:52:11.374Z",
      "registration": "manual",
      "client_type": "confidential"
    },
    {
      "id": "oapp_01M4HM72MEZVEVXCEC1HQ9A819",
      "object": "oauth_app",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-10-10T00:43:11.374Z",
      "name": "ChatGPT",
      "kind": "mcp_client",
      "publisher": {
        "name": "OpenAI",
        "verified": true
      },
      "client_id": "oc_54f21f80ed580af75fdf",
      "redirect_uris": [
        "https://chatgpt.example/oauth/callback"
      ],
      "scopes": [
        "pay",
        "check_budget",
        "read_activity"
      ],
      "grants": [
        {
          "id": "ogr_70e83482fc1aac43ec450f",
          "user": {
            "id": "usr_01K7WYQ6MEYNYVHTQCVYZCTCDX",
            "name": "Dana Whitfield"
          },
          "agent": {
            "id": "agt_01KWEQTZGE7K1Y4XH61XNMMJ45",
            "name": "Content writer"
          },
          "scopes": [
            "pay",
            "check_budget",
            "read_activity"
          ],
          "granted_at": "2026-10-10T00:43:11.374Z",
          "allowance": {
            "limit": {
              "amount": 450000,
              "asset": "USD"
            },
            "window": "month"
          },
          "last_used_at": "2026-11-21T01:07:11.374Z"
        },
        {
          "id": "ogr_16cd1e8919905755a41726",
          "user": {
            "id": "usr_01K8M49NMEY9DX1Y08XB7WT6RT",
            "name": "Marcus Lee"
          },
          "agent": {
            "id": "agt_01KWY9N54EWVW2B9R5VCDZ7753",
            "name": "Social scheduler"
          },
          "scopes": [
            "pay",
            "check_budget",
            "read_activity"
          ],
          "granted_at": "2026-10-11T00:43:11.374Z",
          "allowance": {
            "limit": {
              "amount": 600000,
              "asset": "USD"
            },
            "window": "month"
          },
          "last_used_at": "2026-11-22T00:40:11.374Z"
        }
      ],
      "status": "active",
      "last_used_at": "2026-11-22T22:01:11.374Z",
      "registration": "dynamic",
      "client_type": "public"
    }
  ],
  "has_more": true,
  "next_cursor": "Mg==",
  "total": 4
}
Try it

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

Retrieve an OAuth app#

GET/v2/oauth-apps/{id}
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response OAuthApp

The same OAuthApp object as Create an OAuth app.

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/oauth-apps/oapp_01M5R85VME8B7WEE74V9K5F2CW" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "id": "oapp_01M5R85VME8B7WEE74V9K5F2CW",
  "object": "oauth_app",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-10-25T00:43:11.374Z",
  "name": "Acme Slack approvals",
  "kind": "integration",
  "publisher": {
    "name": "Acme Robotics",
    "verified": false
  },
  "client_id": "oc_22c9751f8e26ddbdbe52",
  "redirect_uris": [
    "https://slack.com/oauth/v2/ndstill/callback"
  ],
  "scopes": [
    "approvals:write",
    "agents:freeze"
  ],
  "grants": [
    {
      "id": "ogr_6f7c4f07103df08d37a890",
      "user": {
        "id": "usr_01K7WYQ6MEYNYVHTQCVYZCTCDX",
        "name": "Dana Whitfield"
      },
      "agent": null,
      "scopes": [
        "approvals:write",
        "agents:freeze"
      ],
      "granted_at": "2026-10-25T00:43:11.374Z",
      "allowance": null,
      "last_used_at": "2026-11-22T15:49:11.374Z"
    },
    {
      "id": "ogr_5da8738cda52340506d722",
      "user": {
        "id": "usr_01K8M49NMEY9DX1Y08XB7WT6RT",
        "name": "Marcus Lee"
      },
      "agent": null,
      "scopes": [
        "approvals:write",
        "agents:freeze"
      ],
      "granted_at": "2026-10-26T00:43:11.374Z",
      "allowance": null,
      "last_used_at": "2026-11-21T04:10:11.374Z"
    },
    {
      "id": "ogr_3e836f87afcca3d5a6bdf3",
      "user": {
        "id": "usr_01K9R5VQME4Q4FSCTVNGTV56C2",
        "name": "Priya Raman"
      },
      "agent": null,
      "scopes": [
        "approvals:write",
        "agents:freeze"
      ],
      "granted_at": "2026-10-27T00:43:11.374Z",
      "allowance": null,
      "last_used_at": "2026-11-21T17:06:11.374Z"
    }
  ],
  "status": "active",
  "last_used_at": "2026-11-22T23:52:11.374Z",
  "registration": "manual",
  "client_type": "confidential"
}
Try it

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

Revoke an OAuth app#

POST/v2/oauth-apps/{id}/revoke
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response OAuthApp

The same OAuthApp object as Create an OAuth app.

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/oauth-apps/oapp_01M82XPRPQ0GDWQVKG5AHQ4A39/revoke" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "id": "oapp_01M82XPRPQ0GDWQVKG5AHQ4A39",
  "object": "oauth_app",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-23T00:43:13.495Z",
  "name": "Docs MCP client",
  "kind": "mcp_client",
  "publisher": {
    "name": "Acme Robotics",
    "verified": false
  },
  "client_id": "oc_6d4b9c90fef45b1dbbdc",
  "redirect_uris": [
    "https://example.com/callback"
  ],
  "scopes": [
    "pay",
    "check_budget"
  ],
  "grants": [],
  "status": "revoked",
  "last_used_at": null,
  "registration": "manual",
  "client_type": "public",
  "updated_at": "2026-11-23T00:43:13.667Z"
}
Try it

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

Revoke an OAuth grant#

POST/v2/oauth-grants/{id}/revoke
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response OAuthApp

The same OAuthApp object as Create an OAuth app.

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
Request
curl -X POST "https://api.ndstill.com/v2/oauth-grants/{id}/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.

Deny consent#

POST/v2/oauth/consent-requests/{id}/deny
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response JSON
  • object"consent_denied"
  • redirect_uristring
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
Request
curl -X POST "https://api.ndstill.com/v2/oauth/consent-requests/{id}/deny" \
  -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.

Grant consent to an agent#

POST/v2/oauth/consent-requests/{id}/grant
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body ConsentGrant
  • request_idIdrequired
  • agent_namestringrequired
  • allowanceMoneyrequired

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumberrequired
    • assetAssetCoderequired
      "USD""USDC""EUR""GBP"
  • windowstring enumrequired
    "week""month"
  • funding_source_idIdrequired
  • approve_aboveMoneyrequired

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumberrequired
    • assetAssetCoderequired
      "USD""USDC""EUR""GBP"
  • categoriesstring[]required
  • expires_atTimestamp | nullrequired
  • passkey_assertionstring

    WebAuthn assertion (demo: any string).

Response ConsentGranted
  • object"consent_granted"
  • agent_idId
  • policy_idId
  • mandate_idId
  • redirect_uristring
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.

  • 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
Request
curl -X POST "https://api.ndstill.com/v2/oauth/consent-requests/{id}/grant" \
  -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.