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

Connections API

Providers you already use (card programs, spend platforms, banks, AI providers, wallets), with their control level and stop time.

10 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 a connection#

POST/v2/connections
Request body ConnectionCreate
  • providerstringrequired
  • modestring enumrequired
    "api_key""authorization_webhook""oauth""proxy""admin_key""policy_api""billing_export"
  • labelstring
  • credentialstring
  • scopesstring[]
Response Connection
  • idId
  • object"connection"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

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

  • providerstring
  • provider_namestring

    Display name ("Stripe Issuing", "Ramp", "OpenAI").

  • labelstring

    Account or program label inside the provider ("Acme Issuing program").

  • kindConnectorClass
    "bank""cloud""ndstill_card_program""card_program""spend_platform""ai_provider""ai_gateway""wallet""checkout""card_network""accounting"
  • modestring enum

    How ndStill connects: through its proxy, a webhook, OAuth, or an admin key.

    "api_key""authorization_webhook""oauth""proxy""admin_key""policy_api""billing_export"
  • control_levelControlLevel

    The deepest level across capabilities (what the gallery card shows).

    "authorize""issue""observe_stop"
  • capabilitiesobject[]
    4 fields
    • capabilityCapability
      "freeze""refund""dispute""authorize_realtime""issue_credential""set_limits""revoke""observe_spend""pay_out"
    • supportedboolean
    • control_levelstring enum
      null"authorize""issue""observe_stop"
    • notestringoptional
  • railsRail[]
    "card""network_token""checkout_token""stablecoin""bank""ai""cloud"
  • statusstring enum
    "connected""syncing""error""disconnected"
  • healthConnectionHealth
    ConnectionHealth: 6 fields
    • statusstring enum
      "healthy""degraded""down"
    • error_ratenumber
    • latency_ms_p50number
    • last_probe_atTimestamp
    • last_sync_atTimestamp | null
    • messagestring | null

      Plain-language note when not healthy ("Transactions are syncing 40 minutes behind").

  • stopobject

    Measured stop time from real freezes; null p90 = "Not measured yet".

    3 fields
    • p50_msnumber | null
    • p90_msnumber | null
    • samplesnumber
  • freeze_actionobject

    What a freeze does here, and whether it can be undone. `note` explains a stop that needs it ("Stopping deletes the key; …").

    4 fields
    • actionstring
    • done_labelstring
    • reversibleboolean
    • notestring | nulloptional
  • webhook_urlstring | nulloptional

    Where the provider sends this connection's events: set it in the provider's webhook settings. Null when not needed.

  • link_credentialobject | nulloptional

    Set when keys that already exist at the provider can be linked to agents (Anthropic): the field label and a hint.

    2 fields
    • labelstring
    • hintstring
  • scopesstring[]
  • native_limitsobject[]

    Native limits ndStill wrote from policy (policy projection).

    2 fields
    • labelstring
    • valuestring
  • cant_expressstring[]

    Rules ndStill enforces at decision time only on this rail.

  • agents_usingnumber
  • spend_mtdMoney

    An amount: integer minor units + asset.

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

    How events arrive and how fresh they are.

    ConnectionSync: 6 fields
    • modestring enum

      webhook: the provider pushes · poll: ndStill pulls on a schedule · proxy: traffic runs through ndStill · export: billing files.

      "proxy""webhook""poll""export"
    • lag_secondsnumber | null

      How far the newest synced event lags the provider, in seconds (null where it doesn't apply).

    • events_24hnumber
    • next_sync_atTimestamp | null

      Next scheduled poll or export (null for webhooks and the proxy).

    • interval_secondsnumber | nulloptional

      How often ndStill polls or imports, in seconds (null for webhooks and the proxy).

    • cursorstring | null

      Provider cursor ndStill resumes from (identifier).

  • projectionConnectionProjection

    The policy projection: the compiled policy written as native provider limits.

    ConnectionProjection: 4 fields
    • statusstring enum

      not_supported: the rail has no native limits, so ndStill enforces everything at decision time.

      "pending""failed""in_sync""drift""not_supported"
    • policy_versionstring | null

      Content hash of the policy version that was compiled (identifier).

    • written_atTimestamp | null
    • itemsConnectionProjectionItem[]
      ConnectionProjectionItem: 6 fields
      • rulestring

        The policy rule in plain words ("Travel desk: $2,500.00 a month").

      • native_fieldstring

        Where it landed on the provider ("spending_controls.spending_limits").

      • valuestring

        The value as the provider stores it.

      • statusConnectionProjectionStatus
        "pending""failed""in_sync""drift"
      • written_atTimestamp | null
      • notestring | nulloptional
  • disconnected_atTimestamp | null
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/connections" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "anthropic",
    "mode": "observe_stop",
    "label": "Anthropic (docs)",
    "credential": "sk-ant-admin-example"
  }'
