DCDIGITAL CREDITAGENT TRUST NETWORK

DIGITAL CREDIT NETWORK / API V1

Build against the working foundation.

Create agent and merchant records, test policy decisions with play money, inspect private Trust evidence, and read owner-approved verification data.

API availableVersioned path /api/v1JSON responses
00

FIVE-MINUTE START

Evaluate one synthetic purchase

This public request needs no account or API key. It uses the production policy evaluator but creates no tenant, payment, credit, reservation, or durable audit record.

POST/api/v1/public/simulationPublic · synthetic input only
curl 'https://digitalcreditnetwork.ca/api/v1/public/simulation' \
  -H 'Origin: https://digitalcreditnetwork.ca' \
  -H 'Content-Type: application/json' \
  --data '{
    "agent":{"name":"Research Agent"},
    "merchant":{"id":"dataset-market","category":"research"},
    "amount":{"minor":2500,"currency":"USD"},
    "policy":{
      "daily_limit_minor":10000,
      "monthly_limit_minor":50000,
      "max_transaction_minor":5000,
      "human_approval_threshold_minor":2000,
      "approved_categories":["research"],
      "approved_merchants":[],
      "blocked_merchants":["blocked-store"]
    },
    "synthetic_usage":{"daily_spent_minor":0,"monthly_spent_minor":0}
  }'

The response should report requires_human_review with reason code human_approval_threshold. Change amount.minor to 1000 for an allowed result, or change the merchant ID to blocked-store for a denied result.

Move into a private workspace

  1. Create a workspace and finish the guided setup.
  2. Register an agent, apply a policy template, and add play-money funding.
  3. Submit a simulated purchase, review threshold cases, and inspect its receipt and audit evidence.
  4. Use a machine credential or read-only Trust API key only after the human-controlled workflow is understood.

Amounts are integer minor units: 2500 means USD 25.00. Public requests are limited to 30 per hour per source. See the Trust Center for current security and operating boundaries.

01

GET ACCESS

Authentication

Workspace routes use a human atn_session cookie. The login response sets it as HttpOnly; send it back on later calls. JSON writes require Content-Type: application/json and an Origin matching this site. Organization UUIDs identify a resource but never grant access. Use your own account and IDs from GET /api/v1/me.

POST/api/v1/auth/loginHuman session
curl -i -c session.cookies 'https://digitalcreditnetwork.ca/api/v1/auth/login' \
  -H 'Origin: https://digitalcreditnetwork.ca' \
  -H 'Content-Type: application/json' \
  --data '{"email":"you@example.com","password":"YOUR_PASSWORD"}'

curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/me'

Keep cookies and API keys out of logs and source control. Recovery delivery is configured, but each account must verify its email and confirm a live inbox drill before it is recovery-ready.

External verification key

An organization owner can create a read-only key in Workspace → Organization → Trust API, or with the session route below. The response shows the secret once. It expires after 90 days and allows 60 verification reads per minute. It cannot create agents, simulate transactions, or read private Trust evidence.

POST/api/v1/organizations/{orgId}/trust-api-keysOwner session
curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/trust-api-keys' \
  -H 'Origin: https://digitalcreditnetwork.ca' \
  -H 'Content-Type: application/json' \
  --data '{"name":"Verification service"}'

Revoke with DELETE /api/v1/organizations/{orgId}/trust-api-keys/{keyId} and an empty JSON object. Keys are scoped to their issuing organization.

02

SIGNED AGENT ACCESS

Machine identity

Create a credential from an agent's Machine Agent Gateway panel. The browser generates an Ed25519 key pair and sends only the public key to the platform. Save the private key when it appears; the platform cannot recover it. Credentials expire after 30 days and support immediate revocation.

GET/api/v1/agent-gateway/whoamiSigned agent request

Sign GET\n/api/v1/agent-gateway/whoami\nTIMESTAMP\nNONCE\nSHA256_EMPTY_BODY and send the public agent ID, credential ID, ISO timestamp, unique nonce, and base64url signature in the X-DCN-Agent-ID, X-DCN-Key-ID, X-DCN-Timestamp, X-DCN-Nonce, and X-DCN-Signature headers.

Timestamps have a five-minute window and a nonce can be used only once. The only current scope is agent:identity:read. Successful authentication proves the registered machine identity but grants no autonomous action, payment, or credit authority.

