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/v1JSON responsesFIVE-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.
/api/v1/public/simulationPublic · synthetic input onlycurl '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
- Create a workspace and finish the guided setup.
- Register an agent, apply a policy template, and add play-money funding.
- Submit a simulated purchase, review threshold cases, and inspect its receipt and audit evidence.
- 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.
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.
/api/v1/auth/loginHuman sessioncurl -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.
/api/v1/organizations/{orgId}/trust-api-keysOwner sessioncurl -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.
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.
/api/v1/agent-gateway/whoamiSigned agent requestSign 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.
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.
/api/v1/organizations/{orgId}/agentsOwner, admin, or managercurl -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.
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.
/api/v1/agents/{publicAgentId}/verificationBearer verification keycurl 'https://digitalcreditnetwork.ca/api/v1/agents/AR-000001/verification' \
-H 'Authorization: Bearer YOUR_READ_ONLY_KEY'{
"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.
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.
/api/v1/organizations/{orgId}/agents/{agentId}/simulation/requestsHuman sessioncurl -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.
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.
/api/v1/organizations/{orgId}/merchantsOwner or admin sessioncurl -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.
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.
/api/v1/organizations/{orgId}/agents/{agentId}/trustMember sessioncurl -b session.cookies 'https://digitalcreditnetwork.ca/api/v1/organizations/ORG_UUID/agents/AGENT_UUID/trust'/api/v1/organizations/{orgId}/agents/{agentId}/trust/assessmentsOwner, admin, or owning managercurl -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.
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.
/api/v1/organizations/{orgId}/agents/{agentId}/creditMember session/api/v1/organizations/{orgId}/agents/{agentId}/credit/{currency}/eventsOwner sessioncurl -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.
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.
/api/v1/organizations/{orgId}/commerceAgent manager sessioncurl -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.
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.
/api/v1/organizations/{orgId}/reputationMember session/api/v1/organizations/{orgId}/reputation/attestationsRequester agent managerThis is internal simulation feedback. It is not externally verified and does not change Trust Scores, credit, payments, permissions, or authorization.
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.
/api/v1/organizations/{orgId}/securityMember session/api/v1/organizations/{orgId}/security/alertsSecurity contributorNo scanner or external security feed is connected. These records are not independently verified findings, and they never authorize payments or set credit.
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.
/api/v1/organizations/{orgId}/networkMember session/api/v1/organizations/{orgId}/network/profileOwner or adminConnections grant no access to private agents, merchants, Trust evidence, balances, credentials, or payments. Cross-organization commerce remains unavailable.
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.
/api/v1/organizations/{orgId}/dashboard/actionsMember sessioncurl -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.
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.
/api/v1/organizations/{orgId}/approvalsOwner or admin sessionRead 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.
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.
/api/v1/organizations/{orgId}/webhooksOwner or admin sessionEach 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.
/api/v1/launch-evidence-renewals/{requestId}/respondOne-time verifier tokenAccepted 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.
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.
/api/v1/organizations/{orgId}/audit-exportsOwner sessionThe 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.
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.
| HTTP | Meaning | Action |
|---|---|---|
| 400 | Invalid body, filter, or parameter | Correct the request. |
| 401 | Missing or invalid session/key | Sign in or rotate the key. |
| 403 | Current member lacks the required role or origin is invalid | Check role and serving origin. |
| 404 | Absent or undisclosed resource | Use an authorized ID. Private verification targets deliberately look identical to missing ones. |
| 405 | Method unavailable | Use a listed method. |
| 409 | Stale version, conflicting idempotency key, or lifecycle conflict | Read current state before retrying. |
| 413 / 415 | Body too large / wrong content type | Send bounded JSON. |
| 429 | Rate limit | Wait for the one-minute window. |
| 503 | Capability unavailable | Check 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.
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.