Response 400
{
  "object": "error",
  "type": "invalid_request",
  "code": "invalid_request",
  "message": "ndStill can't connect to \"anthropic\" in demo mode. Try stripe_issuing, ramp, mercury, openai, anthropic, coinbase_cdp, stripe, increase or aws.",
  "request_id": "req_2e1817208553463b4197",
  "fields": {
    "provider": "Unknown provider"
  }
}

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 connections#

GET/v2/connections
Query parameters all optional
  • kindstring
  • statusstring enum
    "connected""syncing""error""disconnected"
  • 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 Connection

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 Connection object as Create a connection.

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/connections?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "con_01KW0P2WMEQNDEC441S2F7SYQZ",
      "object": "connection",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-06-26T00:43:11.374Z",
      "provider": "anthropic",
      "provider_name": "Anthropic",
      "label": "Anthropic Console admin key",
      "kind": "ai_provider",
      "mode": "admin_key",
      "control_level": "observe_stop",
      "capabilities": [
        {
          "capability": "authorize_realtime",
          "supported": false,
          "control_level": null,
          "note": "Approve each payment isn't available on Anthropic"
        },
        {
          "capability": "issue_credential",
          "supported": true,
          "control_level": "issue"
        },
        {
          "capability": "set_limits",
          "supported": true,
          "control_level": "issue"
        }
      ],
      "rails": [
        "ai"
      ],
      "status": "connected",
      "health": {
        "status": "healthy",
        "error_rate": 0.0028,
        "latency_ms_p50": 339,
        "last_probe_at": "2026-11-23T00:41:11.374Z",
        "last_sync_at": "2026-11-23T00:37:11.374Z",
        "message": null
      },
      "stop": {
        "p50_ms": 1500,
        "p90_ms": 2200,
        "samples": 19
      },
      "freeze_action": {
        "action": "Pause API key",
        "done_label": "key paused",
        "reversible": true,
        "note": null
      },
      "link_credential": {
        "label": "API key ID",
        "hint": "From Claude Console → Settings → API keys: the key's ID (apikey_…), not the key itself."
      },
      "scopes": [
        "usage:read",
        "api_keys:read",
        "api_keys:write"
      ],
      "native_limits": [
        {
          "label": "Workspace spend limit",
          "value": "Synced from the team budget"
        }
      ],
      "cant_express": [
        "Per-request limits (usage is read after the fact)"
      ],
      "agents_using": 6,
      "spend_mtd": {
        "amount": 568838,
        "asset": "USD"
      },
      "sync": {
        "mode": "poll",
        "lag_seconds": 138,
        "events_24h": 283,
        "next_sync_at": "2026-11-23T00:44:00.000Z",
        "interval_seconds": 60,
        "cursor": "cur_c4b5d7194db058ad"
      },
      "projection": {
        "status": "in_sync",
        "policy_version": "sha256:fb4b3596a83c",
        "written_at": "2026-11-22T22:43:12.531Z",
        "items": [
          {
            "rule": "Workspace spend limit",
            "native_field": "",
            "value": "Synced from the team budget",
            "status": "in_sync",
            "written_at": "2026-11-15T03:43:12.531Z",
            "note": null
          },
          {
            "rule": "Code reviewer: $5,000.00 a month",
            "native_field": "workspace.spend_limit (monthly)",
            "value": "$5,000.00",
            "status": "in_sync",
            "written_at": "2026-11-17T20:43:12.531Z",
            "note": null
          },
          {
            "rule": "Content writer: $4,500.00 a month",
            "native_field": "workspace.spend_limit (monthly)",
            "value": "$4,500.00",
            "status": "in_sync",
            "written_at": "2026-11-18T06:43:12.531Z",
            "note": null
          }
        ]
      },
      "disconnected_at": null,
      "webhook_url": null
    },
    {
      "id": "con_01KZMHZ7MEQ9KST6799SP0GF4G",
      "object": "connection",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-08-10T00:43:11.374Z",
      "provider": "aws",
      "provider_name": "AWS billing",
      "label": "AWS org 4410-…-8812",
      "kind": "cloud",
      "mode": "billing_export",
      "control_level": "observe_stop",
      "capabilities": [
        {
          "capability": "authorize_realtime",
          "supported": false,
          "control_level": null,
          "note": "Approve each payment isn't available on AWS billing"
        },
        {
          "capability": "issue_credential",
          "supported": false,
          "control_level": null,
          "note": "Issue scoped credentials isn't available on AWS billing"
        },
        {
          "capability": "set_limits",
          "supported": true,
          "control_level": "observe_stop"
        }
      ],
      "rails": [
        "cloud"
      ],
      "status": "connected",
      "health": {
        "status": "healthy",
        "error_rate": 0.0018,
        "latency_ms_p50": 244,
        "last_probe_at": "2026-11-23T00:42:11.374Z",
        "last_sync_at": "2026-11-23T00:38:11.374Z",
        "message": null
      },
      "stop": {
        "p50_ms": null,
        "p90_ms": null,
        "samples": 0
      },
      "freeze_action": {
        "action": "Detach the agent's IAM role",
        "done_label": "access cut",
        "reversible": false,
        "note": null
      },
      "link_credential": null,
      "scopes": [
        "billing:read",
        "iam:detach"
      ],
      "native_limits": [
        {
          "label": "AWS Budgets",
          "value": "Alert at 80% and 100% of the agent's budget"
        }
      ],
      "cant_express": [
        "Anything before spend happens (billing data arrives hours later)"
      ],
      "agents_using": 2,
      "spend_mtd": {
        "amount": 2189208,
        "asset": "USD"
      },
      "sync": {
        "mode": "export",
        "lag_seconds": 21600,
        "events_24h": 5,
        "next_sync_at": "2026-11-23T03:00:00.000Z",
        "interval_seconds": 10800,
        "cursor": "cur_8dd26bcc7fc1fdad"
      },
      "projection": {
        "status": "in_sync",
        "policy_version": "sha256:fb4b3596a83c",
        "written_at": "2026-11-21T04:43:12.531Z",
        "items": [
          {
            "rule": "AWS Budgets",
            "native_field": "",
            "value": "Alert at 80% and 100% of the agent's budget",
            "status": "in_sync",
            "written_at": "2026-11-21T04:43:12.531Z",
            "note": null
          },
          {
            "rule": "Cloud cost guard: $25,000.00 a month",
            "native_field": "AWS Budgets: budget limit",
            "value": "$25,000.00",
            "status": "in_sync",
            "written_at": "2026-11-18T08:43:12.531Z",
            "note": "AWS Budgets alerts at 80% and 100%; it doesn't block spend."
          },
          {
            "rule": "Compute broker: $20,000.00 a month",
            "native_field": "AWS Budgets: budget limit",
            "value": "$20,000.00",
            "status": "in_sync",
            "written_at": "2026-11-19T22:43:12.531Z",
            "note": "AWS Budgets alerts at 80% and 100%; it doesn't block spend."
          }
        ]
      },
      "disconnected_at": null,
      "webhook_url": null
    }
  ],
  "has_more": true,
  "next_cursor": "Mg==",
  "total": 10
}
Try it

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