03

WORKSPACE RECORDS

Agent creation

Create an organization-owned record using a human session. The response includes an internal UUID (agent.id) for private routes and a permanent public ID (agent.public_agent_id, such as AR-000001) for optional external verification. Creation does not launch an autonomous process.

POST/api/v1/organizations/{orgId}/agentsOwner, admin, or manager
curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/agents' \
  -H 'Origin: https://digitalcreditnetwork.ca' \
  -H 'Content-Type: application/json' \
  --data '{"name":"Research Agent","description":"Evaluates sample market data"}'

Agent creation provisions zero-balance USD and CAD simulation accounts and a platform registration record marked unverified. The organization must be active. Read or manage records with GET /organizations/{orgId}/agents and the agent UUID.

03

EXTERNAL READ

Agent verification

Owners must publish an Agent Digital Passport that explicitly includes public_agent_id. A verification key can then read only that organization's selected fields. Optional status, platform identity, and a saved historical Trust summary appear only if shared in the passport. A private, foreign, revoked, or unavailable agent returns the same 404.

GET/api/v1/agents/{publicAgentId}/verificationBearer verification key
curl 'https://digitalcreditnetwork.ca/api/v1/agents/AR-000001/verification' \
  -H 'Authorization: Bearer YOUR_READ_ONLY_KEY'
Response shape
{
  "verification": {
    "agent_id": "AR-000001",
    "identity_verified": false,
    "owner_verified": false,
    "risk_level": "not_assessed",
    "credit_rating": "unavailable",
    "real_payments_enabled": false,
    "trust_basis": "owner_published_snapshot",
    "published_at": "2026-10-05T12:00:00.000Z",
    "shared_fields": ["public_agent_id"],
    "disclosure_notice": "Platform registration does not verify this agent, its owner or capabilities. No credit rating, independent reputation, real payments or real-world risk assessment is provided."
  }
}

The timestamp and ID above illustrate the shape. They are not a live agent. The endpoint never returns private owner, permission, balance, or receipt data.

04

PLAY MONEY

Simulation requests

Requests require an active agent, a human owner/admin or its managing user, the payment.execute local grant, a matching spending rule, and enough play money. Registered merchants add their own requirements. Policy may settle, decline, or require human review. It cannot transfer real funds. Check GET /api/v1/organizations/{orgId}/payment-providers for the active simulation adapter and unavailable future provider slots.

POST/api/v1/organizations/{orgId}/agents/{agentId}/simulation/requestsHuman session
curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/agents/AGENT_UUID/simulation/requests' \
  -H 'Origin: https://digitalcreditnetwork.ca' \
  -H 'Content-Type: application/json' \
  --data '{"currency":"USD","amount_minor":125,"idempotency_key":"demo-request-0001","merchant_id":"research_vendor","category":"research"}'

Amounts are integer minor units: 125 means USD 1.25. Supply a unique idempotency key of 8–100 allowed characters. Reuse with a different payload or actor returns 409. An owner can add bounded play money with POST .../simulation/funding; funding accepts currency, amount_minor, and idempotency_key. An owner reviews a pending request with POST .../simulation/requests/{operationId}/decision and {"action":"approve"}; current controls are checked again.

Possible operation states
settleddeclinedpending_reviewcancelledexpired
05

SIMULATION CONTROLS

Merchants

Create a tenant-scoped simulated merchant. Its permanent MR- ID is accepted by spending rules and request payloads. The supplied category must match the record. Payment options are simulated USD/CAD only, and verification remains unverified.

POST/api/v1/organizations/{orgId}/merchantsOwner or admin session
curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/merchants' \
  -H 'Origin: https://digitalcreditnetwork.ca' \
  -H 'Content-Type: application/json' \
  --data '{"name":"Sample Research","description":"Sandbox only","category":"research","max_transaction_minor":500,"min_trust_score":null,"required_scopes":[],"require_verified_identity":false,"payment_options":["simulated_usd"]}'

Owners can optionally require registered merchants at PUT /organizations/{orgId}/merchant-policy with require_registered_merchants and the current expected_version. Merchant edits also require the current version. A verified-identity requirement will deny simulations because external identity verification is unavailable.

06

EXPLAINABLE EVIDENCE

Trust evidence

