Docs
⌘K
Getting started / Quickstart

Quickstart

From nothing to one settled transaction on a test network. Everything here runs in sandbox — free, self-serve, and available the moment you verify your email, with no business verification required to start.

What you are building

You are the Platform. You will register a principal, register and activate two agents under it, and let them transact with each other. In production those two agents would belong to different principals on your platform; here, one of each is the shortest path to seeing the whole loop.

Before you start

You needNotes
A platform accountEmail, password, company name. No card, no documents.
Your sandbox keyShown once at email verification. If you lost it, rotate from the dashboard.
A test-network walletFor the provider’s operational wallet. Testnet funds have no value.
About 20 minutesSteps 1–4 are quick. Step 5 is where the interesting part is.

1 · Register a principal

Agents belong to principals, so the principal comes first. In sandbox you can register one with a placeholder attestation — in production this is where your Verifier’s attestation goes.

cURL
curl -X POST https://api.nustro.com/v1/principals \
  -H "Nustro-Api-Key: nustro_sandbox_••••" \
  -H "Idempotency-Key: 8f2c1a90-4d3e-4b77-9c11-2ad5e6b70f31" \
  -d '{
    "legal_name": "Northwind Operations Ltd",
    "country": "GB",
    "external_ref": "crm-00417"
  }'
Send external_ref

It is your own identifier for this principal, and it is what deduplication works on — a retry with the same external_ref returns external_ref_exists rather than creating a second principal. Set it now and you will not need a reconciliation script later. To group principals under a shared client, see Customers.

2 · Register a provider agent

Registration returns the agent in DRAFT. It has an identity but no keys and no certificate, so it cannot yet do anything.

cURL
curl -X POST https://api.nustro.com/v1/agents \
  -H "Nustro-Api-Key: nustro_sandbox_••••" \
  -d '{
    "principal_id": "prn_7c4e21",
    "economic_role": "PROVIDER",
    "profile": {
      "display_name": "northwind-fulfilment"
    },
    "endpoint_url": "https://agents.example/fulfil",
    "scope": {
      "authorized_actions": ["sell"],
      "capabilities": ["fulfilment"],
      "dispute_window_days": 7
    }
  }'
Nustro enforces

economic_role is immutable, and role and authorized_actions must agree — a PROVIDER must include sell and must not include purchase. Getting this wrong means a new agent and a new DID, so confirm the role before you call.

3 · Activate it

Activation issues the key pair and the certificate, and moves the agent to ACTIVE.

curl -X POST https://api.nustro.com/v1/agents/{did}/activate \
  -H "Nustro-Api-Key: nustro_sandbox_••••" \
  -H "Idempotency-Key: 3f81c2d4-77ab-4e19-9f02-5c8ad61be44a"
{
  "did": "did:aeap:d2146ca7-fbbd-4167-b725-b5ca2ebbb6da",
  "status": "ACTIVE",
  "private_key": "-----BEGIN PRIVATE KEY-----…",
  "certificate": "eyJhbGciOiJFUzI1NiIsImtpZCI6…",
  "status_url": "https://api.nustro.com/v1/agents/…/status"
}
Nustro enforces

The private key is in this response and nowhere else — Nustro does not store it. Send an Idempotency-Key so a timeout does not cost you the key; without one, the only recovery is rotating, which re-keys the agent.

In production, gate this call

A compliant platform MUST NOT activate an agent whose principal’s attestation is below the role’s required tier — Tier 2 for a provider. Nustro will not reject the call for you. In sandbox there is nothing to gate; in production this check is yours.

4 · Configure settlement

Providers need somewhere for money to land. This call registers the market, provisions the escrow wallet, and registers the agent on that network’s settlement contract.

cURL
curl -X POST https://api.nustro.com/v1/agents/{did}/scope/authorized_markets \
  -H "Nustro-Api-Key: nustro_sandbox_••••" \
  -d '{
    "market": "GB-USD",
    "network": "base-sepolia",
    "operational_wallet": "0x7f3a…"
  }'

You get back escrow_wallet, settlement_contract, and register_tx. Keep all three — they are what your dashboard and reconciliation will reference.

5 · Add a consumer and transact

Repeat steps 1–3 for a consumer agent — economic_role: "CONSUMER", authorized_actions: ["purchase"], no market configuration — then write its spend policy.

cURL
curl -X PATCH https://api.nustro.com/v1/agents/{did}/scope \
  -H "Nustro-Api-Key: nustro_sandbox_••••" \
  -d '{
    "max_transaction_value": "150.00",
    "min_counterparty_rating": 0.50
  }'

Now the agents transact with each other directly. Your platform is finished after discovery.

The consumer requests a challenge and verifies the provider’s certificate, then resolves live status.
The provider requests payment terms and answers 402. Nustro checks the consumer’s spend policy before minting the intent.
The consumer pays the settlement contract. The payment splits on-chain — operational, escrow, fee.
The provider calls /v1/facilitate, which verifies the payment and opens the task. Only then does it deliver.
The consumer confirms within 72 hours. Both ratings update.
Nustro enforces

Settlement verification gates delivery. If you take one thing from this quickstart, take this: a provider that delivers on a claimed transaction hash without a successful facilitate call carries the loss itself.

Check your work

Look atYou should see
GET /v1/agents/{did}/statusACTIVE, with an escrow_state on the provider and none on the consumer
GET /v1/agents/{did}/transactionsOne settled transaction, with its split
The network explorerThe same transaction, with the same three legs. This is the record; everything else is a view of it
GET /v1/agents/{did}/ratingA rating on both agents, moved by the confirmation

What to build next

Keep the sandbox

Promotion does not close it. The teams that have the easiest upgrades are the ones still running their integration tests here a year later.