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

Replay uploads API

Upload a CSV or provider export and replay it against a policy version.

4 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 replay upload#

POST/v2/replay-uploads
Request body ReplayUploadCreate
  • filenamestringrequired
  • csvstringrequired
Response ReplayUpload
  • idId
  • object"replay_upload"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

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

  • filenamestring
  • rowsnumber
  • errorsobject[]

    Rows that couldn't be read, with the line number and why (first 20).

    2 fields
    • linenumber
    • messagestring
  • columnsstring[]
  • fromTimestamp | null
  • toTimestamp | null
  • totalMoney

    An amount: integer minor units + asset.

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

    Rows that match a stored payment (they open the payment drawer).

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/replay-uploads" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "example",
    "csv": "example"
  }'
Response 400
{
  "object": "error",
  "type": "invalid_request",
  "code": "invalid_request",
  "message": "The header is missing date, agent, counterparty, amount, outcome.",
  "request_id": "req_25906ef9e81d9d0d7832",
  "fields": {
    "file": "Columns needed: date, agent, counterparty, amount, outcome (asset, rail and intent_id are optional)."
  }
}

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 replay uploads#

GET/v2/replay-uploads
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 ReplayUpload

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 ReplayUpload object as Create a replay upload.

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/replay-uploads?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [],
  "has_more": false,
  "next_cursor": null,
  "total": 0
}
Try it

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

Retrieve a replay upload#

GET/v2/replay-uploads/{id}
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response ReplayUpload

The same ReplayUpload object as Create a replay upload.

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/replay-uploads/{id}" \
  -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.

Replay an upload against a policy#

POST/v2/replay-uploads/{id}/replay
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body ReplayUploadRun
  • policy_idIdrequired
  • policy_version_idIdrequired
Response ReplayResult
  • idId
  • object"replay"
  • policy_idId
  • policy_version_idId
  • fromTimestamp
  • toTimestamp
  • decisions_replayednumber
  • changednumber
  • totalsobject
    5 fields
    • newly_heldnumber
    • newly_declinednumber
    • newly_allowednumber
    • amount_blockedMoney

      An amount: integer minor units + asset.

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

      An amount: integer minor units + asset.

      Money: 2 fields
      • amountnumber
      • assetAssetCode
        "USD""USDC""EUR""GBP"
  • samplesobject[]
    7 fields
    • intent_idId
    • agentRef

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

      Ref: 2 fields
      • idId
      • namestring
    • counterpartystring
    • amountMoney

      An amount: integer minor units + asset.

      Money: 2 fields
      • amountnumber
      • assetAssetCode
        "USD""USDC""EUR""GBP"
    • beforeDecisionOutcome
      "approve""hold""decline"
    • afterDecisionOutcome
      "approve""hold""decline"
    • reasonstring
  • created_atTimestamp
  • upload_idId | nulloptional

    Set when the replay ran over an uploaded CSV instead of stored decisions.

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/replay-uploads/{id}/replay" \
  -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.