Retrieve a connection#

GET/v2/connections/{id}
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response Connection

The same Connection object as Create a connection.

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/connections/con_01KW0P2WMEQNDEC441S2F7SYQZ" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "id": "con_01KW0P2WMEQNDEC441S2F7SYQZ",
  "object": "connection",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-06-26T00:43:11.374Z",
  "provider": "anthropic",
  "provider_name": "Anthropic",
  "label": "Anthropic Console admin key",
  "kind": "ai_provider",
  "mode": "admin_key",
  "control_level": "observe_stop",
  "capabilities": [
    {
      "capability": "authorize_realtime",
      "supported": false,
      "control_level": null,
      "note": "Approve each payment isn't available on Anthropic"
    },
    {
      "capability": "issue_credential",
      "supported": true,
      "control_level": "issue"
    },
    {
      "capability": "set_limits",
      "supported": true,
      "control_level": "issue"
    }
  ],
  "rails": [
    "ai"
  ],
  "status": "connected",
  "health": {
    "status": "healthy",
    "error_rate": 0.0028,
    "latency_ms_p50": 339,
    "last_probe_at": "2026-11-23T00:41:11.374Z",
    "last_sync_at": "2026-11-23T00:37:11.374Z",
    "message": null
  },
  "stop": {
    "p50_ms": 1500,
    "p90_ms": 2200,
    "samples": 19
  },
  "freeze_action": {
    "action": "Pause API key",
    "done_label": "key paused",
    "reversible": true,
    "note": null
  },
  "link_credential": {
    "label": "API key ID",
    "hint": "From Claude Console → Settings → API keys: the key's ID (apikey_…), not the key itself."
  },
  "scopes": [
    "usage:read",
    "api_keys:read",
    "api_keys:write"
  ],
  "native_limits": [
    {
      "label": "Workspace spend limit",
      "value": "Synced from the team budget"
    }
  ],
  "cant_express": [
    "Per-request limits (usage is read after the fact)"
  ],
  "agents_using": 6,
  "spend_mtd": {
    "amount": 568838,
    "asset": "USD"
  },
  "sync": {
    "mode": "poll",
    "lag_seconds": 138,
    "events_24h": 283,
    "next_sync_at": "2026-11-23T00:44:00.000Z",
    "interval_seconds": 60,
    "cursor": "cur_c4b5d7194db058ad"
  },
  "projection": {
    "status": "in_sync",
    "policy_version": "sha256:fb4b3596a83c",
    "written_at": "2026-11-22T22:43:12.546Z",
    "items": [
      {
        "rule": "Workspace spend limit",
        "native_field": "",
        "value": "Synced from the team budget",
        "status": "in_sync",
        "written_at": "2026-11-15T03:43:12.546Z",
        "note": null
      },
      {
        "rule": "Code reviewer: $5,000.00 a month",
        "native_field": "workspace.spend_limit (monthly)",
        "value": "$5,000.00",
        "status": "in_sync",
        "written_at": "2026-11-17T20:43:12.546Z",
        "note": null
      },
      {
        "rule": "Content writer: $4,500.00 a month",
        "native_field": "workspace.spend_limit (monthly)",
        "value": "$4,500.00",
        "status": "in_sync",
        "written_at": "2026-11-18T06:43:12.546Z",
        "note": null
      }
    ]
  },
  "disconnected_at": null,
  "webhook_url": null
}
Try it

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

