{"openapi":"3.1.0","info":{"title":"Yānqīthā API","version":"1.0.0-sandbox","description":"BAPC's verified digital-asset ledger. Every write needs an Idempotency-Key. Only the public Verify endpoints work without sign-in. Not live."},"servers":[{"url":"https://yanqitha.bapc.app"}],"paths":{"/v1/classes":{"post":{"operationId":"registerAssetClass","summary":"Register an Asset Class. Requires passed rights eligibility; triggers a Cradara-Karnóc check.","x-caller":"AI Interactive","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"class_id":{"type":"string","pattern":"^yqt_cls_[0-9A-Za-z]{8,40}$"},"status":{"type":"string"},"verification":{"type":"string","const":"pending"}},"required":["class_id","status","verification"],"additionalProperties":false}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"rights_not_eligible; idempotency_conflict","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"project_id":{"type":"string","minLength":1,"maxLength":120},"project_version":{"type":"string","minLength":1,"maxLength":60},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":4000},"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"media_ref":{"type":"string","maxLength":500},"license_id":{"type":"string","minLength":1,"maxLength":120},"rights_evidence_ref":{"type":"string","maxLength":500},"contributors":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^acct_[0-9A-Za-z]{4,40}$"}},"split_agreement_ref":{"type":"string","maxLength":500},"edition_type":{"type":"string","enum":["unique","multi"]},"max_supply":{"type":"integer","minimum":1,"maximum":1000000},"entitlements":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"grant_type":{"type":"string","enum":["content","level","event"]},"grant_ref":{"type":"string","minLength":1,"maxLength":200},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"revocable":{"type":"boolean"}},"required":["grant_type","grant_ref"],"additionalProperties":false}},"rarity_tier":{"type":"string","maxLength":40},"season":{"type":"string","maxLength":40},"creator_account_id":{"type":"string","pattern":"^acct_[0-9A-Za-z]{4,40}$"},"sample":{"type":"boolean"}},"required":["project_id","project_version","title","content_hash","license_id","edition_type","max_supply"],"additionalProperties":false}}}}}},"/v1/classes/{class_id}":{"get":{"operationId":"getAssetClass","summary":"An Asset Class. Private fields only for the owner tenant.","x-caller":"Any signed-in","parameters":[{"name":"class_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"class_id":{"type":"string","pattern":"^yqt_cls_[0-9A-Za-z]{8,40}$"},"title":{"type":"string"},"description":{"type":"string"},"project_id":{"type":"string"},"project_version":{"type":"string"},"content_hash":{"type":"string"},"license_id":{"type":"string"},"edition_type":{"type":"string","enum":["unique","multi"]},"max_supply":{"type":"number"},"issued_count":{"type":"number"},"status":{"type":"string"},"rarity_tier":{"type":["string","null"]},"season":{"type":["string","null"]},"sample":{"type":"boolean"},"verification":{"type":"object","properties":{"result":{"anyOf":[{"type":"string","enum":["Critical","High","Medium","Low","Insufficient evidence"]},{"type":"null"}]},"checked_at":{"type":["string","null"]},"proof_ref":{"type":["string","null"]}},"required":["result","checked_at","proof_ref"],"additionalProperties":false},"private":{"type":"object","properties":{"rights_evidence_ref":{"type":["string","null"]},"split_agreement_ref":{"type":["string","null"]},"contributors":{"type":"array","items":{"type":"string"}}},"required":["rights_evidence_ref","split_agreement_ref","contributors"],"additionalProperties":false}},"required":["class_id","title","description","project_id","project_version","content_hash","license_id","edition_type","max_supply","issued_count","status","rarity_tier","season","sample","verification"],"additionalProperties":false}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/issuances":{"post":{"operationId":"requestIssuance","summary":"Start the issue flow; answers 202 with the request id.","x-caller":"AI Interactive (for a user)","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"request_id":{"type":"string","pattern":"^yqt_req_[0-9A-Za-z]{8,40}$"},"state":{"type":"string","enum":["pending_check","held","awaiting_payment","issued","failed"]},"billing_checkout_url":{"type":["string","null"]}},"required":["request_id","state","billing_checkout_url"],"additionalProperties":false}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"feature_disabled; forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"rights_not_eligible; risk_blocked; supply_exhausted; idempotency_conflict","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"class_id":{"type":"string","pattern":"^yqt_cls_[0-9A-Za-z]{8,40}$"},"account_id":{"type":"string","pattern":"^acct_[0-9A-Za-z]{4,40}$"},"quantity":{"type":"integer","minimum":1,"maximum":10},"user_approval":{"type":"object","properties":{"approved_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"screen":{"type":"string","minLength":1,"maxLength":80}},"required":["approved_at","screen"],"additionalProperties":false}},"required":["class_id","account_id","quantity","user_approval"],"additionalProperties":false}}}}}},"/v1/issuances/{request_id}":{"get":{"operationId":"getIssuanceStatus","summary":"Issue flow state: pending_check, held, awaiting_payment, issued or failed (with error_code: risk_held, risk_blocked, payment_required, supply_exhausted).","x-caller":"Requester","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"request_id":{"type":"string","pattern":"^yqt_req_[0-9A-Za-z]{8,40}$"},"class_id":{"type":"string","pattern":"^yqt_cls_[0-9A-Za-z]{8,40}$"},"state":{"type":"string","enum":["pending_check","held","awaiting_payment","issued","failed"]},"quantity":{"type":"number"},"ck_result":{"anyOf":[{"type":"string","enum":["Critical","High","Medium","Low","Insufficient evidence"]},{"type":"null"}]},"billing_checkout_url":{"type":["string","null"]},"edition_ids":{"type":"array","items":{"type":"string","pattern":"^yqt_ed_[0-9A-Za-z]{8,40}$"}},"error_code":{"type":["string","null"]},"hold_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["request_id","class_id","state","quantity","ck_result","billing_checkout_url","edition_ids","error_code","hold_reason","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/claims":{"post":{"operationId":"redeemClaimCode","summary":"Issue an edition from a valid single-use claim code (issuance, not a transfer).","x-caller":"Signed-in user","x-feature-flag":"yqt.claim_codes","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"edition_id":{"type":"string","pattern":"^yqt_ed_[0-9A-Za-z]{8,40}$"},"serial":{"type":"string"}},"required":["edition_id","serial"],"additionalProperties":false}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"supply_exhausted; conflict","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":6,"maxLength":64}},"required":["code"],"additionalProperties":false}}}}}},"/v1/editions/{edition_id}":{"get":{"operationId":"getEdition","summary":"An edition. Full detail for the owner; never the owner identity for anyone else.","x-caller":"Owner, BAPC apps","parameters":[{"name":"edition_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"edition_id":{"type":"string","pattern":"^yqt_ed_[0-9A-Za-z]{8,40}$"},"class_id":{"type":"string","pattern":"^yqt_cls_[0-9A-Za-z]{8,40}$"},"title":{"type":"string"},"serial":{"type":"string"},"status":{"type":"string","enum":["issued","revoked","redeemed","exported"]},"marked":{"type":["string","null"]},"license_id":{"type":"string"},"content_hash":{"type":"string"},"unlocks":{"type":"array","items":{"type":"object","properties":{"grant_type":{"type":"string","enum":["content","level","event"]},"grant_ref":{"type":"string","minLength":1,"maxLength":200},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"revocable":{"type":"boolean"}},"required":["grant_type","grant_ref"],"additionalProperties":false}},"owned_by_you":{"type":"boolean"},"acquired_at":{"type":["string","null"]},"sample":{"type":"boolean"},"history":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"at":{"type":"string"},"event_id":{"type":"string"},"reason":{"type":["string","null"]}},"required":["type","at","event_id","reason"],"additionalProperties":false}},"verify_url":{"type":"string"}},"required":["edition_id","class_id","title","serial","status","marked","license_id","content_hash","unlocks","owned_by_you","acquired_at","sample","history","verify_url"],"additionalProperties":false}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"not_owner","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/editions":{"get":{"operationId":"listOwnedEditions","summary":"Your Vault: every edition you own, paged and filterable by project, type and status.","x-caller":"Signed-in user","parameters":[],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/entitlements/check":{"post":{"operationId":"checkEntitlement","summary":"Does this account hold a pass that unlocks X? Granted or not, plus the edition id.","x-caller":"BAPC apps","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"granted":{"type":"boolean"},"edition_id":{"anyOf":[{"type":"string","pattern":"^yqt_ed_[0-9A-Za-z]{8,40}$"},{"type":"null"}]}},"required":["granted","edition_id"],"additionalProperties":false}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account_id":{"type":"string","pattern":"^acct_[0-9A-Za-z]{4,40}$"},"grant_type":{"type":"string","enum":["content","level","event"]},"grant_ref":{"type":"string","minLength":1,"maxLength":200}},"required":["account_id","grant_type","grant_ref"],"additionalProperties":false}}}}}},"/v1/editions/{edition_id}/redeem":{"post":{"operationId":"redeemEdition","summary":"Use a pass (content, a game level or an event); records REDEEMED.","x-caller":"Owner, via app","parameters":[{"name":"edition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"edition_id":{"type":"string","pattern":"^yqt_ed_[0-9A-Za-z]{8,40}$"},"status":{"type":"string","const":"redeemed"}},"required":["edition_id","status"],"additionalProperties":false}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"not_owner","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"conflict; idempotency_conflict","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account_id":{"type":"string","pattern":"^acct_[0-9A-Za-z]{4,40}$"},"context":{"type":"string","maxLength":200}},"additionalProperties":false}}}}}},"/v1/editions/{edition_id}/revoke":{"post":{"operationId":"revokeEdition","summary":"Revoke an edition. Reason required. Staff revocations need a second staff approval; Billing revokes on refund.","x-caller":"Staff, Billing (refund)","parameters":[{"name":"edition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"edition_id":{"type":"string","pattern":"^yqt_ed_[0-9A-Za-z]{8,40}$"},"state":{"type":"string","enum":["proposed","revoked"]},"proposal_id":{"type":["string","null"]},"needs_second_approval":{"type":"boolean"}},"required":["edition_id","state","proposal_id","needs_second_approval"],"additionalProperties":false}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"idempotency_conflict","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":500},"billing_order_id":{"type":"string"}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/editions/{edition_id}/export":{"post":{"operationId":"requestExport","summary":"Export to your own wallet. Off until Gate T3 (and L3).","x-caller":"Owner","x-feature-flag":"yqt.export.enabled","parameters":[{"name":"edition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/verify/{edition_id}":{"get":{"operationId":"verifyEdition","summary":"Is this edition genuine? No owner identity is ever returned. Cached at the edge.","x-caller":"Public","parameters":[{"name":"edition_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"genuine":{"type":"boolean"},"class":{"type":["string","null"]},"serial":{"type":["string","null"]},"status":{"type":["string","null"]},"verified_by":{"anyOf":[{"type":"object","properties":{"system":{"type":"string","const":"Cradara-Karnóc"},"result":{"type":"string","enum":["Critical","High","Medium","Low","Insufficient evidence"]},"checked_at":{"type":"string"}},"required":["system","result","checked_at"],"additionalProperties":false},{"type":"null"}]},"history":{"type":"array","items":{"type":"string"}},"ledger_block":{"type":["number","null"]},"anchor":{"type":"null"},"content_hash":{"type":"string"},"sample":{"type":"boolean"},"marked":{"type":["string","null"]}},"required":["genuine","class","serial","status","verified_by","history","ledger_block","anchor"],"additionalProperties":false}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/anchors/{block_no}/proof":{"get":{"operationId":"getAnchorProof","summary":"Public-chain anchor proof. Off until Gate T2.","x-caller":"Public","x-feature-flag":"yqt.anchor.enabled","parameters":[{"name":"block_no","in":"path","required":true,"schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/drops":{"post":{"operationId":"createDrop","summary":"Create a phased drop","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.drops","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/drops/calendar":{"get":{"operationId":"getDropCalendar","summary":"Public calendar of verified drops","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.drops","parameters":[],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/drops/{drop_id}/preorders":{"post":{"operationId":"enterPreorder","summary":"Enter a pre-order lottery (one entry per verified person)","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.preorders","parameters":[{"name":"drop_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/reveals/{reveal_id}/proof":{"get":{"operationId":"getRevealProof","summary":"Published seed, odds and results hash for checking fairness","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.reveals","parameters":[{"name":"reveal_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/perks/{perk_id}/use":{"post":{"operationId":"usePerk","summary":"Lock, redeem or burn an edition for a perk","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.perks","parameters":[{"name":"perk_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/crafting/{recipe_id}":{"post":{"operationId":"craft","summary":"Combine editions into a new one","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.crafting","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/quests":{"get":{"operationId":"listMyQuests","summary":"Quest status","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.quests","parameters":[],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/quests/{id}/progress":{"post":{"operationId":"reportQuestProgress","summary":"Partner apps report quest steps","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.quests","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/editions/{edition_id}/delegations":{"post":{"operationId":"delegateEdition","summary":"Delegate use of an edition","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.delegation","parameters":[{"name":"edition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/editions/{edition_id}/credential":{"get":{"operationId":"getEditionCredential","summary":"The edition as a W3C verifiable credential","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.credentials","parameters":[{"name":"edition_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/claims/batches":{"post":{"operationId":"createClaimBatch","summary":"Create claim-code batches","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.claim_codes","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/creators/{id}/analytics":{"get":{"operationId":"getCreatorAnalytics","summary":"Creator dashboard data","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.analytics","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent-grants":{"post":{"operationId":"createAgentGrant","summary":"Owner grants an AI agent limited actions and a spend limit","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.agents","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/orgs/{rest}":{"get":{"operationId":"getOrganization","summary":"Organization members, roles, SSO and white-label settings","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.organizations","parameters":[{"name":"rest","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"operationId":"updateOrganization","summary":"Organization members, roles, SSO and white-label settings","x-caller":"see Section 12 (special features)","x-feature-flag":"yqt.organizations","parameters":[{"name":"rest","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"security":[{"bapcSignIn":[]},{"serviceToken":[]}],"responses":{"200":{"description":"OK"},"403":{"description":"feature_disabled","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"bapcSignIn":{"type":"http","scheme":"bearer","description":"Sign in with BAPC (OAuth 2.0 / OpenID Connect) session"},"serviceToken":{"type":"http","scheme":"bearer","bearerFormat":"JWS (EdDSA)","description":"Signed service token naming the calling BAPC app and its tenant"}}}}