The private endpoint calculates current simulation evidence without saving it. An authorized manager can save an immutable assessment with an empty JSON object. It needs five eligible terminal requests to score; the model is capped at 60/100 and always has low confidence. A saved score is historical and does not authorize requests or represent a credit rating.

GET/api/v1/organizations/{orgId}/agents/{agentId}/trustMember session
curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/agents/AGENT_UUID/trust'
POST/api/v1/organizations/{orgId}/agents/{agentId}/trust/assessmentsOwner, admin, or owning manager
curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/agents/AGENT_UUID/trust/assessments' \
  -H 'Origin: https://digitalcreditnetwork.ca' \
  -H 'Content-Type: application/json' \
  --data '{}'

Use GET .../trust/assessments for saved history. To disclose a historical summary externally, the owner must select trust_score when publishing a passport; the verification key itself grants no broader Trust access.

07

SANDBOX LEDGER

Digital credit sandbox

Every agent has separate USD and CAD simulated credit accounts. Organization members can read the limit, outstanding amount, available amount, utilization, and immutable event history. Owners can set a sandbox limit and record a simulated draw or repayment with an expected version and idempotency key. These events do not move funds or authorize payments. Real credit and credit ratings remain unavailable.

GET/api/v1/organizations/{orgId}/agents/{agentId}/creditMember session
POST/api/v1/organizations/{orgId}/agents/{agentId}/credit/{currency}/eventsOwner session
curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/agents/AGENT_UUID/credit/USD/events' \
  -H 'Origin: https://digitalcreditnetwork.ca' \
  -H 'Content-Type: application/json' \
  --data '{"action":"limit_set","amount_minor":10000,"expected_version":0,"idempotency_key":"unique-setup-key"}'

Allowed actions are limit_set, draw, and repayment. Values are integer minor units. Read the account before writing to obtain its current version.

08

CONTROLLED SERVICE EXCHANGE

Agent-to-agent commerce

Two active agents in one organization can follow a human-controlled request, quote, payment, and delivery workflow. Payment authorization rechecks platform identity records, payment.execute, spending limits and allowlists, current play-money balance, human review threshold, and risk evidence. An accepted payment debits the requester and credits the provider atomically. Trust evidence is visible but does not authorize the decision.

POST/api/v1/organizations/{orgId}/commerceAgent manager session
curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/commerce' \
  -H 'Origin: https://digitalcreditnetwork.ca' \
  -H 'Content-Type: application/json' \
  --data '{"requester_agent_id":"AGENT_A_UUID","provider_agent_id":"AGENT_B_UUID","service":"Summarize the research packet","category":"research","currency":"USD"}'

Use the returned order ID with /quote, /authorize, /deliver, or /cancel. Every transition needs the current version; authorization also needs an idempotency key. This is same-organization play-money commerce. No real payment, autonomous execution, escrow, dispute handling, or hosted service delivery exists.

09

DELIVERY-BACKED FEEDBACK

Internal reputation

After a simulated service is delivered, an authorized manager of the requester agent can submit one immutable 1–5 rating, controlled tags, and a private comment. Aggregates include the rating count, average, and full distribution.

GET/api/v1/organizations/{orgId}/reputationMember session
POST/api/v1/organizations/{orgId}/reputation/attestationsRequester agent manager

This is internal simulation feedback. It is not externally verified and does not change Trust Scores, credit, payments, permissions, or authorization.

09

INTERNAL EVIDENCE

Security ecosystem

Record organization security monitors and human-submitted alerts for websites, APIs, software, infrastructure, agent behavior, transactions, and vulnerabilities. Agent-attributed alerts enter new Trust evidence snapshots with a bounded severity deduction. Resolved alerts remain visible and retain half weight.

GET/api/v1/organizations/{orgId}/securityMember session
POST/api/v1/organizations/{orgId}/security/alertsSecurity contributor

No scanner or external security feed is connected. These records are not independently verified findings, and they never authorize payments or set credit.

10

OPT-IN DISCOVERY

Organization network

Organizations can publish a minimal directory profile and establish bilateral partner connections. Profiles expose only the organization name, description, and selected capability labels. Connection requests require an explicit decision by the target organization.

GET/api/v1/organizations/{orgId}/networkMember session
PUT/api/v1/organizations/{orgId}/network/profileOwner or admin