List connection providers#

GET/v2/connection-providers
Response list of objects

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

  • object"connection_provider"
  • providerstring
  • namestring
  • kindConnectorClass
    "bank""cloud""ndstill_card_program""card_program""spend_platform""ai_provider""ai_gateway""wallet""checkout""card_network""accounting"
  • descriptionstring
  • methodsConnectMethod[]
    ConnectMethod: 7 fields
    • modestring enum
      "api_key""authorization_webhook""oauth""proxy""admin_key""policy_api""billing_export"
    • labelstring
    • control_levelControlLevel

      Control level you get with every scope granted.

      "authorize""issue""observe_stop"
    • scopesScopeSpec[]
      ScopeSpec: 4 fields
      • scopestring
      • whystring

        Why ndStill asks for it, in plain words.

      • requiredboolean
      • withoutstring

        What changes without it ("The control level drops from Authorize to Observe & stop").

    • credential_labelstringoptional

      For key-based methods: the field label and a hint ("Starts with sk_ or rk_").

    • credential_hintstringoptional
    • setup_stepsstring[]optional

      What to set up at the provider, in order (keys to create, a webhook endpoint, a timeout setting).

  • stopobject

    Measured stop time across ndStill for this provider (null p90 = not measured yet).

    3 fields
    • p50_msnumber | null
    • p90_msnumber | null
    • samplesnumber
  • connectednumber

    Connections this org already has with the provider.

  • availableboolean

    False = listed so people know it is planned; can't be connected yet.

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/connection-providers" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "object": "connection_provider",
      "provider": "anthropic",
      "name": "Anthropic",
      "kind": "ai_provider",
      "description": "Your Anthropic (Claude Console) organization, through an Admin API key. You create one API key per agent in the Console and link it; ndStill reads each key's usage about every minute, estimates dollars from a dated price table, reconciles them with Anthropic's billed cost, and pauses an agent's key when you freeze it.",
      "methods": [
        {
          "mode": "admin_key",
          "label": "Admin API key",
          "control_level": "observe_stop",
          "scopes": [
            {
              "scope": "usage:read",
              "why": "Read token usage and billed cost per API key, so every agent's spend is counted.",
              "required": true,
              "without": "ndStill can't see Anthropic spend."
            },
            {
              "scope": "api_keys:read",
              "why": "List API keys, so each key is matched to its agent.",
              "required": true,
              "without": "ndStill can't tell which agent spent what."
            },
            {
              "scope": "api_keys:write",
              "why": "Set an agent's key inactive when you freeze, and active again when you unfreeze.",
              "required": false,
              "without": "A freeze can only alert you; the key keeps working."
            }
          ],
          "credential_label": "Admin API key",
          "credential_hint": "An Anthropic Admin API key (sk-ant-admin…) from an organization admin: Claude Console → Settings → Admin keys. Individual accounts can't create one. Demo: keys with \"readonly\" fail the check; keys with \"restricted\" miss a scope.",
          "setup_steps": [
            "An organization admin creates an Admin API key in the Claude Console: Settings → Admin keys (sk-ant-admin…).",
            "Paste it below. ndStill checks what it can read and change, without creating anything.",
            "After connecting, create one API key per agent in the Console, then link each one to its agent by key ID on this connection's page."
          ]
        }
      ],
      "stop": {
        "p50_ms": 1500,
        "p90_ms": 2200,
        "samples": 19
      },
      "connected": 1,
      "available": true
    },
    {
      "object": "connection_provider",
      "provider": "aws",
      "name": "AWS billing",
      "kind": "cloud",
      "description": "AWS billing exports and IAM. ndStill sees cloud spend hours later and can detach an agent's role.",
      "methods": [
        {
          "mode": "billing_export",
          "label": "Billing export role",
          "control_level": "observe_stop",
          "scopes": [
            {
              "scope": "billing:read",
              "why": "Read billing exports.",
              "required": true,
              "without": "ndStill can't see cloud spend."
            },
            {
              "scope": "iam:detach",
              "why": "Detach an agent's IAM role when you freeze.",
              "required": false,
              "without": "A freeze can only alert you; access stays until someone removes it."
            }
          ],
          "credential_label": "IAM role ARN",
          "credential_hint": "arn:aws:iam::<account>:role/<name>. Demo: ARNs with \"readonly\" miss a scope."
        }
      ],
      "stop": {
        "p50_ms": null,
        "p90_ms": null,
        "samples": 0
      },
      "connected": 1,
      "available": true
    },
    {
      "object": "connection_provider",
      "provider": "coinbase_cdp",
      "name": "Coinbase CDP",
      "kind": "wallet",
      "description": "Agent wallets on Coinbase CDP. ndStill co-signs each transfer against an approved decision.",
      "methods": [
        {
          "mode": "policy_api",
          "label": "API key and wallet policy",
          "control_level": "authorize",
          "scopes": [
            {
              "scope": "wallets:sign",
              "why": "Co-sign wallet transactions after an approved decision.",
              "required": true,
              "without": "ndStill can't approve wallet payments."
            },
            {
              "scope": "policies:write",
              "why": "Write the wallet's native policy from yours.",
              "required": false,
              "without": "The wallet keeps its own policy; ndStill still co-signs each payment."
            }
          ],
          "credential_label": "CDP API key name",
          "credential_hint": "organizations/…/apiKeys/…. Demo: keys with \"restricted\" miss a scope."
        }
      ],
      "stop": {
        "p50_ms": 1200,
        "p90_ms": 2000,
        "samples": 22
      },
      "connected": 1,
      "available": true
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total": 12
}
Try it

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

