{"openapi":"3.1.0","info":{"title":"ENSC API","version":"2026-09-15","description":"The ENSC stablecoin platform API: conversions through the ENSC converter (pair token or Naira in, ENSC out, and back), ENSC transfers, balances, bank directory and account resolution.\n\n**Versioning**: URL major (`/v1`) + date-pinned header (`X-ENSC-API-Version: 2026-09-15`). Version 2026-09-15 introduces mandatory payload encryption.\n\n**Authentication**: API key (Bearer) + mandatory IP allowlist on live keys.\n\n**Request encryption**: every mutating merchant-key call carries an ENSC-ENC-V1 envelope (AES-256-GCM under the merchant encryption key, request-bound AAD). Plaintext bodies are refused.\n\n**Request signing**: Ed25519 over a canonical string that includes the SHA-256 of the envelope bytes, a timestamp (300s window) and a one-time nonce.\n\n**Sealed responses**: every 2xx body to a merchant sk/rk key is an ENSC-RESP-V1 envelope (HPKE RFC 9180, X25519 + ChaCha20-Poly1305) sealed to the merchant signing key and signed by ENSC.\n\n**Error envelope** (never encrypted): `{ \"error\": { \"code\": \"ENSC_...\", \"message\": \"...\", \"requestId\": \"req_...\" } }`.\n\n**Amounts**: every amount you send is a decimal string in the asset's own units (`\"0.1\"` CELO, `\"100\"` USDC, `\"1000.00\"` NGN; fiat amounts take at most 2 decimals). Every amount the API returns is a base-unit integer string (`amountIn`, `amountOut`, `balance`) with a decimal twin (`amountInFormatted`, `amountOutFormatted`, `formatted`) already divided by the asset's decimals: ENSC 18, CELO 18, USDC and USDT 6, NGN legs 18 (stored as ENSC units). Never do arithmetic on the formatted strings; use the base units with a big-integer type.\n\n**Unsigned transactions**: `{ from, to, data, value: \"0\", chainId }`. ENSC never holds a wallet key and never broadcasts. Sign with the wallet named in `from` (the conversion's wallet), on the chain named in `chainId`, and estimate gas with an explicit limit before sending. For a voucher, send `approvalTransaction` first when it is present, then `transaction`, then report the hash on `/v1/conversions/{reference}/events`.\n\n**Webhooks**: register a public https endpoint on your backend (`POST /v1/webhook-endpoints` or the dashboard). Every delivery is signed with ENSC's Ed25519 key (`ENSC-WH-V1` over the webhook id, the timestamp and the SHA-256 of the raw body; key published at `/v1/.well-known/ensc-public-keys.json`), retried after 1 min, 5 min, 15 min, 1 h, 2 h, 4 h and 8 h (8 attempts in total over about 15 hours) when your endpoint does not answer 2xx within 15 s, and delivered at least once; de-duplicate on the event `id`. Ordering is not guaranteed: act on the status carried by the event.","contact":{"name":"ENSC Support"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://api.ensc.prosperavest.com","description":"ENSC API (Sandbox and Live share one host; the key prefix selects the environment)"}],"tags":[{"name":"Health"},{"name":"Banks"},{"name":"Balance"},{"name":"Conversions"},{"name":"Transfer"},{"name":"Webhooks"},{"name":"Events"},{"name":"Test Data"},{"name":"API Keys"},{"name":"Signing Keys"},{"name":"Encryption Keys"},{"name":"Origins"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"ENSC API key (ensc_{env}_{kind}_<random>)","description":"Your secret key, generated in the ProsperaVest dashboard (Sandbox or Live). Send as: Authorization: Bearer ensc_live_sk_..."}},"schemas":{"BalanceResponse":{"type":"object","properties":{"account":{"type":"string"},"asset":{"type":"string","enum":["ENSC","USDC","USDT","CELO"]},"chain":{"type":"string","minLength":2,"maxLength":40},"balance":{"type":"string"},"formatted":{"type":"string"},"decimals":{"type":"integer","minimum":0}},"required":["account","asset","chain","balance","formatted","decimals"]},"BanksResponse":{"type":"object","properties":{"country":{"type":"string","enum":["NG"]},"banks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]}}},"required":["country","banks"]},"ListConversionsResponse":{"type":"object","properties":{"conversions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"type":{"type":"string","enum":["crypto-issue","crypto-redeem","fiat-issue","fiat-redeem"]},"status":{"type":"string","enum":["created","screening_hold","awaiting_payment","payment_confirmed","voucher_issued","onchain_submitted","onchain_confirmed","payout_pending","payout_in_progress","payout_confirmed","succeeded","failed","requires_manual_review"]},"env":{"type":"string","enum":["test","live"]},"chain":{"type":"string","minLength":2,"maxLength":40},"chainId":{"type":"integer","exclusiveMinimum":0},"wallet":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenIn":{"type":"string"},"tokenOut":{"type":"string"},"amountIn":{"type":"string"},"amountOut":{"type":"string"},"amountInFormatted":{"type":"string"},"amountOutFormatted":{"type":"string"},"fiatAmountNgn":{"type":["string","null"]},"usdValueCents":{"type":["integer","null"]},"screening":{"type":"object","properties":{"status":{"type":"string","enum":["APPROVED","IN_REVIEW","DECLINED","AWAITING_USER","SKIPPED"]}},"required":["status"]},"voucher":{"type":["object","null"],"properties":{"voucher":{"type":"object","properties":{"kind":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]}]},"wallet":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenIn":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amountIn":{"type":"string","pattern":"^\\d{1,78}$"},"amountOut":{"type":"string","pattern":"^\\d{1,78}$"},"deadline":{"type":"string","pattern":"^\\d{1,78}$"},"nonce":{"type":"string","pattern":"^\\d{1,78}$"},"opRef":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"payoutRef":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["kind","wallet","tokenIn","amountIn","amountOut","deadline","nonce","opRef","payoutRef"]},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]{130}$"},"signer":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"domain":{"type":"object","properties":{"name":{"type":"string","enum":["ENSCConverter"]},"version":{"type":"string","enum":["1"]},"chainId":{"type":"integer","exclusiveMinimum":0},"verifyingContract":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["name","version","chainId","verifyingContract"]},"expiresAt":{"type":"string"},"approvalToken":{"type":["string","null"],"pattern":"^0x[a-fA-F0-9]{40}$"},"approvalTransaction":{"type":["object","null"],"properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"value":{"type":"string","enum":["0"]},"chainId":{"type":"integer","exclusiveMinimum":0}},"required":["from","to","data","value","chainId"]},"transaction":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"value":{"type":"string","enum":["0"]},"chainId":{"type":"integer","exclusiveMinimum":0}},"required":["from","to","data","value","chainId"]}},"required":["voucher","signature","signer","domain","expiresAt","approvalToken","approvalTransaction","transaction"]},"paymentInstructions":{"type":["object","null"],"properties":{"method":{"type":"string","enum":["bank_transfer"]},"accountNumber":{"type":"string"},"bankName":{"type":"string"},"transferAmount":{"type":"string"},"currency":{"type":"string","enum":["NGN"]},"expiresAt":{"type":["string","null"]},"note":{"type":["string","null"]},"providerReference":{"type":"string"}},"required":["method","accountNumber","bankName","transferAmount","currency","expiresAt","note","providerReference"]},"payout":{"type":["object","null"],"properties":{"bankCode":{"type":"string"},"accountLast4":{"type":"string"},"status":{"type":"string","enum":["pending","initiated","in_progress","successful","failed","requires_manual_review"]},"providerTransferId":{"type":["string","null"]}},"required":["bankCode","accountLast4","status","providerTransferId"]},"txHash":{"type":["string","null"]},"onchainVerifiedAt":{"type":["integer","null"]},"stages":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"ts":{"type":"integer"},"meta":{"type":"object","additionalProperties":{}}},"required":["name","ts"]}},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string","maxLength":200}},"lastError":{"type":["string","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"}},"required":["id","reference","type","status","env","chain","chainId","wallet","tokenIn","tokenOut","amountIn","amountOut","amountInFormatted","amountOutFormatted","fiatAmountNgn","usdValueCents","screening","voucher","paymentInstructions","payout","txHash","onchainVerifiedAt","stages","metadata","lastError","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["conversions","pagination"]},"QuoteResponse":{"type":"object","properties":{"type":{"type":"string","enum":["crypto-issue","crypto-redeem"]},"chain":{"type":"string","minLength":2,"maxLength":40},"pair":{"type":"string","enum":["USDC","USDT","CELO"]},"amountIn":{"type":"string"},"amountOut":{"type":"string"},"amountInFormatted":{"type":"string"},"amountOutFormatted":{"type":"string"},"oracleRate":{"type":"string"},"oracleUpdatedAt":{"type":["integer","null"]},"redeemCapacityIn":{"type":["string","null"]},"validForSeconds":{"type":"integer"}},"required":["type","chain","pair","amountIn","amountOut","amountInFormatted","amountOutFormatted","oracleRate","oracleUpdatedAt","redeemCapacityIn","validForSeconds"]},"ScreeningStatusResponse":{"type":"object","properties":{"reference":{"type":"string"},"status":{"type":"string","enum":["APPROVED","IN_REVIEW","DECLINED","AWAITING_USER","SKIPPED"]},"updatedAt":{"type":["integer","null"]}},"required":["reference","status","updatedAt"]},"Conversion":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"type":{"type":"string","enum":["crypto-issue","crypto-redeem","fiat-issue","fiat-redeem"]},"status":{"type":"string","enum":["created","screening_hold","awaiting_payment","payment_confirmed","voucher_issued","onchain_submitted","onchain_confirmed","payout_pending","payout_in_progress","payout_confirmed","succeeded","failed","requires_manual_review"]},"env":{"type":"string","enum":["test","live"]},"chain":{"type":"string","minLength":2,"maxLength":40},"chainId":{"type":"integer","exclusiveMinimum":0},"wallet":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenIn":{"type":"string"},"tokenOut":{"type":"string"},"amountIn":{"type":"string"},"amountOut":{"type":"string"},"amountInFormatted":{"type":"string"},"amountOutFormatted":{"type":"string"},"fiatAmountNgn":{"type":["string","null"]},"usdValueCents":{"type":["integer","null"]},"screening":{"type":"object","properties":{"status":{"type":"string","enum":["APPROVED","IN_REVIEW","DECLINED","AWAITING_USER","SKIPPED"]}},"required":["status"]},"voucher":{"type":["object","null"],"properties":{"voucher":{"type":"object","properties":{"kind":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]}]},"wallet":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenIn":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amountIn":{"type":"string","pattern":"^\\d{1,78}$"},"amountOut":{"type":"string","pattern":"^\\d{1,78}$"},"deadline":{"type":"string","pattern":"^\\d{1,78}$"},"nonce":{"type":"string","pattern":"^\\d{1,78}$"},"opRef":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"payoutRef":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["kind","wallet","tokenIn","amountIn","amountOut","deadline","nonce","opRef","payoutRef"]},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]{130}$"},"signer":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"domain":{"type":"object","properties":{"name":{"type":"string","enum":["ENSCConverter"]},"version":{"type":"string","enum":["1"]},"chainId":{"type":"integer","exclusiveMinimum":0},"verifyingContract":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["name","version","chainId","verifyingContract"]},"expiresAt":{"type":"string"},"approvalToken":{"type":["string","null"],"pattern":"^0x[a-fA-F0-9]{40}$"},"approvalTransaction":{"type":["object","null"],"properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"value":{"type":"string","enum":["0"]},"chainId":{"type":"integer","exclusiveMinimum":0}},"required":["from","to","data","value","chainId"]},"transaction":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"value":{"type":"string","enum":["0"]},"chainId":{"type":"integer","exclusiveMinimum":0}},"required":["from","to","data","value","chainId"]}},"required":["voucher","signature","signer","domain","expiresAt","approvalToken","approvalTransaction","transaction"]},"paymentInstructions":{"type":["object","null"],"properties":{"method":{"type":"string","enum":["bank_transfer"]},"accountNumber":{"type":"string"},"bankName":{"type":"string"},"transferAmount":{"type":"string"},"currency":{"type":"string","enum":["NGN"]},"expiresAt":{"type":["string","null"]},"note":{"type":["string","null"]},"providerReference":{"type":"string"}},"required":["method","accountNumber","bankName","transferAmount","currency","expiresAt","note","providerReference"]},"payout":{"type":["object","null"],"properties":{"bankCode":{"type":"string"},"accountLast4":{"type":"string"},"status":{"type":"string","enum":["pending","initiated","in_progress","successful","failed","requires_manual_review"]},"providerTransferId":{"type":["string","null"]}},"required":["bankCode","accountLast4","status","providerTransferId"]},"txHash":{"type":["string","null"]},"onchainVerifiedAt":{"type":["integer","null"]},"stages":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"ts":{"type":"integer"},"meta":{"type":"object","additionalProperties":{}}},"required":["name","ts"]}},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string","maxLength":200}},"lastError":{"type":["string","null"]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"}},"required":["id","reference","type","status","env","chain","chainId","wallet","tokenIn","tokenOut","amountIn","amountOut","amountInFormatted","amountOutFormatted","fiatAmountNgn","usdValueCents","screening","voucher","paymentInstructions","payout","txHash","onchainVerifiedAt","stages","metadata","lastError","createdAt","updatedAt"]},"CreateConversionRequest":{"type":"object","properties":{"type":{"type":"string","enum":["crypto-issue","crypto-redeem","fiat-issue","fiat-redeem"]},"chain":{"type":"string","minLength":2,"maxLength":40},"wallet":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","maxLength":60,"pattern":"^\\d+(\\.\\d+)?$"},"pair":{"type":"string","enum":["USDC","USDT","CELO"]},"payout":{"type":"object","properties":{"bankCode":{"type":"string","pattern":"^\\d{2,10}$"},"accountNumber":{"type":"string","pattern":"^\\d{10}$"},"accountName":{"type":"string","minLength":2,"maxLength":128}},"required":["bankCode","accountNumber","accountName"]},"payer":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"name":{"type":"string","minLength":1,"maxLength":128},"phone":{"type":"string","minLength":6,"maxLength":32}},"required":["email"]},"counterparty":{"type":"object","properties":{"type":{"type":"string","enum":["individual","company"],"default":"individual"},"name":{"type":"string","minLength":1,"maxLength":128},"wallet":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"reference":{"type":"string","pattern":"^op:[a-z-]+:[0-9a-fA-F-]{8,64}$"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":200}}},"required":["type","chain","wallet","amount"]},"ConversionEventRequest":{"type":"object","properties":{"event":{"type":"string","enum":["onchain_submitted","onchain_confirmed","failed"]},"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"error":{"type":"string","maxLength":512}},"required":["event"]},"EmptyRequest":{"type":"object","properties":{}},"ResolveAccountRequest":{"type":"object","properties":{"bankCode":{"type":"string","pattern":"^\\d{2,10}$"},"accountNumber":{"type":"string","pattern":"^\\d{10}$"}},"required":["bankCode","accountNumber"]},"ResolveAccountResponse":{"type":"object","properties":{"bankCode":{"type":"string"},"accountNumber":{"type":"string"},"accountName":{"type":"string"}},"required":["bankCode","accountNumber","accountName"]},"TransferRequest":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"recipient":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","maxLength":60,"pattern":"^\\d+(\\.\\d+)?$"},"asset":{"type":"string","enum":["ENSC"],"default":"ENSC"},"chain":{"type":"string","minLength":2,"maxLength":40},"clientReference":{"type":"string","maxLength":128}},"required":["from","recipient","amount","chain"]},"TransferResponse":{"type":"object","properties":{"unsignedTransaction":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"value":{"type":"string","enum":["0"]},"chainId":{"type":"integer","exclusiveMinimum":0}},"required":["from","to","data","value","chainId"]},"chain":{"type":"string","minLength":2,"maxLength":40},"amount":{"type":"string"}},"required":["unsignedTransaction","chain","amount"]},"ListApiKeysResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"kind":{"type":"string","enum":["pk","sk","rk"]},"prefix":{"type":"string"},"name":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"ipAllowlist":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","rotated","revoked"]},"lastUsedAt":{"type":["number","null"]},"createdAt":{"type":"number"},"expiresAt":{"type":["number","null"]}},"required":["id","env","kind","prefix","name","scopes","ipAllowlist","status","lastUsedAt","createdAt","expiresAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["keys","pagination"]},"ListSigningKeysResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"publicKey":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["active","rotated","revoked"]},"expiresAt":{"type":["integer","null"]},"createdAt":{"type":"number"}},"required":["id","env","publicKey","name","status","expiresAt","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["keys","pagination"]},"ListEncryptionKeysResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^enc_[0-9A-Z]{26}$"},"env":{"type":"string","enum":["test","live"]},"name":{"type":["string","null"]},"status":{"type":"string","enum":["active","rotated","revoked"]},"expiresAt":{"type":["number","null"]},"createdAt":{"type":"number"}},"required":["id","env","name","status","expiresAt","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["keys","pagination"]},"ListAllowedOriginsResponse":{"type":"object","properties":{"origins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"origin":{"type":"string"},"createdAt":{"type":"number"}},"required":["id","env","origin","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["origins","pagination"]},"CreateWebhookEndpointRequest":{"type":"object","properties":{"env":{"type":"string","enum":["test","live"]},"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"type":"string","maxLength":500},"eventTypes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":64},"apiVersion":{"type":"string","minLength":1,"maxLength":32}},"required":["env","url","eventTypes"]},"CreateWebhookEndpointResponse":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"url":{"type":"string"},"description":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string"}},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["active"]},"createdAt":{"type":"number"}},"required":["id","env","url","description","eventTypes","apiVersion","status","createdAt"]},"ListWebhookEndpointsResponse":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"url":{"type":"string"},"description":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string"}},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"type":"number"}},"required":["id","env","url","description","eventTypes","apiVersion","status","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["endpoints","pagination"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"url":{"type":"string"},"description":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string"}},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"type":"number"}},"required":["id","env","url","description","eventTypes","apiVersion","status","createdAt"]},"UpdateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"type":"string","maxLength":500},"eventTypes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":64},"status":{"type":"string","enum":["active","disabled"]}}},"UpdateWebhookEndpointResponse":{"type":"object","properties":{"id":{"type":"string"},"updated":{"type":"array","items":{"type":"string"}}},"required":["id","updated"]},"RemoveWebhookEndpointResponse":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]},"SendTestEventRequest":{"type":"object","properties":{"eventType":{"type":"string","minLength":1,"maxLength":64},"payload":{"type":"object","additionalProperties":{}}}},"SendTestEventResponse":{"type":"object","properties":{"eventId":{"type":"string"},"endpointId":{"type":"string"},"eventType":{"type":"string"},"scheduled":{"type":"boolean","enum":[true]},"deliveredVia":{"type":"string","enum":["queue+cron"]},"willDeliverToTargetEndpoint":{"type":"boolean"},"warning":{"type":["string","null"]}},"required":["eventId","endpointId","eventType","scheduled","deliveredVia","willDeliverToTargetEndpoint","warning"]},"ListEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"eventType":{"type":"string"},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["created","in_flight","dispatched","abandoned"]},"createdAt":{"type":"number"},"dispatchedAt":{"type":["number","null"]},"payload":{}},"required":["id","env","eventType","apiVersion","status","createdAt","dispatchedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["events","pagination"]},"EventDetail":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"eventType":{"type":"string"},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["created","in_flight","dispatched","abandoned"]},"createdAt":{"type":"number"},"dispatchedAt":{"type":["number","null"]},"payload":{},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed","gave_up"]},"responseStatus":{"type":["number","null"]},"attempt":{"type":"number"},"deliveredAt":{"type":["number","null"]},"nextAttemptAt":{"type":["number","null"]},"createdAt":{"type":"number"},"responseSnippet":{"type":["string","null"]}},"required":["id","endpointId","status","responseStatus","attempt","deliveredAt","nextAttemptAt","createdAt","responseSnippet"]}}},"required":["id","env","eventType","apiVersion","status","createdAt","dispatchedAt","deliveries"]},"TriggerTestEventRequest":{"type":"object","properties":{"eventType":{"type":"string","minLength":1,"maxLength":64},"overrides":{"type":"object","additionalProperties":{}}},"required":["eventType"]},"TriggerTestEventResponse":{"type":"object","properties":{"eventId":{"type":"string"},"eventType":{"type":"string"},"env":{"type":"string","enum":["test"]},"payload":{},"scheduled":{"type":"boolean","enum":[true]},"supportedEvents":{"type":"array","items":{"type":"string"}}},"required":["eventId","eventType","env","scheduled","supportedEvents"]},"TestEventCatalog":{"type":"object","properties":{"supported":{"type":"array","items":{"type":"object","properties":{"eventType":{"type":"string"},"samplePayload":{}},"required":["eventType"]}}},"required":["supported"]},"SealedResponseEnvelope":{"type":"object","properties":{"v":{"type":"number","enum":[1]},"enc":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"ciphertext":{"type":"string","pattern":"^[A-Za-z0-9_-]{22,}$"}},"required":["v","enc","ciphertext"],"additionalProperties":false,"description":"ENSC-RESP-V1. HPKE (RFC 9180; DHKEM(X25519, HKDF-SHA256), HKDF-SHA256, ChaCha20-Poly1305) seal of the plaintext JSON response to the merchant signing key named by X-ENSC-Key-Id (Ed25519 key converted to X25519). info = \"ENSC-RESP-V1\\n{requestId}\". The body is signed by ENSC: X-ENSC-Signature over \"ENSC-RESP-V1\\n{requestId}\\n{timestamp}\\n{sha256(body)}\". Returned for sk/rk merchant keys only."},"ErrorEnvelope":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"ENSC_VALIDATION_FAILED"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["error"]},"EncryptedRequestEnvelope":{"type":"object","properties":{"v":{"type":"number","enum":[1]},"encKeyId":{"type":"string","pattern":"^enc_[0-9A-Z]{26}$"},"iv":{"type":"string","pattern":"^[A-Za-z0-9_-]{16}$"},"ciphertext":{"type":"string","minLength":1,"maxLength":1398104,"pattern":"^[A-Za-z0-9_-]+$"},"tag":{"type":"string","pattern":"^[A-Za-z0-9_-]{22}$"}},"required":["v","encKeyId","iv","ciphertext","tag"],"additionalProperties":false,"description":"ENSC-ENC-V1. AES-256-GCM of the plaintext JSON body under the merchant encryption key named by encKeyId. AAD = \"ENSC-ENC-V1\\n{METHOD}\\n{path}\\n{merchantId}\\n{encKeyId}\". iv is 12 bytes, tag 16 bytes, all base64url. The Ed25519 request signature is computed over these envelope bytes."}},"parameters":{}},"paths":{"/health":{"get":{"tags":["Health"],"summary":"Health check","description":"Always returns 200 while the API is up. No auth.","responses":{"200":{"description":"The API is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"version":{"type":"string"}},"required":["ok","version"]}}}}}}},"/v1/healthz":{"get":{"tags":["Health"],"summary":"Health check","description":"Always returns 200 while the API is up. No auth.","responses":{"200":{"description":"The API is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"version":{"type":"string"}},"required":["ok","version"]}}}}}}},"/v1/.well-known/ensc-public-keys.json":{"get":{"tags":["Health"],"summary":"ENSC's Ed25519 public keys","description":"Public keys used to sign sealed responses (ENSC-RESP-V1) and webhook deliveries (ENSC-WH-V1). No auth.","responses":{"200":{"description":"Key list","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"kid":{"type":"string"},"alg":{"type":"string","enum":["Ed25519"]},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"use":{"type":"array","items":{"type":"string","enum":["webhooks","responses"]}}},"required":["kid","alg","publicKey","use"]}}},"required":["keys"]}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const keys = await EnscClient.fetchPublicKeys(); // { [kid]: publicKey } for webhook verification"}]}},"/v1/balance":{"get":{"tags":["Balance"],"summary":"Read on-chain balance","description":"Balance of a whitelisted asset (ENSC, USDC, USDT, CELO) for an account on a chain of the key environment. Response body is a SealedResponseEnvelope whose plaintext is BalanceResponse. Send X-ENSC-Key-Id to pick the recipient signing key when more than one is active.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"0xAbC..."},"required":true,"name":"account","in":"query"},{"schema":{"type":"string","enum":["ENSC","USDC","USDT","CELO"]},"required":false,"name":"asset","in":"query"},{"schema":{"type":"string","example":"0xF50FFf..."},"required":false,"name":"contractAddress","in":"query"},{"schema":{"type":"string","example":"celo"},"required":true,"name":"chain","in":"query"},{"schema":{"type":"string","example":"sig_01HXY..."},"required":false,"name":"X-ENSC-Key-Id","in":"header"}],"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const b = await ensc.balance.get({ account: wallet, chain: 'celo', asset: 'ENSC' });\n// b.balance (base units), b.formatted"}]}},"/v1/banks":{"get":{"tags":["Banks"],"summary":"List supported Nigerian banks","description":"Banks the payment rail of the key environment can pay out to. Cached for one hour. Response body is a SealedResponseEnvelope whose plaintext is BanksResponse. Send X-ENSC-Key-Id to pick the recipient signing key when more than one is active.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"sig_01HXY..."},"required":false,"name":"X-ENSC-Key-Id","in":"header"}],"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { banks } = await ensc.banks.list();"}]}},"/v1/conversions":{"get":{"tags":["Conversions"],"summary":"List conversions","description":"Response body is a SealedResponseEnvelope whose plaintext is ListConversionsResponse. Send X-ENSC-Key-Id to pick the recipient signing key when more than one is active.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from previous response"},"required":false,"description":"Opaque cursor from previous response","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["created","screening_hold","awaiting_payment","payment_confirmed","voucher_issued","onchain_submitted","onchain_confirmed","payout_pending","payout_in_progress","payout_confirmed","succeeded","failed","requires_manual_review"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["crypto-issue","crypto-redeem","fiat-issue","fiat-redeem"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","example":"sig_01HXY..."},"required":false,"name":"X-ENSC-Key-Id","in":"header"}],"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { conversions, pagination } = await ensc.conversions.list({ status: 'succeeded', limit: 50 });"}]},"post":{"tags":["Conversions"],"summary":"Create a conversion","description":"Quotes (crypto legs), screens the transaction, and returns either a signed voucher with the calldata the merchant wallet must sign (crypto legs, fiat-redeem) or bank-transfer instructions (fiat-issue). 201 created, 202 when on a screening hold, 200 when the same reference is re-posted. Request body is an EncryptedRequestEnvelope whose plaintext is CreateConversionRequest; response is a SealedResponseEnvelope whose plaintext is Conversion.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"202":{"description":"Sealed response (screening hold: status screening_hold)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const c = await ensc.conversions.create({\n  type: 'crypto-issue', chain: 'celo', wallet, pair: 'USDC', amount: '100',\n  reference: 'op:crypto-issue:' + crypto.randomUUID(),\n});\n// c.voucher.approvalTransaction, c.voucher.transaction: { from, to, data, value: '0', chainId }"}]}},"/v1/conversions/quote":{"get":{"tags":["Conversions"],"summary":"Quote a crypto leg","description":"The converter contract prices the conversion; the quote is refused while the oracle rate is stale. For crypto-redeem the response carries the largest ENSC amount currently redeemable into the pair. Response body is a SealedResponseEnvelope whose plaintext is QuoteResponse. Send X-ENSC-Key-Id to pick the recipient signing key when more than one is active.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["crypto-issue","crypto-redeem"]},"required":true,"name":"type","in":"query"},{"schema":{"type":"string","minLength":2,"maxLength":40},"required":true,"name":"chain","in":"query"},{"schema":{"type":"string","enum":["USDC","USDT","CELO"]},"required":true,"name":"pair","in":"query"},{"schema":{"type":"string","maxLength":60,"pattern":"^\\d+(\\.\\d+)?$"},"required":true,"name":"amount","in":"query"},{"schema":{"type":"string","example":"sig_01HXY..."},"required":false,"name":"X-ENSC-Key-Id","in":"header"}],"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const q = await ensc.conversions.quote({ type: 'crypto-issue', chain: 'celo', pair: 'USDC', amount: '100' });"}]}},"/v1/conversions/screening":{"get":{"tags":["Conversions"],"summary":"Transaction screening status for a reference","description":"Response body is a SealedResponseEnvelope whose plaintext is ScreeningStatusResponse. Send X-ENSC-Key-Id to pick the recipient signing key when more than one is active.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"op:crypto-issue:9f2c..."},"required":true,"name":"reference","in":"query"},{"schema":{"type":"string","example":"sig_01HXY..."},"required":false,"name":"X-ENSC-Key-Id","in":"header"}],"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const s = await ensc.conversions.screening(reference);"}]}},"/v1/conversions/{reference}":{"get":{"tags":["Conversions"],"summary":"Read a conversion","description":"Response body is a SealedResponseEnvelope whose plaintext is Conversion. Send X-ENSC-Key-Id to pick the recipient signing key when more than one is active.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"op:crypto-issue:9f2c..."},"required":true,"name":"reference","in":"path"},{"schema":{"type":"string","example":"sig_01HXY..."},"required":false,"name":"X-ENSC-Key-Id","in":"header"}],"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const c = await ensc.conversions.get(reference);"}]}},"/v1/conversions/{reference}/events":{"post":{"tags":["Conversions"],"summary":"Report what happened to the signed transaction","description":"onchain_submitted records the hash; onchain_confirmed verifies the receipt against the voucher (status, ENSC movement, converter event, reference) and settles: crypto legs and fiat-issue succeed, fiat-redeem starts the NGN payout. Request body is an EncryptedRequestEnvelope whose plaintext is ConversionEventRequest; response is a SealedResponseEnvelope whose plaintext is Conversion.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"op:crypto-issue:9f2c..."},"required":true,"name":"reference","in":"path"},{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"await ensc.conversions.events.submitted(reference, txHash);\nconst settled = await ensc.conversions.events.confirmed(reference, txHash);\n// or: await ensc.conversions.events.failed(reference, reason)"}]}},"/v1/conversions/{reference}/voucher":{"post":{"tags":["Conversions"],"summary":"Issue or re-issue the voucher","description":"For a conversion whose voucher expired, whose screening hold was lifted, or whose bank transfer has been confirmed. Crypto legs are re-quoted. Request body is an EncryptedRequestEnvelope whose plaintext is EmptyRequest; response is a SealedResponseEnvelope whose plaintext is Conversion.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"op:crypto-issue:9f2c..."},"required":true,"name":"reference","in":"path"},{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const c = await ensc.conversions.voucher(reference);"}]}},"/v1/conversions/{reference}/payout":{"post":{"tags":["Conversions"],"summary":"Retry a pending payout","description":"fiat-redeem only, while the payout is waiting to be initiated. Request body is an EncryptedRequestEnvelope whose plaintext is EmptyRequest; response is a SealedResponseEnvelope whose plaintext is Conversion.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"op:crypto-issue:9f2c..."},"required":true,"name":"reference","in":"path"},{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const c = await ensc.conversions.payout(reference);"}]}},"/v1/accounts/resolve":{"post":{"tags":["Banks"],"summary":"Resolve a bank account name","description":"Request body is an EncryptedRequestEnvelope whose plaintext is ResolveAccountRequest; response is a SealedResponseEnvelope whose plaintext is ResolveAccountResponse.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { accountName } = await ensc.accounts.resolve({ bankCode: '044', accountNumber: '0123456789' });"}]}},"/v1/transfer":{"post":{"tags":["Transfer"],"summary":"Build an unsigned ENSC transfer","description":"Request body is an EncryptedRequestEnvelope whose plaintext is TransferRequest; response is a SealedResponseEnvelope whose plaintext is TransferResponse.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { unsignedTransaction } = await ensc.transfer.create({ from: wallet, recipient, amount: '25', chain: 'celo' });"}]}},"/v1/api-keys":{"get":{"tags":["API Keys"],"summary":"List API keys","description":"Sealed (ListApiKeysResponse inside a SealedResponseEnvelope).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from previous response"},"required":false,"description":"Opaque cursor from previous response","name":"cursor","in":"query"}],"responses":{"200":{"description":"List or object","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY...","description":"Echoed in every response. Reference in support tickets."},"required":true,"description":"Echoed in every response. Reference in support tickets."},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15","description":"The API date version the server is running."},"required":true,"description":"The API date version the server is running."}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SealedResponseEnvelope"},{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"kind":{"type":"string","enum":["pk","sk","rk"]},"prefix":{"type":"string"},"name":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"ipAllowlist":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","rotated","revoked"]},"lastUsedAt":{"type":["number","null"]},"createdAt":{"type":"number"},"expiresAt":{"type":["number","null"]}},"required":["id","env","kind","prefix","name","scopes","ipAllowlist","status","lastUsedAt","createdAt","expiresAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["keys","pagination"]}]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { keys } = await ensc.apiKeys.list({ env: 'live' });"}]}},"/v1/signing-keys":{"get":{"tags":["Signing Keys"],"summary":"List registered signing keys","description":"Sealed (ListSigningKeysResponse inside a SealedResponseEnvelope).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from previous response"},"required":false,"description":"Opaque cursor from previous response","name":"cursor","in":"query"}],"responses":{"200":{"description":"List or object","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY...","description":"Echoed in every response. Reference in support tickets."},"required":true,"description":"Echoed in every response. Reference in support tickets."},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15","description":"The API date version the server is running."},"required":true,"description":"The API date version the server is running."}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SealedResponseEnvelope"},{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"publicKey":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["active","rotated","revoked"]},"expiresAt":{"type":["integer","null"]},"createdAt":{"type":"number"}},"required":["id","env","publicKey","name","status","expiresAt","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["keys","pagination"]}]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { keys } = await ensc.signingKeys.list();"}]}},"/v1/encryption-keys":{"get":{"tags":["Encryption Keys"],"summary":"List encryption keys (no key material)","description":"Sealed (ListEncryptionKeysResponse inside a SealedResponseEnvelope).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from previous response"},"required":false,"description":"Opaque cursor from previous response","name":"cursor","in":"query"}],"responses":{"200":{"description":"List or object","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY...","description":"Echoed in every response. Reference in support tickets."},"required":true,"description":"Echoed in every response. Reference in support tickets."},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15","description":"The API date version the server is running."},"required":true,"description":"The API date version the server is running."}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SealedResponseEnvelope"},{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^enc_[0-9A-Z]{26}$"},"env":{"type":"string","enum":["test","live"]},"name":{"type":["string","null"]},"status":{"type":"string","enum":["active","rotated","revoked"]},"expiresAt":{"type":["number","null"]},"createdAt":{"type":"number"}},"required":["id","env","name","status","expiresAt","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["keys","pagination"]}]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { keys } = await ensc.encryptionKeys.list();"}]}},"/v1/origins":{"get":{"tags":["Origins"],"summary":"List allowed origins","description":"Sealed (ListAllowedOriginsResponse inside a SealedResponseEnvelope).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from previous response"},"required":false,"description":"Opaque cursor from previous response","name":"cursor","in":"query"}],"responses":{"200":{"description":"List or object","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY...","description":"Echoed in every response. Reference in support tickets."},"required":true,"description":"Echoed in every response. Reference in support tickets."},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15","description":"The API date version the server is running."},"required":true,"description":"The API date version the server is running."}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SealedResponseEnvelope"},{"type":"object","properties":{"origins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"origin":{"type":"string"},"createdAt":{"type":"number"}},"required":["id","env","origin","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["origins","pagination"]}]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { origins } = await ensc.origins.list();"}]}},"/v1/webhook-endpoints":{"post":{"tags":["Webhooks"],"summary":"Register a webhook endpoint","description":"Request body is an EncryptedRequestEnvelope whose plaintext is CreateWebhookEndpointRequest; response is a SealedResponseEnvelope whose plaintext is CreateWebhookEndpointResponse.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const ep = await ensc.webhookEndpoints.create({ env: 'live', url: 'https://merchant.example.com/ensc/webhooks', eventTypes: ['*'] });"}]},"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","description":"Sealed (ListWebhookEndpointsResponse inside a SealedResponseEnvelope).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from previous response"},"required":false,"description":"Opaque cursor from previous response","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["test","live"]},"required":false,"name":"env","in":"query"}],"responses":{"200":{"description":"List or object","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY...","description":"Echoed in every response. Reference in support tickets."},"required":true,"description":"Echoed in every response. Reference in support tickets."},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15","description":"The API date version the server is running."},"required":true,"description":"The API date version the server is running."}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SealedResponseEnvelope"},{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"url":{"type":"string"},"description":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string"}},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"type":"number"}},"required":["id","env","url","description","eventTypes","apiVersion","status","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["endpoints","pagination"]}]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { endpoints } = await ensc.webhookEndpoints.list({ env: 'live' });"}]}},"/v1/webhook-endpoints/{id}":{"get":{"tags":["Webhooks"],"summary":"Fetch a webhook endpoint","description":"Sealed (WebhookEndpoint inside a SealedResponseEnvelope).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"List or object","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY...","description":"Echoed in every response. Reference in support tickets."},"required":true,"description":"Echoed in every response. Reference in support tickets."},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15","description":"The API date version the server is running."},"required":true,"description":"The API date version the server is running."}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SealedResponseEnvelope"},{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"url":{"type":"string"},"description":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string"}},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"type":"number"}},"required":["id","env","url","description","eventTypes","apiVersion","status","createdAt"]}]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const ep = await ensc.webhookEndpoints.get(endpointId);"}]},"patch":{"tags":["Webhooks"],"summary":"Update a webhook endpoint","description":"Request body is an EncryptedRequestEnvelope whose plaintext is UpdateWebhookEndpointRequest; response is a SealedResponseEnvelope whose plaintext is UpdateWebhookEndpointResponse.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"await ensc.webhookEndpoints.update(endpointId, { status: 'disabled' });"}]},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook endpoint","description":"Request body is an EncryptedRequestEnvelope whose plaintext is EmptyRequest; response is a SealedResponseEnvelope whose plaintext is RemoveWebhookEndpointResponse.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"await ensc.webhookEndpoints.remove(endpointId);"}]}},"/v1/webhook-endpoints/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Send a synthetic test event to an endpoint","description":"Request body is an EncryptedRequestEnvelope whose plaintext is SendTestEventRequest; response is a SealedResponseEnvelope whose plaintext is SendTestEventResponse.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"202":{"description":"Sealed response (test event queued)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const r = await ensc.webhookEndpoints.sendTest(endpointId, { eventType: 'payout.succeeded' });\n// r.willDeliverToTargetEndpoint, r.eventId"}]}},"/v1/events":{"get":{"tags":["Events"],"summary":"List outbound events","description":"Sealed (ListEventsResponse inside a SealedResponseEnvelope).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from previous response"},"required":false,"description":"Opaque cursor from previous response","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["test","live"]},"required":false,"name":"env","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"type","in":"query"}],"responses":{"200":{"description":"List or object","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY...","description":"Echoed in every response. Reference in support tickets."},"required":true,"description":"Echoed in every response. Reference in support tickets."},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15","description":"The API date version the server is running."},"required":true,"description":"The API date version the server is running."}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SealedResponseEnvelope"},{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"eventType":{"type":"string"},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["created","in_flight","dispatched","abandoned"]},"createdAt":{"type":"number"},"dispatchedAt":{"type":["number","null"]},"payload":{}},"required":["id","env","eventType","apiVersion","status","createdAt","dispatchedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["events","pagination"]}]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { events } = await ensc.events.list({ type: 'conversion.succeeded' });"}]}},"/v1/events/{id}":{"get":{"tags":["Events"],"summary":"Fetch an event with its delivery attempts","description":"Sealed (EventDetail inside a SealedResponseEnvelope).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"List or object","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY...","description":"Echoed in every response. Reference in support tickets."},"required":true,"description":"Echoed in every response. Reference in support tickets."},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15","description":"The API date version the server is running."},"required":true,"description":"The API date version the server is running."}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SealedResponseEnvelope"},{"type":"object","properties":{"id":{"type":"string"},"env":{"type":"string","enum":["test","live"]},"eventType":{"type":"string"},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["created","in_flight","dispatched","abandoned"]},"createdAt":{"type":"number"},"dispatchedAt":{"type":["number","null"]},"payload":{},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"endpointId":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed","gave_up"]},"responseStatus":{"type":["number","null"]},"attempt":{"type":"number"},"deliveredAt":{"type":["number","null"]},"nextAttemptAt":{"type":["number","null"]},"createdAt":{"type":"number"},"responseSnippet":{"type":["string","null"]}},"required":["id","endpointId","status","responseStatus","attempt","deliveredAt","nextAttemptAt","createdAt","responseSnippet"]}}},"required":["id","env","eventType","apiVersion","status","createdAt","dispatchedAt","deliveries"]}]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const detail = await ensc.events.get(eventId); // detail.deliveries[]"}]}},"/v1/test-data/events":{"post":{"tags":["Test Data"],"summary":"Emit a synthetic test event","description":"Always lands in env=test regardless of the calling key. Request body is an EncryptedRequestEnvelope whose plaintext is TriggerTestEventRequest; response is a SealedResponseEnvelope whose plaintext is TriggerTestEventResponse.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","example":"1714579200","description":"Unix seconds. Must be within ±300s of server time."},"required":true,"description":"Unix seconds. Must be within ±300s of server time.","name":"X-ENSC-Timestamp","in":"header"},{"schema":{"type":"string","example":"fGV3...8Y","description":"128-bit random nonce, base64url. Rejected if reused within 10 min."},"required":true,"description":"128-bit random nonce, base64url. Rejected if reused within 10 min.","name":"X-ENSC-Nonce","in":"header"},{"schema":{"type":"string","example":"sig_01HXY...","description":"ID of the registered signing public key."},"required":true,"description":"ID of the registered signing public key.","name":"X-ENSC-Key-Id","in":"header"},{"schema":{"type":"string","example":"ed25519=<base64url>","description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign)."},"required":true,"description":"Ed25519 signature over the canonical request string (ENSC-V1). The body hash in that string is the SHA-256 of the encrypted envelope bytes (encrypt-then-sign).","name":"X-ENSC-Signature","in":"header"},{"schema":{"type":"string","example":"01HXY1ZQK5R...","description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias."},"required":false,"description":"Caller-supplied idempotency key (8 to 64 chars, [A-Za-z0-9_-]). `Idempotency-Key` is accepted as an alias.","name":"X-ENSC-Idempotency-Key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncryptedRequestEnvelope"}}}},"responses":{"200":{"description":"Sealed response","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"201":{"description":"Sealed response (created)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"202":{"description":"Sealed response (synthetic event queued)","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY..."},"required":true},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15"},"required":true},"X-ENSC-Signature":{"schema":{"type":"string","example":"ed25519=<base64url>","description":"ENSC signature over the sealed body."},"required":true,"description":"ENSC signature over the sealed body."},"X-ENSC-Key-Id":{"schema":{"type":"string","description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"required":true,"description":"Which ENSC key signed; see /v1/.well-known/ensc-public-keys.json."},"X-ENSC-Timestamp":{"schema":{"type":"string","example":"1714579200"},"required":true}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealedResponseEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency conflict or nonce reuse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"await ensc.testEvents.emit({ eventType: 'conversion.succeeded' });"}]},"get":{"tags":["Test Data"],"summary":"List the built-in test event templates","description":"Sealed (TestEventCatalog inside a SealedResponseEnvelope).","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List or object","headers":{"X-ENSC-Request-Id":{"schema":{"type":"string","example":"req_01HXY...","description":"Echoed in every response. Reference in support tickets."},"required":true,"description":"Echoed in every response. Reference in support tickets."},"X-ENSC-API-Version":{"schema":{"type":"string","example":"2026-09-15","description":"The API date version the server is running."},"required":true,"description":"The API date version the server is running."}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SealedResponseEnvelope"},{"type":"object","properties":{"supported":{"type":"array","items":{"type":"object","properties":{"eventType":{"type":"string"},"samplePayload":{}},"required":["eventType"]}}},"required":["supported"]}]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authenticated but lacks scope/permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-codeSamples":[{"lang":"typescript","label":"@ensc/sdk","source":"const { supported } = await ensc.testEvents.list();"}]}}},"webhooks":{}}