Sidecar API reference
Audience: engineers integrating or debugging a sidecar deployment. Source of truth: the interactive OpenAPI reference served by the running sidecar at
/reference. This page documents the protocol behaviour, token claims, error responses, and environment configuration behind each endpoint.
Base URL: your sidecar's internal URL (for example https://sidecar.internal.yourorg.com.kh). All request and response bodies use JSON (Content-Type: application/json), with a 20 MB maximum payload size.
Authentication
| Caller | Mechanism |
|---|---|
| Your core system | Headers x-api-key (key ID, sak_…) and x-api-secret. Manage keys through the Admin API (/api/v1/admin/api-keys). See Set up the sidecar, step 7. |
| Partner sidecars (via CamDX) | No API key. Authenticated via the auth token's ES512 signature, the Requester's ES512 request signature, and the X-Road-Client member code header. |
| Backoffice and admin scripts | Authorization: Bearer <admin JWT> from POST /api/v1/admin/auth/login, subject to RBAC role checks. |
Endpoints
| Method and path | Role | Caller | Auth | Success |
|---|---|---|---|---|
POST /api/v1/requester/token/request | Requester | Your core | API key | 200 |
POST /api/v1/requester/kyc/fetch | Requester | Your core | API key | 200 |
GET /api/v1/requester/kyc/{ekyc_ref} | Requester | Your core | API key | 200 |
GET /api/v1/requester/kyc/{ekyc_ref}/status | Requester | Your core | API key | 200 |
DELETE /api/v1/requester/kyc/{ekyc_ref} | Requester | Your core | API key | 204 |
POST /api/v1/provider/token/verify | Provider | Your core | API key | 200 |
POST /api/v1/provider/kyc/submit | Provider | Your core | API key | 201 |
POST /api/v1/provider/kyc/authorize | Provider | Your core | API key | 201 |
POST /api/v1/provider/kyc/invalidate | Provider | Your core | API key | 200 |
POST /api/v1/provider/kyc/resolve/t{0-3} | Provider | Requester sidecar via CamDX | Signatures + CamDX | 200 |
POST /api/v1/provider/kyc/status | Provider | Requester sidecar via CamDX | Request signature + CamDX | 200 |
GET /api/v1/provider/kyc/ping | Provider | Partner sidecar via CamDX | CamDX | 200 |
/api/v1/admin/* | Both | Backoffice / scripts | Admin JWT + role | – |
GET /health | Both | Monitoring | None | 200 |
GET /reference | Both | Developers | None | 200 |
Error format
All errors share a single JSON response format:
{ "status": "error", "error": "BadRequestException", "message": "Login token has expired" }
error | HTTP | Meaning |
|---|---|---|
ValidationError | 400 | Request body or parameters failed schema validation. A details array lists the Zod validation issues. |
BadRequestException | 400 | Protocol or business-rule check failed. message identifies the cause. |
UnauthorizedException | 401 | Missing, invalid, revoked, or expired API credentials or admin JWT. |
ForbiddenException | 403 | Insufficient admin role (or password change required). |
NotFoundException | 404 | Resource not found (for example an unknown ekyc_ref, attestation_ref, or admin record). |
ConflictException | 409 | kyc/submit called while an active attestation exists for the customer. |
InternalServerException | 500 | Downstream communication failure (CamDX, partner, Auth Portal, DNS, database) or internal error. |
Common error messages and fixes are documented in Troubleshooting.
Requester endpoints
POST /api/v1/requester/token/request
Issues a signed login token and creates a request session (token_issued).
Request
| Field | Type | Rules |
|---|---|---|
tier | integer | 0 to 3 |
callback | string | Absolute URL. The Auth Portal appends ?q={auth token} on approval. |
callback_type | string | web or mobile |
Response 200
{ "token": "eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9..." }
See Login token (ekyc_request_v1) for the token claims.
POST /api/v1/requester/kyc/fetch
Redeems an auth token with the Provider over CamDX, verifies the returned attestation, encrypts and stores it locally, and returns the result. Consumes the request session; subsequent calls for the same session fail.
Request
| Field | Type | Rules |
|---|---|---|
auth_token | string | The q query parameter from the Auth Portal callback |
tier | integer | 0 to 3, not exceeding the tier requested in the login token |
Execution flow
- Verifies the auth token: ES512 signature against
ekyc_pubkeys oniss,issregistered in the partner's domains,qr_typeequal toekyc_auth_v1, unexpired,audequal to yourISS_CODE, andiss_codematching an enabled Provider partner. - Locates the open, unexpired request session by
ref_id(token_issued) and confirmstierdoes not exceed the requested or authorised tier. - Looks up the enabled Provider partner by
camdx_codeandiss_code. - Calls
POST {CAMDX_SECURITY_SERVER}/{provider member code}/resolve/t{tier}withX-Road-Client: {CAMDX_MEMBER_CODE}and body{ auth_token, signature }, wheresignatureis the base64 ES512 (SHA-512) signature overauth_tokensigned withJWT_PRIVATE_KEY. - Verifies the returned OpenAttestation document: Merkle root integrity, issuer signature, DNS-DID record, and registered Provider domain match.
- In a single database transaction: encrypts and stores the attestation (
AES-256-GCM,PII_ENCRYPTION_KEY) under a newekyc_ref, marks the sessioncompleted, and appends arequestedtransaction. If storage fails, the call returns500and the session remains open.
Fetch does not run a status check.
Response 200
| Field | Type | Description |
|---|---|---|
ref_id | string | The Provider's customer reference (user_id) |
tier | integer | Tier served |
data | object | Signed OpenAttestation v2 document with fields above tier obfuscated (privacy.obfuscatedData) |
attested | object | Unsalted document payload containing plain user_info fields and issuers |
ekyc_ref | UUID | Local reference for the stored attestation (unique per fetch). Used with the read-back, status, and delete endpoints below. |
GET /api/v1/requester/kyc/{ekyc_ref}
Retrieves a previously fetched attestation from encrypted local storage. Access is recorded in the audit trail.
Response 200
{
"ekyc_ref": "0b9d3d3e-6a51-4f7e-9a7e-8a4b3c1d2e10",
"provider": { "code": "BANK01", "name_en": "Bank One", "camdx_member_code": "CAMBODIA/COM/BANK01/EKYC" },
"request_ref_id": "0199a7e2-…",
"tier": 3,
"merkle_root": "3f0c…",
"data": { "…": "signed OA document exactly as received, images re-injected" },
"attested": { "user_info": {} },
"declared_checks": { "camdl": true, "camdx": true },
"last_status": {
"status": "current",
"checked_at": "2026-11-18T10:00:01.000Z",
"invalidated_at": null
},
"received_at": "2026-11-18T09:00:00.000Z"
}
last_status is null if no status check has been executed. declared_checks is true for each source declared in the attestation (including malformed declarations).
| Status | error | Condition |
|---|---|---|
400 | ValidationError | ekyc_ref is not a valid UUID |
401 | UnauthorizedException | Invalid or missing API key |
404 | NotFoundException | Unknown or deleted (Attestation not found) |
GET /api/v1/requester/kyc/{ekyc_ref}/status
Executes the status checks declared by the attestation, persists the result, and returns it. Unavailable or failing remote checks report unknown with HTTP 200 rather than failing the request; database errors still return 500.
Response 200
{
"ekyc_ref": "0b9d3d3e-6a51-4f7e-9a7e-8a4b3c1d2e10",
"status": "invalidated",
"checked_at": "2026-11-18T10:00:01.000Z",
"invalidated_at": "2026-11-18T09:58:12.000Z",
"sources": {
"camdl": { "status": "current", "reason": null, "invalidated_at": null,
"checked_at": "2026-11-18T10:00:01.000Z" },
"camdx": { "status": "invalidated", "reason": null, "invalidated_at": "2026-11-18T09:58:12.000Z",
"checked_at": "2026-11-18T10:00:01.000Z" }
}
}
Status values (overall and per source)
status | Meaning |
|---|---|
current | Check confirmed no invalidation |
invalidated | Provider invalidated the attestation |
unknown | Check could not complete; reason specifies why |
not_supported | Attestation declares no check for this source; no network call made |
When status is unknown, reason is one of: timeout, unreachable, http_error, bad_response, bad_signature, not_found, member_mismatch, chain_mismatch, not_configured, or malformed_declaration (otherwise null).
Overall resolution rule (first match wins)
| Condition | Overall status |
|---|---|
Neither source declared (both not_supported) | not_supported |
Any source invalidated, or invalidation previously recorded | invalidated |
Every declared source current | current |
| Otherwise | unknown |
Invalidation is irreversible: once confirmed, the overall status remains invalidated. invalidated_at reflects the CamDX-reported timestamp when available, or otherwise the timestamp when invalidation was first observed.
Check execution
- CamDL: calls
isRevokedon the attestation's declared Document Store viaRPC_URL. Reportsunknown/not_configuredifRPC_URLorCAMDL_CHAIN_IDis unset, orunknown/chain_mismatchif the attestation's chain ID differs fromCAMDL_CHAIN_ID. - CamDX: calls
POST /api/v1/provider/kyc/statusat{CAMDX_SECURITY_SERVER}/{member}/{service}withX-Road-Client: {CAMDX_MEMBER_CODE}and verifies the response signature against the Provider's DNS keys. - Each source check is bounded by
STATUS_CHECK_TIMEOUT_MS.
| Status | error | Condition |
|---|---|---|
400 | ValidationError | ekyc_ref is not a valid UUID |
401 | UnauthorizedException | Invalid or missing API key |
404 | NotFoundException | Unknown or deleted |
DELETE /api/v1/requester/kyc/{ekyc_ref}
Deletes the encrypted attestation payload and image blobs while retaining a non-PII metadata record (reference, Provider, tier, Merkle root, last status, timestamps). Because the sidecar does not purge records automatically, call this endpoint according to your data retention policy.
Response 204 with no body. Returns 404 if unknown or already deleted, or 401 for invalid API credentials.
Provider endpoints
POST /api/v1/provider/token/verify
Verifies a Requester's login token prior to presenting the consent screen.
Request: { "token": "<login token>" }
Response 200: { "valid": true, "payload": { …login token claims… } }. Verification failures return 400 with the specific error message rather than valid: false.
Validation order: ES512 signature against ekyc_pub keys at iss · jti, iss, iss_code, ref_id present · exp not elapsed and iat not in the future · your ISS_CODE in accept · iss_code matches an enabled partner with the Requester role · tier does not exceed that partner's maxTier · iss matches a registered domain of that partner.
POST /api/v1/provider/kyc/submit
Creates a signed OpenAttestation document from verified KYC data, encrypts and caches it locally, records consent, issues a single-use auth token, and delivers it to the Auth Portal.
Request
| Field | Type | Rules |
|---|---|---|
tier | integer | 0 to 3. Selects the user_info schema. |
user_id | string | Your internal customer reference |
login_token | string | Verified login token |
data.user_info | object | See KYC data by tier |
Response 201
| Field | Type | Description |
|---|---|---|
user_id | string | Echo of the request user_id |
status | string | submitted |
attestation_ref | UUID | Store and pass to authorize and invalidate |
auth_payload.payload.auth_token | string | Single-use auth token (already delivered to the Auth Portal) |
auth_payload.payload_signature | string | Base64 ES512 signature over payload |
Side effects: creates a consents row, a provide_sessions row (auth_token_issued, 5-minute TTL), encrypted kyc_cache and kyc_blobs rows (no expiry), and sends POST {CAMDX_SECURITY_SERVER}/{EKYC_AUTH_PORTAL_MEMBER_CODE}/api/v1/provider/consent with X-Road-Client: {CAMDX_MEMBER_CODE} and body { "consent_method": "API", "approved": true, "auth_token": "…" }.
If delivery to the Auth Portal fails, the sidecar rolls back session/issuance state and returns 500.
Conflict (409): if user_id already has an active attestation, submit returns 409 ConflictException without modifying state. Call kyc/invalidate first.
{
"status": "error",
"error": "ConflictException",
"message": "An active attestation exists for this user; invalidate it before submitting a replacement",
"attestation_ref": "550e8400-e29b-41d4-a716-446655440000"
}
attestation_ref is omitted if the active issuance was invalidated concurrently before lookup.
Declared status checks: new attestations declare the status checks configured in ATTESTATION_STATUS_CHECKS at issuance time.
POST /api/v1/provider/kyc/authorize
Issues a consent and auth token for a customer who already holds a cached attestation, without resending KYC data.
Request
| Field | Type | Rules |
|---|---|---|
user_id | string | Same reference used at submit |
attestation_ref | UUID | Active reference from an earlier submit |
tier | integer | 0 to 3, required, not exceeding the cached attestation's tier |
login_token | string | Verified login token |
Response 201: same shape as submit, with status: "authorized".
Cached attestations do not expire; authorize rejects a reference only if it was invalidated (400 Cached attestation reference is invalid or invalidated), belongs to another user_id, or has a lower tier than requested.
POST /api/v1/provider/kyc/invalidate
Retires an active attestation when verified KYC data changes in your core system. Invalidation is the product term; OpenAttestation and CamDL call the on-chain operation revocation.
Request
| Field | Type | Rules |
|---|---|---|
user_id | string | Customer reference used at submit |
attestation_ref | UUID | Attestation reference belonging to user_id (active or already invalidated) |
reason | string | Optional: profile_updated, ekyc_repeated, data_correction, or other |
login_token | string | Deprecated, optional, and ignored |
{
"user_id": "CIF-000123",
"attestation_ref": "550e8400-e29b-41d4-a716-446655440000",
"reason": "profile_updated"
}
Response 200
{
"user_id": "CIF-000123",
"attestation_ref": "550e8400-e29b-41d4-a716-446655440000",
"status": "invalidated",
"invalidated_at": "2026-11-18T09:58:12.000Z",
"already_invalidated": false,
"camdl_publication": "pending"
}
camdl_publication is pending, confirmed, failed, or not_declared. Repeated calls return 200 with the original invalidated_at, already_invalidated: true, and the current publication status, without affecting any replacement attestation.
Execution flow: in one database transaction, the sidecar records invalidated_at, wipes the encrypted attestation payload and image blobs, appends an audit event, and queues CamDL publication if declared—while retaining the issuance reference, Merkle root, and delivery records to answer status queries. CamDL publication runs asynchronously with retries. Once committed, authorize and resolve reject the attestation.
| Status | error | Condition |
|---|---|---|
400 | ValidationError | attestation_ref is not a UUID, or reason is invalid |
401 | UnauthorizedException | Invalid or missing API key |
404 | NotFoundException | No matching attestation for user_id (Attestation not found for this user) |
POST /api/v1/provider/kyc/resolve/t{0-3}
Called by a Requester's sidecar over CamDX (never called directly by your core system). Including the tier in the path allows CamDX to meter transactions per tier.
Request: header X-Road-Client: {Requester member code}, body { "auth_token": "…", "signature": "<base64 ES512 signature of auth_token>" }.
Checks: auth token signed by this sidecar (iss matches ISSUER) and unexpired · Requester partner enabled for aud · Requester signature valid against keys at that partner's registered domains · provide session found by jti · X-Road-Client matches partner's camdx_member_code · session still auth_token_issued · consent valid and matches Requester · attestation not invalidated · path tier does not exceed authorised tier.
Response 200: { "ref_id": "<user_id>", "tier": 1, "data": { …attestation with fields above tier obfuscated… } }. Marks the session completed and writes a provided transaction.
POST /api/v1/provider/kyc/status
Provider status endpoint called by a Requester's sidecar over CamDX (never called directly by your core system). Publish it on your Security Server as kyc-status-v1 (see Set up the sidecar, step 6).
Requesters call POST {CAMDX_SECURITY_SERVER}/{provider member code}/kyc-status-v1. Authentication uses X-Road-Client and a signed request body (no API key).
Request: header X-Road-Client: {Requester member code}.
{
"version": 1,
"merkle_root": "3f0c…",
"aud": "BANK01",
"requested_at": 1763459892,
"nonce": "70f460b690ee3fe70b02573fad135d93",
"signature": "<base64 DER ES512>"
}
merkle_root is 64 lowercase hex characters without a 0x prefix, and aud is your ISS_CODE. The Requester generates a fresh 16-byte random nonce per request (32 lowercase hex characters) and signs "kyc-status-v1\n" + merkle_root + "\n" + requested_at + "\n" + aud + "\n" + nonce with ES512 using its JWT_PRIVATE_KEY.
Validation order: X-Road-Client belongs to an enabled Requester partner · body matches schema · requested_at is within STATUS_REQUEST_MAX_SKEW_SECONDS of server time · aud equals your ISS_CODE · signature verifies against a DNS key at one of the partner's registered domains. Authorization failures return 401 (Status query not authorized).
The sidecar queries only attestations delivered to that Requester, returning not_found identically whether a root is unknown or was never delivered to that Requester.
Response 200, signed with your JWT_PRIVATE_KEY:
{
"version": 1,
"merkle_root": "3f0c…",
"nonce": "70f460b690ee3fe70b02573fad135d93",
"status": "invalidated",
"invalidated_at": "2026-11-18T09:58:12.000Z",
"responded_at": "2026-11-18T10:00:01.000Z",
"payload_signature": "<base64>"
}
status is current, invalidated, or not_found. invalidated_at is null unless status is invalidated. No identity fields, tier, or attestation_ref are returned.
The Requester verifies that the echoed merkle_root and nonce match its request and that responded_at is within STATUS_REQUEST_MAX_SKEW_SECONDS of its current time, reporting unknown (bad_response) otherwise.
| Status | error | Condition |
|---|---|---|
400 | ValidationError | Request body fails schema validation |
401 | UnauthorizedException | Caller, freshness, aud, or signature check failed |
GET /api/v1/provider/kyc/ping
Connectivity check called over CamDX when a partner clicks Ping in its backoffice.
Response 200: { "message": "pong" } when X-Road-Client matches an enabled partner with the Requester role; otherwise 400 with the specific reason.
Tokens
All protocol tokens are JWTs signed with ES512 (ECDSA P-521, SHA-512). Public keys are discovered from ekyc_pub= DNS TXT records on the issuer's iss domain.
Login token (ekyc_request_v1)
Issued by the Requester sidecar. Default lifetime: REQUEST_TOKEN_EXPIRY_MINUTES (15 minutes).
| Claim | Meaning |
|---|---|
qr_type | ekyc_request_v1 |
tier | Requested tier (0 to 3) |
accept | Partner codes of enabled Providers in the Requester's allowlist |
ref_id | Request UUID; propagated to the auth token to correlate records on both sides |
jti | Unique token ID |
callback, callback_type | Callback destination for the Auth Portal |
iss | Requester's issuer domain |
iss_code | Requester's partner code |
iat, exp | Issued-at and expiration timestamps (Unix seconds) |
Auth token (ekyc_auth_v1)
Issued by the Provider sidecar upon customer consent. Lifetime: 5 minutes, single use.
| Claim | Meaning |
|---|---|
qr_type | ekyc_auth_v1 |
ref_id | ref_id from the login token |
jti | Unique token ID enforcing single-use redemption |
sub | Consent ID |
tier | Authorised tier |
iss, iss_code | Provider's issuer domain and partner code |
aud | Requester's partner code (only this Requester can redeem the token) |
camdx_code | Provider's CamDX member code |
iat, exp | Issued-at and expiration timestamps (Unix seconds) |
Neither token contains personal data.
KYC data by tier
Schema for data.user_info in kyc/submit. Each tier includes all fields from lower tiers. All values are strings and are required unless marked optional.
| Field | T0 | T1 | T2 | T3 | Notes |
|---|---|---|---|---|---|
phone_number | ✓ | ✓ | ✓ | ✓ | E.164, e.g. +85512345678 |
first_name, last_name | ✓ | ✓ | ✓ | ✓ | |
document_type | ✓ | ✓ | ✓ | ✓ | e.g. NID |
document_id | ✓ | ✓ | ✓ | ✓ | |
email | optional | optional | optional | ||
dob | ✓ | ✓ | ✓ | YYYY-MM-DD | |
gender | ✓ | ✓ | ✓ | M or F | |
nationality | ✓ | ✓ | ✓ | e.g. KHM | |
issue_date, expiry_date | ✓ | ✓ | ✓ | ID document dates, YYYY-MM-DD | |
place_of_birth | ✓ | ✓ | ✓ | ||
current_address | ✓ | ✓ | ✓ | Address object (below) | |
face_image | ✓ | ✓ | Base64-encoded image | ||
face_image_integrity_hash | ✓ | ✓ | SHA-256 hex/digest of face_image | ||
document_image | ✓ | Base64-encoded front of ID | |||
document_image_back | ✓ | Base64-encoded back of ID |
current_address fields: address_line_1, address_line_2 (optional), village, village_code, commune, commune_code, district, district_code, province, province_code, country, country_code, postal_code.
Tier obfuscation on resolve: the Provider sidecar cryptographically hides fields above the requested tier—T0 obfuscates email and higher-tier fields; T1 obfuscates face and document images; T2 obfuscates the ID document images.
Environment variables
Validated at startup; the server exits if any required variable is missing or malformed.
| Variable | Required | Default | Description |
|---|---|---|---|
NODE_ENV | No | development | Set to production in production |
NODE_PORT | No | 3000 | HTTP listen port |
SERVER_URL | Yes | Internal base URL of this sidecar (used in the OpenAPI document) | |
CORS_ORIGIN | Yes | Allowed origin for the sidecar backoffice | |
LOG_LEVEL | No | info | trace · debug · info · warn · error · fatal (use info or higher in production) |
TZ | No | UTC | Process timezone |
DATABASE_HOST, DATABASE_USER, DATABASE_PASSWORD, DATABASE_NAME | Yes | PostgreSQL connection settings | |
DATABASE_PORT | No | 5432 | PostgreSQL port |
ISSUER | Yes | Issuer domain hosting DNS TXT records | |
ISS_CODE | Yes | Partner code ([A-Z0-9_-]) | |
JWT_PRIVATE_KEY | Yes | EC P-521 private key in PEM format | |
REQUEST_TOKEN_EXPIRY_MINUTES | No | 15 | Login token lifetime in minutes |
CAMDX_MEMBER_CODE | Yes | CamDX member code | |
CAMDX_SECURITY_SERVER | Yes | Base URL of your CamDX Security Server | |
EKYC_AUTH_PORTAL_MEMBER_CODE | Providers | Auth Portal's CamDX member code | |
PII_ENCRYPTION_KEY | Yes | Exactly 32 UTF-8 bytes (AES-256-GCM key) | |
WALLET_FILE_PATH | Yes in production | tests/resources/wallet.json | Path to the encrypted attestation keystore |
WALLET_PASS | Yes | Keystore password | |
ADMIN_JWT_SECRET | Yes in production | Dev fallback | Backoffice session signing secret (at least 32 bytes required in production) |
API_KEY, API_SECRET | No | Optional static core API key checked before database keys (leave unset in production) | |
INITIAL_ADMIN_EMAIL, INITIAL_ADMIN_PASSWORD | First boot | admin@example.com (dev email), none (password) | Initial super_admin credentials when admins is empty. INITIAL_ADMIN_PASSWORD is required in all environments; INITIAL_ADMIN_EMAIL is required in production. |
DOCUMENT_STORE_ADDRESS | Providers declaring camdl | CamDL Document Store 0x address (Providers only) | |
RPC_URL | Providers declaring camdl; Requesters checking CamDL | CamDL JSON-RPC endpoint | |
SENTRY_DSN, SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT | No | Optional Sentry error reporting |
Status check variables
Optional settings for attestation status declarations, verification, and asynchronous CamDL revocation publishing.
| Variable | Role | Default | Description |
|---|---|---|---|
ATTESTATION_STATUS_CHECKS | Provider | none | Comma-separated list of none, camdl, camdx (none cannot be combined). Sets checks declared on new attestations. Server refuses to start if camdl is enabled without valid DOCUMENT_STORE_ADDRESS, RPC_URL, and CAMDL_CHAIN_ID. |
CAMDL_CHAIN_ID | Both | Unset | Digits only. Provider: written to attestation declarations. Requester: CamDL checks run only when the attestation's chain ID matches (chain_mismatch otherwise, or not_configured if unset). |
CAMDL_CHAIN_NAME | Provider | CAMDL | Chain name written to network.chain |
CAMDX_STATUS_SERVICE_CODE | Provider | kyc-status-v1 | Service code written to attestations; must match your published CamDX service |
STATUS_CHECK_TIMEOUT_MS | Requester | 3000 | Per-source timeout in ms (100–30000), including DNS lookups for response signatures |
STATUS_REQUEST_MAX_SKEW_SECONDS | Provider | 300 | Maximum allowed clock skew or age in seconds (10–3600) for status requests |
CAMDL_PUBLICATION_WORKER_ENABLED | Provider | true | Enables the background CamDL revocation publisher (starts only when wallet and RPC_URL are configured) |
CAMDL_PUBLICATION_INTERVAL_MS | Provider | 15000 | Worker polling interval in ms (minimum 1000) |
CAMDL_PUBLICATION_BATCH_SIZE | Provider | 10 | Publications processed per tick (1–100) |
CAMDL_PUBLICATION_MAX_ATTEMPTS | Provider | 8 | Maximum retry attempts before marking a publication failed |
CAMDL_PUBLICATION_BACKOFF_BASE_MS | Provider | 30000 | Initial retry delay in ms (doubles per attempt) |
CAMDL_PUBLICATION_BACKOFF_MAX_MS | Provider | 3600000 | Maximum retry delay in ms |
CAMDL_TX_TIMEOUT_MS | Provider | 120000 | Wait timeout for a CamDL transaction receipt in ms (minimum 5000) |
CAMDL_CONFIRMATIONS | Provider | 1 | Block confirmations required (1–64) |
Failed publications appear in the backoffice under Attestations, where an editor or admin can retry them. Gas is funded by TSC as the CamDL chain owner.
Admin API summary
Used by the sidecar backoffice and administrative automation. Role hierarchy: viewer < editor < admin < super_admin.
| Path | Minimum role | Purpose |
|---|---|---|
POST /api/v1/admin/auth/login | – | Sign in and obtain an admin JWT |
GET/PUT /api/v1/admin/me | Any | View own profile and change password |
GET /api/v1/admin/stats/dashboard, /stats/analytics | Any | Dashboard summary and analytics |
GET /api/v1/admin/sessions, /sessions/{direction}/{id} | Any | Provided and requested session logs |
GET/POST/PATCH/DELETE /api/v1/admin/partners…, PATCH …/{id}/enable, …/{id}/disable, POST /partners/ping | editor | Partner allowlist management and Ping |
GET/POST /api/v1/admin/api-keys, DELETE /api-keys/{id} | admin | Core-system API key management |
GET /api/v1/admin/users | Any | List backoffice staff accounts |
POST /api/v1/admin/users, GET /activities | admin | Create staff accounts and read the activity log |
PUT/DELETE /api/v1/admin/users/{id}, POST …/reset-password | super_admin | Manage other admin accounts |
GET /api/v1/admin/attestations/invalidated | Any | Invalidated attestations and CamDL publication status (Provider) |
GET /api/v1/admin/camdl-publications | Any | CamDL publications filtered by pending, confirmed, or failed (Provider) |
POST /api/v1/admin/camdl-publications/{id}/retry | editor | Retry a failed CamDL publication (409 if pending or confirmed) |
GET /api/v1/admin/received-attestations | Any | Stored attestations and last status without personal data (Requester) |