List a connection's events#

GET/v2/connections/{id}/events
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Query parameters all optional
  • 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 objects

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"connection_event"
  • connection_idId
  • atTimestamp
  • kindstring enum
    "freeze""test""credential""webhook""sync""limit_write""health""connect""disconnect"
  • titlestring
  • detailstring | null
  • okboolean
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.

  • 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/connections/con_01KW0P2WMEQNDEC441S2F7SYQZ/events" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "cev_066a3c89db041cdd0f9d",
      "object": "connection_event",
      "connection_id": "con_01KW0P2WMEQNDEC441S2F7SYQZ",
      "at": "2026-11-22T20:29:12.531Z",
      "kind": "sync",
      "title": "Synced 50 transactions",
      "detail": "Finished in 1.2 s.",
      "ok": true
    },
    {
      "id": "cev_759000d02f716db93d64",
      "object": "connection_event",
      "connection_id": "con_01KW0P2WMEQNDEC441S2F7SYQZ",
      "at": "2026-11-22T19:30:12.531Z",
      "kind": "health",
      "title": "Probe passed in 307 ms",
      "detail": null,
      "ok": true
    },
    {
      "id": "cev_02d54a2f635ca9c96b97",
      "object": "connection_event",
      "connection_id": "con_01KW0P2WMEQNDEC441S2F7SYQZ",
      "at": "2026-11-22T11:59:12.531Z",
      "kind": "sync",
      "title": "Synced 76 transactions",
      "detail": "Finished in 5.1 s.",
      "ok": true
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total": 20
}
Try it

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