Connections grant no access to private agents, merchants, Trust evidence, balances, credentials, or payments. Cross-organization commerce remains unavailable.

11

ROLE-AWARE WORK

Operations Action Center

Read one current queue of work assigned to the signed-in member's role. It includes eligible simulated transaction reviews, commerce steps, incoming network requests, open internal security alerts, and missing agent controls. Completed and expired work is excluded.

GET/api/v1/organizations/{orgId}/dashboard/actionsMember session
curl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/dashboard/actions'

The endpoint is read only and accepts no filters. Viewers receive an empty queue. It never returns security evidence, authorization evidence, payload hashes, credentials, or cross-organization private records.

12

RETAINED DECISIONS

Approval register

Owners and administrators can inspect durable approval cases and their immutable event timelines. Each case records its assigned role, deadline, version, separation requirement, final decision, decision maker, and an evidence hash. Private policy evidence is not returned.

GET/api/v1/organizations/{orgId}/approvalsOwner or admin session

Read a single case at /approvals/{approvalId}. Decide it through the simulation request decision route listed in the case response so current authorization controls are checked again before any play-money settlement.

13

EVENT DELIVERY

Signed webhooks and verifier responses

Owners and administrators can register a verified HTTPS destination for approval, security, assessment, and verifier-renewal events. Activation requires a direct challenge response; redirects and private-style hostnames are rejected. Renewal events include bounded identifiers, policy version, package hash, due time, and an authenticated manual-package path without package contents or key material.

POST/api/v1/organizations/{orgId}/webhooksOwner or admin session

Each delivery includes X-DCN-Event-ID, X-DCN-Timestamp, and X-DCN-Signature. Verify the HMAC-SHA256 signature over TIMESTAMP.payload, reject stale timestamps, and deduplicate event IDs. Failed deliveries retry with backoff and become dead letters after five attempts. Delivery draining is operator-driven in this phase.

An owner may also issue an expiring, one-time portal link for an approved verifier. The portal shows the exact canonical statement, keeps signing outside DCN, and submits the Ed25519 signature with the invitation as a bearer token. The secret stays after the URL fragment marker and is removed from browser history on load. It grants no workspace access, is stored only as a hash, and is consumed after one accepted response.

POST/api/v1/launch-evidence-renewals/{requestId}/respondOne-time verifier token

Accepted responses are immutable. They may restore the configured verifier quorum, but the organization owner must still explicitly complete the renewal request. Owners can inspect invitation status, revoke an unused link, or replace it with a new generation; replacement invalidates the prior token immediately and the new portal link is shown once. Independent verifiers can use the public integration kit to sign locally, run the deterministic Ed25519 test vector, and validate the returned receipt.

14

EVIDENCE PORTABILITY

Audit evidence exports

Owners can create an immutable JSON evidence package for an explicit UTC range of up to 500 retained organization events. The package includes an allowlisted event projection, manifest, audit-chain boundary hashes, and SHA-256 package hash.

POST/api/v1/organizations/{orgId}/audit-exportsOwner session

The response shows a seven-day auditor token once. Use it as a Bearer token with the returned read-only URL. Access can be revoked. Packages have no independent timestamp anchor or external certification.

08

OPERATING THE API

Errors & limits

Errors have the JSON shape {"error":"message"}. Treat HTTP status as authoritative. A request may return a reason code inside a successful simulated operation; for example, a denied policy decision is a recorded operation, not necessarily an HTTP error.

HTTPMeaningAction
400Invalid body, filter, or parameterCorrect the request.
401Missing or invalid session/keySign in or rotate the key.
403Current member lacks the required role or origin is invalidCheck role and serving origin.
404Absent or undisclosed resourceUse an authorized ID. Private verification targets deliberately look identical to missing ones.
405Method unavailableUse a listed method.
409Stale version, conflicting idempotency key, or lifecycle conflictRead current state before retrying.
413 / 415Body too large / wrong content typeSend bounded JSON.
429Rate limitWait for the one-minute window.
503Capability unavailableCheck availability; password reset delivery is not configured.

Verification allows 60 reads per key per minute; invalid credentials are limited separately. Mutations have a 16 KiB body limit. Responses are not cached.

09

REFERENCE

Use the contract

The OpenAPI document covers the routes on this page. Other workspace administration routes are described in the project's source documentation. The application has no official SDK yet.