{"openapi":"3.1.0","info":{"title":"Calmproof Sandbox API","description":"Signed context attestations for EU digital identity wallet presentations. Sandbox: test data only.","version":"0.2.0"},"paths":{"/v1/sandbox/signup":{"post":{"tags":["Sandbox"],"summary":"Create a sandbox organisation and API key","operationId":"signup_v1_sandbox_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me":{"get":{"tags":["Account"],"summary":"Your organisation","description":"Name, the name customers see in the wallet, environment and webhook URL.","operationId":"me_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/keys/rotate":{"post":{"tags":["Account"],"summary":"Revoke all current API keys and issue a new one","operationId":"rotate_key_v1_keys_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/requests":{"post":{"tags":["Verifier"],"summary":"Create a presentation request","operationId":"create_request_v1_requests_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Verifier"],"summary":"List recent requests","description":"Newest first, up to 100.","operationId":"list_requests_v1_requests_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/requests/{request_id}":{"get":{"tags":["Verifier"],"summary":"Get one request with its decision","description":"Status is pending, decided or expired. When decided: the verified context record (`attestation`), the policy `decision`, the `initial_decision` and any `follow_up`.","operationId":"get_request_v1_requests__request_id__get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verify":{"post":{"tags":["Verifier"],"summary":"Verify a context attestation you received yourself","operationId":"verify_v1_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/policy":{"get":{"tags":["Policy"],"summary":"Get your policy","operationId":"get_policy_v1_policy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["Policy"],"summary":"Replace your policy","description":"Validated strictly: unknown fields, unknown actions and transaction types missing from `transaction_types` are rejected with 400. Omitting `require_context_attestation_for` means every transaction type requires a record.","operationId":"put_policy_v1_policy_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook":{"put":{"tags":["Webhooks"],"summary":"Set or remove the webhook URL; returns a new signing secret","operationId":"put_webhook_v1_webhook_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhook/test":{"post":{"tags":["Webhooks"],"summary":"Send a signed test event","description":"Limited to 10 per minute.","operationId":"test_webhook_v1_webhook_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/events":{"get":{"tags":["Webhooks"],"summary":"Poll events (same payloads as webhooks)","operationId":"events_v1_events_get","parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wallet/keys":{"post":{"tags":["Wallet (sandbox)"],"summary":"Register a test-wallet public key in the sandbox trust list","operationId":"register_wallet_key_v1_wallet_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletKeyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wallet/requests/{request_id}":{"get":{"tags":["Wallet (sandbox)"],"summary":"Wallet reads a request","description":"The request id in the wallet link is the capability. Returns the verifier name, purpose and nonce.","operationId":"wallet_get_request_v1_wallet_requests__request_id__get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wallet/requests/{request_id}/response":{"post":{"tags":["Wallet (sandbox)"],"summary":"Wallet posts the presentation and the context attestation","operationId":"wallet_response_v1_wallet_requests__request_id__response_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponseIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/wallet/requests/{request_id}/follow-up":{"post":{"tags":["Wallet (sandbox)"],"summary":"Situation changed after consent","operationId":"wallet_follow_up_v1_wallet_requests__request_id__follow_up_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowUpIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CreateRequestIn":{"properties":{"purpose":{"type":"string","title":"Purpose","description":"Transaction type, e.g. payee_add, account_opening, login"},"channel":{"type":"string","enum":["same_device","cross_device"],"title":"Channel","default":"same_device"},"reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Reference","description":"Your own case or session reference"},"expected_call":{"type":"boolean","title":"Expected Call","description":"True if YOUR staff is on the phone with the customer right now","default":false}},"type":"object","required":["purpose"],"title":"CreateRequestIn"},"FollowUpIn":{"properties":{"context_attestation":{"type":"string","maxLength":16000,"title":"Context Attestation"}},"type":"object","required":["context_attestation"],"title":"FollowUpIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SignupIn":{"properties":{"organisation":{"type":"string","maxLength":120,"minLength":2,"title":"Organisation"},"email":{"type":"string","maxLength":200,"minLength":5,"title":"Email"},"display_name":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["organisation","email"],"title":"SignupIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyIn":{"properties":{"context_attestation":{"type":"string","maxLength":16000,"title":"Context Attestation"},"nonce":{"type":"string","maxLength":200,"title":"Nonce"},"purpose":{"type":"string","maxLength":40,"title":"Purpose"},"vp_hash":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Vp Hash","description":"SHA-256 (base64url) of the presentation; strongly recommended"},"kind":{"type":"string","enum":["primary","follow_up"],"title":"Kind","default":"primary"}},"type":"object","required":["context_attestation","nonce","purpose"],"title":"VerifyIn"},"WalletKeyIn":{"properties":{"jwk":{"additionalProperties":true,"type":"object","title":"Jwk"},"label":{"type":"string","maxLength":80,"title":"Label","default":"Test wallet"}},"type":"object","required":["jwk"],"title":"WalletKeyIn"},"WalletResponseIn":{"properties":{"vp_token":{"type":"string","maxLength":16000,"title":"Vp Token"},"context_attestation":{"anyOf":[{"type":"string","maxLength":16000},{"type":"null"}],"title":"Context Attestation"}},"type":"object","required":["vp_token"],"title":"WalletResponseIn"},"WebhookIn":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Url"}},"type":"object","title":"WebhookIn"}}}}