Get a connection's health#

GET/v2/connections/{id}/health
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response ConnectionHealth
  • statusstring enum
    "healthy""degraded""down"
  • error_ratenumber
  • latency_ms_p50number
  • last_probe_atTimestamp
  • last_sync_atTimestamp | null
  • messagestring | null

    Plain-language note when not healthy ("Transactions are syncing 40 minutes behind").

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/connections/con_01KW0P2WMEQNDEC441S2F7SYQZ/health" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "status": "healthy",
  "error_rate": 0.0028,
  "latency_ms_p50": 339,
  "last_probe_at": "2026-11-23T00:41:11.374Z",
  "last_sync_at": "2026-11-23T00:37:11.374Z",
  "message": null
}
Try it

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

Disconnect a connection#

POST/v2/connections/{id}/disconnect
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body JSON
  • reasonstring
Response Connection

The same Connection object as Create a connection.

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 only (not run: it changes the org for good)
Request
curl -X POST "https://api.ndstill.com/v2/connections/con_01KW0P2WMEQNDEC441S2F7SYQZ/disconnect" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
Try it

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

Sync a connection#

POST/v2/connections/{id}/sync
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response Connection

The same Connection object as Create a connection.

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/connections/con_01KW0P2WMEQNDEC441S2F7SYQZ/sync" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "id": "con_01KW0P2WMEQNDEC441S2F7SYQZ",
  "object": "connection",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-06-26T00:43:11.374Z",
  "provider": "anthropic",
  "provider_name": "Anthropic",
  "label": "Anthropic Console admin key",
  "kind": "ai_provider",
  "mode": "admin_key",
  "control_level": "observe_stop",
  "capabilities": [
    {
      "capability": "authorize_realtime",
      "supported": false,
      "control_level": null,
      "note": "Approve each payment isn't available on Anthropic"
    },
    {
      "capability": "issue_credential",
      "supported": true,
      "control_level": "issue"
    },
    {
      "capability": "set_limits",
      "supported": true,
      "control_level": "issue"
    }
  ],
  "rails": [
    "ai"
  ],
  "status": "connected",
  "health": {
    "status": "healthy",
    "error_rate": 0.0028,
    "latency_ms_p50": 339,
    "last_probe_at": "2026-11-23T00:43:13.553Z",
    "last_sync_at": "2026-11-23T00:43:13.559Z",
    "message": null
  },
  "stop": {
    "p50_ms": 1500,
    "p90_ms": 2200,
    "samples": 19
  },
  "freeze_action": {
    "action": "Pause API key",
    "done_label": "key paused",
    "reversible": true,
    "note": null
  },
  "link_credential": {
    "label": "API key ID",
    "hint": "From Claude Console → Settings → API keys: the key's ID (apikey_…), not the key itself."
  },
  "scopes": [
    "usage:read",
    "api_keys:read",
    "api_keys:write"
  ],
  "native_limits": [
    {
      "label": "Workspace spend limit",
      "value": "Synced from the team budget"
    }
  ],
  "cant_express": [
    "Per-request limits (usage is read after the fact)"
  ],
  "agents_using": 6,
  "spend_mtd": {
    "amount": 568838,
    "asset": "USD"
  },
  "sync": {
    "mode": "poll",
    "lag_seconds": 138,
    "events_24h": 283,
    "next_sync_at": "2026-11-23T00:44:00.000Z",
    "interval_seconds": 60,
    "cursor": "cur_c4b5d7194db058ad"
  },
  "projection": {
    "status": "in_sync",
    "policy_version": "sha256:fb4b3596a83c",
    "written_at": "2026-11-22T22:43:13.559Z",
    "items": [
      {
        "rule": "Workspace spend limit",
        "native_field": "",
        "value": "Synced from the team budget",
        "status": "in_sync",
        "written_at": "2026-11-15T03:43:13.559Z",
        "note": null
      },
      {
        "rule": "Code reviewer: $5,000.00 a month",
        "native_field": "workspace.spend_limit (monthly)",
        "value": "$5,000.00",
        "status": "in_sync",
        "written_at": "2026-11-17T20:43:13.559Z",
        "note": null
      },
      {
        "rule": "Content writer: $4,500.00 a month",
        "native_field": "workspace.spend_limit (monthly)",
        "value": "$4,500.00",
        "status": "in_sync",
        "written_at": "2026-11-18T06:43:13.559Z",
        "note": null
      }
    ]
  },
  "disconnected_at": null,
  "webhook_url": null
}
Try it

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

Test a connection#

POST/v2/connections/{id}/test
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response ConnectionTestResult
  • object"connection_test"
  • okboolean
  • checksobject[]
    3 fields
    • namestring
    • okboolean
    • messagestring
  • notesstring[]optional

    What the provider reported that doesn't fail the test (a deprecation, rate limiting).

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/connections/con_01KW0P2WMEQNDEC441S2F7SYQZ/test" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "object": "connection_test",
  "ok": true,
  "checks": [
    {
      "name": "Credentials",
      "ok": true,
      "message": "Accepted by the provider"
    },
    {
      "name": "Scopes",
      "ok": true,
      "message": "3 scopes granted"
    },
    {
      "name": "Webhook or sync",
      "ok": true,
      "message": "Events arriving on time"
    }
  ],
  "notes": []
}
Try it

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

Check provider credentials#

POST/v2/connections/check
Request body CredentialCheckBody
  • providerstringrequired
  • modestring enumrequired
    "api_key""authorization_webhook""oauth""proxy""admin_key""policy_api""billing_export"
  • credentialstringrequired
Response CredentialCheckResult
  • object"credential_check"
  • okboolean
  • key_hintstring

    Masked key ("rk_test_…9Qz4").

  • grantedstring[]
  • missingScopeSpec[]
    ScopeSpec: 4 fields
    • scopestring
    • whystring

      Why ndStill asks for it, in plain words.

    • requiredboolean
    • withoutstring

      What changes without it ("The control level drops from Authorize to Observe & stop").

  • control_levelstring enum

    The control level you'd get with these scopes (null = can't connect).

    null"authorize""issue""observe_stop"
  • messagestring
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/connections/check" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "anthropic",
    "credential": "sk-ant-admin-example"
  }'
Response 200
{
  "object": "credential_check",
  "ok": true,
  "key_hint": "sk-ant-a…mple",
  "granted": [
    "usage:read",
    "api_keys:read",
    "api_keys:write"
  ],
  "missing": [],
  "control_level": "observe_stop",
  "message": "Key accepted. Every scope ndStill asks for is granted."
}
Try it

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