{"openapi":"3.1.0","info":{"title":"Modulr developer portal service (staging)","version":"0.1.0","description":"Accounts, organisations, signing identities, scoped CLI tokens, audit log and private partner storage. Staging build: no mail is sent, passwords are scrypt, nothing here is production."},"servers":[{"url":"http://127.0.0.1:18940"}],"paths":{"/badge/{file}":{"get":{"operationId":"badge","summary":"Badge by bundle hash (/badge/<64 hex>.svg): the state of the newest public report of that exact build; grey \"not verified\" when none exists","tags":["Reports"],"security":[],"parameters":[{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"image/svg+xml":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/dl/{token}":{"get":{"operationId":"download","summary":"Redeem a signed link (no credentials; the link is the credential and lasts 60 seconds)","tags":["Private storage"],"security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/healthz":{"get":{"operationId":"health","summary":"Liveness and schema state","tags":["Misc"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hub-dl/{token}":{"get":{"operationId":"hubFile","summary":"Redeem a signed download link: the file is served only if the gate still passes and the stored bytes still hash to the certified value","tags":["Hub"],"security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"openapi","summary":"This API description","tags":["Misc"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/r/{id}":{"get":{"operationId":"reportPage","summary":"The report page at its permalink (/r/20417), or /r/20417.json for the machine-readable report. Public after a release-run pass or when the vendor publishes; a member sees their own private reports (send the session or token).","tags":["Reports"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"text/html":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/r/{num}/film/{file}":{"get":{"operationId":"reportFilm","summary":"The evidence film of a target (mp4, recorded on request for a release run; supports byte ranges)","tags":["Reports"],"security":[],"parameters":[{"name":"num","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"video/mp4":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/r/{num}/journal/{file}":{"get":{"operationId":"reportJournal","summary":"The raw journal of one target (what `modulr check --json` wrote), stored with the run","tags":["Reports"],"security":[],"parameters":[{"name":"num","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/r/{num}/runner/{file}":{"get":{"operationId":"reportRunnerFile","summary":"The runner's own `modulr report` output for a target (html or json), when the pinned runner has that command","tags":["Reports"],"security":[],"parameters":[{"name":"num","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"text/html":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v/{org}/{product}/{version}":{"get":{"operationId":"versionPermalink","summary":"Version-stable permalink: /v/<org>/<product>/<version> or /v/<org>/<product>/latest redirects to the newest public report of that version (add ?format=json for the JSON)","tags":["Reports"],"security":[],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/login":{"post":{"operationId":"login","summary":"Sign in; returns a session bearer token (mds_...)","tags":["Auth"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":500,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"password":{"type":"string","maxLength":200}},"required":["email","password"],"additionalProperties":false}}}}}},"/v1/auth/logout":{"post":{"operationId":"logout","summary":"Revoke the current session","tags":["Auth"],"security":[{"sessionBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/resend-verification":{"post":{"operationId":"resendVerification","summary":"Send a fresh verification message","tags":["Auth"],"security":[{"sessionBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/signup":{"post":{"operationId":"signup","summary":"Create an account with the staging password provider","tags":["Auth"],"security":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":500,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"password":{"type":"string","maxLength":200,"minLength":10},"name":{"type":"string","maxLength":120,"minLength":1}},"required":["email","password","name"],"additionalProperties":false}}}}}},"/v1/auth/step-up":{"post":{"operationId":"stepUp","summary":"Present a second-factor code to unlock sensitive actions on this session for a short window","tags":["Auth"],"security":[{"sessionBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":500,"pattern":"^\\d{6}$"}},"required":["code"],"additionalProperties":false}}}}}},"/v1/auth/totp/confirm":{"post":{"operationId":"totpConfirm","summary":"Confirm the authenticator app with a code; also starts a step-up window","tags":["Auth"],"security":[{"sessionBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":500,"pattern":"^\\d{6}$"}},"required":["code"],"additionalProperties":false}}}}}},"/v1/auth/totp/enroll":{"post":{"operationId":"totpEnroll","summary":"Start enrolling an authenticator app (second factor); re-enrolling needs a current step-up","tags":["Auth"],"security":[{"sessionBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/verify-email":{"post":{"operationId":"verifyEmail","summary":"Confirm an email address with the token from the verification message","tags":["Auth"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","maxLength":500,"minLength":10}},"required":["token"],"additionalProperties":false}}}}}},"/v1/catalogue/plans":{"get":{"operationId":"cataloguePlans","summary":"Plan table (limits only; prices belong to the shop price points)","tags":["Catalogue"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/pricing":{"get":{"operationId":"pricing","summary":"Plan prices, run and bandwidth prices, founding terms and cap, all from config (S-126, S-124)","tags":["Catalogue"],"security":[],"parameters":[{"name":"currency","in":"query","required":false,"schema":{"type":"string"},"description":"usd | eur | gbp | jpy | cad | aud"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/targets":{"get":{"operationId":"catalogueTargets","summary":"Format/OS targets and whether each is available yet (honest launch scope, D1/D4)","tags":["Catalogue"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/device/approve":{"post":{"operationId":"deviceApprove","summary":"Signed-in user approves a user_code for an organisation and scope (second factor required)","tags":["Device login"],"security":[{"sessionBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_code":{"type":"string","maxLength":500,"pattern":"^[A-Za-z0-9]{4}-?[A-Za-z0-9]{4}$"},"org":{"type":"string","maxLength":500},"scope":{"type":"string","maxLength":500,"enum":["submit","admin"]},"expires_in_days":{"type":"integer","minimum":1,"maximum":365}},"required":["user_code","org","scope"],"additionalProperties":false}}}},"x-requires-step-up":true}},"/v1/device/code":{"post":{"operationId":"deviceCode","summary":"CLI starts a login: returns a device_code to poll with and a user_code to type at the verification page","tags":["Device login"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","maxLength":500,"pattern":"^[a-z0-9-]{2,40}$"},"label":{"type":"string","maxLength":80}},"required":["client_id"],"additionalProperties":false}}}}}},"/v1/device/deny":{"post":{"operationId":"deviceDeny","summary":"Refuse a user_code","tags":["Device login"],"security":[{"sessionBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_code":{"type":"string","maxLength":500,"pattern":"^[A-Za-z0-9]{4}-?[A-Za-z0-9]{4}$"}},"required":["user_code"],"additionalProperties":false}}}}}},"/v1/device/token":{"post":{"operationId":"deviceToken","summary":"CLI polls with its device_code; returns the token once approved (RFC 8628 error codes while waiting)","tags":["Device login"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"device_code":{"type":"string","maxLength":500,"minLength":10},"client_id":{"type":"string","maxLength":500}},"required":["device_code"],"additionalProperties":false}}}}}},"/v1/disputes":{"post":{"operationId":"createDispute","summary":"Report a vendor name (impersonation or mistaken identity). The name shows as disputed until a reviewer decides.","tags":["Vendor names"],"security":[{"sessionBearer":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendor":{"type":"string","maxLength":500,"pattern":"^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$"},"reason":{"type":"string","maxLength":2000,"minLength":10},"evidence":{"type":"string","maxLength":2000}},"required":["vendor","reason"],"additionalProperties":false}}}}}},"/v1/founding-partners":{"get":{"operationId":"foundingPartners","summary":"The public founding-partner register: only partners who consented to be named, only by their verified name; and the pilot cap from config (S-208)","tags":["Founding partners"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/hub/catalogue":{"get":{"operationId":"hubCatalogue","summary":"Partner products for the shared Hub, in the shape of Modulr's own GET /api/hub/v1/catalogue plus vendor, verified, buy_url, entitled and a withdrawn list. Only listed (opt-in) products, plus the ones a signed-in customer owns; only the live certified version; only passed targets.","tags":["Hub"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/hub/download/{id}/{version}/{file}":{"get":{"operationId":"hubDownload","summary":"Link to the zip of the live, certified version (302 to a signed 60-second link; ?link=1 returns the link as JSON). Needs a customer session and an entitlement (or an open product). The link serves the file only after the stored bytes are re-hashed against the certified hash.","tags":["Hub"],"security":[{"customerBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"}},{"name":"link","in":"query","required":false,"schema":{"type":"string"},"description":"1 for JSON instead of a redirect"}],"responses":{"200":{"description":"Success","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/hub/installed":{"post":{"operationId":"hubInstalled","summary":"Ask about installed copies (by product id and version or bundle hash): current, update_available, withdrawn, taken_down, unrecognised, with the previous or next version to offer (S-198)","tags":["Hub"],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":120},"version":{"type":"string","maxLength":60},"bundle_hash":{"type":"string","maxLength":64,"pattern":"^[a-fA-F0-9]{64}$"}},"required":["id"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["installed"],"additionalProperties":false}}}}}},"/v1/hub/me/entitlements":{"get":{"operationId":"hubMyEntitlements","summary":"The customer's licences (from codes and from partner orders)","tags":["Hub"],"security":[{"customerBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/hub/products/{id}":{"get":{"operationId":"hubProduct","summary":"One product with its Verified data: maker, badge for the exact build hash, report link, targets that passed, buy link (S-197)","tags":["Hub"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"hash","in":"query","required":false,"schema":{"type":"string"},"description":"the installed build's bundle hash: the Verified block then speaks for that exact build"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/hub/redeem":{"post":{"operationId":"hubRedeem","summary":"Redeem a single-use code: creates the customer's entitlement and licence. Wrong codes are rate-limited (10 per 15 minutes per customer).","tags":["Hub"],"security":[{"customerBearer":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":80,"minLength":1}},"required":["code"],"additionalProperties":false}}}}}},"/v1/hub/telemetry/install":{"post":{"operationId":"hubTelemetry","summary":"Anonymous install event (install, update, remove) for a partner product (S-98). No account, address or machine identifier is stored; unknown products and versions are refused.","tags":["Hub"],"security":[],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","maxLength":120},"version":{"type":"string","maxLength":60},"event":{"type":"string","maxLength":500,"enum":["install","update","remove"]},"os":{"type":"string","maxLength":500,"enum":["macos","windows","linux"]}},"required":["product","event","os"],"additionalProperties":false}}}}}},"/v1/internal/audit/verify":{"get":{"operationId":"internalAuditVerify","summary":"Re-walk the whole hash chain","tags":["Internal"],"security":[{"serviceKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/billing/sweep":{"post":{"operationId":"internalBillingSweep","summary":"Renew due plans, run the 30-day grace to lapse, bill closed bandwidth months","tags":["Internal"],"security":[{"serviceKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/customers/session":{"post":{"operationId":"internalCustomerSession","summary":"STAGING BRIDGE: the gateway has verified the customer's modulr-audio.com account (D21) and asks for a Hub session for that address. Marks an invited customer as claimed.","tags":["Internal"],"security":[{"serviceKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"hours":{"type":"integer","minimum":1,"maximum":72}},"required":["email"],"additionalProperties":false}}}}}},"/v1/internal/disputes":{"get":{"operationId":"internalListDisputes","summary":"Reviewer queue","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"open (default), upheld, dismissed"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/disputes/{id}/resolve":{"post":{"operationId":"internalResolveDispute","summary":"Resolve a dispute. Upheld = takedown: products unlisted, tokens revoked, no vendor name shown, no new signers/uploads/products.","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","maxLength":500,"enum":["upheld","dismissed"]},"note":{"type":"string","maxLength":1000}},"required":["outcome"],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/billing/account":{"put":{"operationId":"internalAccount","summary":"Tax details of the account (VAT rate, tax id) used on invoices","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vat_percent":{"type":"integer","minimum":0,"maximum":30},"tax_id":{"type":"string","maxLength":40}},"required":[],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/billing/change-plan":{"post":{"operationId":"internalChangePlan","summary":"Change plan mid-year with proration; the anniversary and the founding lock stay","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","maxLength":500,"enum":["test","ship","ship5","pilot"]}},"required":["plan"],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/billing/invoice":{"post":{"operationId":"internalInvoiceNow","summary":"Gather the org's open ledger lines into an invoice now (held lines stay out)","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/orgs/{org}/billing/invoices/{inv}/pay":{"post":{"operationId":"internalPayInvoice","summary":"Charge an issued invoice through the provider","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"inv","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/orgs/{org}/billing/subscribe":{"post":{"operationId":"internalSubscribe","summary":"Start a plan through the payment provider (fake in staging); founding partners get year 1 free and a 50 % lock afterwards","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","maxLength":500,"enum":["test","ship","ship5","pilot"]},"currency":{"type":"string","maxLength":500,"enum":["usd","eur","gbp","jpy","cad","aud"]},"vat_percent":{"type":"integer","minimum":0,"maximum":30},"tax_id":{"type":"string","maxLength":40}},"required":["plan"],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/entitlements":{"get":{"operationId":"internalListEntitlements","summary":"All entitlements of an organisation (operator view)","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/orgs/{org}/name-verification":{"post":{"operationId":"internalNameDecision","summary":"Reviewer decision on a name verification (staging: a manual step)","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","maxLength":500,"enum":["verified","rejected"]},"note":{"type":"string","maxLength":500}},"required":["decision"],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/plan":{"put":{"operationId":"internalSetPlan","summary":"Set the plan and founding flag (manual invoicing at pilot, D35). Founding cap 5 (D15) needs consent to be named.","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","maxLength":500,"enum":["none","build","test","ship","ship5","pilot"]},"founding":{"type":"boolean"},"founding_consent":{"type":"boolean"}},"required":["plan"],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/products/{id}/bandwidth-quote":{"put":{"operationId":"internalQuote","summary":"Manual bandwidth override for a quoted product (D19)","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gb_per_month":{"type":"integer","minimum":1,"maximum":1000000},"note":{"type":"string","maxLength":300}},"required":["gb_per_month"],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/products/{id}/live":{"get":{"operationId":"internalLive","summary":"For the Hub: the live version's identity, to verify the delivered file on install (S-93)","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/orgs/{org}/products/{id}/takedown":{"post":{"operationId":"internalTakedown","summary":"Modulr takes a partner product down (malware, abuse, dispute): every version is withdrawn, the product leaves every catalogue, links stop, installed Hubs are told to remove it (S-198). public_note is shown to customers.","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":400,"minLength":3},"public_note":{"type":"string","maxLength":300,"minLength":3}},"required":["reason","public_note"],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/products/{id}/takedown-lift":{"post":{"operationId":"internalLiftTakedown","summary":"Lift a product takedown. Its versions stay withdrawn: the maker delivers a new release run to be offered again.","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/orgs/{org}/products/{id}/versions/{vid}/integrity-clear":{"post":{"operationId":"internalIntegrityClear","summary":"Clear an integrity hold after the stored file was restored: the stored zip is re-hashed first and the hold stays if it still differs","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"vid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/orgs/{org}/release-runs":{"post":{"operationId":"internalReleaseRun","summary":"Pipeline hook: a release run started; pins the named signer on the first one and locks the vendor name (D22, D34)","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signer_id":{"type":"string","maxLength":500}},"required":["signer_id"],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/restore":{"post":{"operationId":"internalRestoreOrg","summary":"Reverse a takedown; the name must be verified again","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":500}},"required":[],"additionalProperties":false}}}}}},"/v1/internal/orgs/{org}/signers/check":{"get":{"operationId":"internalSignerCheck","summary":"Pipeline hook: is this (kind, identifier) a pinned signer of the org? Only a pinned signer may release.","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"apple_team | authenticode | linux_key"},{"name":"identifier","in":"query","required":false,"schema":{"type":"string"},"description":"the signer identifier"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/orgs/{org}/usage/bandwidth":{"post":{"operationId":"internalBandwidth","summary":"Delivery reports a customer download (bytes). Never refused: a delivered product is not throttled (D16). `ref` makes it idempotent.","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","maxLength":100},"bytes":{"type":"integer","minimum":1},"ref":{"type":"string","maxLength":100},"at":{"type":"string","maxLength":40}},"required":["product","bytes"],"additionalProperties":false}}}}}},"/v1/internal/outbox":{"get":{"operationId":"devOutbox","summary":"STAGING ONLY: messages that would have been emailed (nothing is ever sent). 404 when disabled.","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"to","in":"query","required":false,"schema":{"type":"string"},"description":"recipient email"},{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"message kind"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/runner":{"get":{"operationId":"internalRunner","summary":"The pinned runner: CLI path, version and commands, worker and queue state","tags":["Internal"],"security":[{"serviceKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/runs/{rid}/mark-inconclusive":{"post":{"operationId":"internalMarkInconclusive","summary":"A rig fault was found after the fact: the run stops counting and its charge is reversed (S-224)","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300,"minLength":3}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/internal/runs/{rid}/revoke":{"post":{"operationId":"internalRevokeRun","summary":"Modulr revokes a report (takedown, wrong result)","tags":["Internal"],"security":[{"serviceKey":[]}],"parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300,"minLength":3}},"required":["reason"],"additionalProperties":false}}}}}},"/v1/internal/sweep":{"post":{"operationId":"internalSweep","summary":"Housekeeping: complete due rotations, send expiry warnings, drop dead sessions and codes","tags":["Internal"],"security":[{"serviceKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/whitelabel":{"get":{"operationId":"internalListTenants","summary":"All white-label tenants","tags":["White label"],"security":[{"serviceKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/internal/whitelabel/{tenant}":{"put":{"operationId":"internalPutTenant","summary":"Create or update a white-label tenant (provisioning is manual, D35): owner organisation, brand, optional product subset (slugs of that organisation), status","tags":["White label"],"security":[{"serviceKey":[]}],"parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"org":{"type":"string","maxLength":60},"brand":{"type":"object","properties":{"name":{"type":"string","maxLength":40,"minLength":2},"short_name":{"type":"string","maxLength":16,"minLength":1},"bundle_id":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9-]*(\\.[a-z0-9-]+){2,}$"},"colors":{"type":"object","properties":{"primary":{"type":"string","maxLength":500,"pattern":"^#[0-9a-fA-F]{6}$"},"accent":{"type":"string","maxLength":500,"pattern":"^#[0-9a-fA-F]{6}$"},"background":{"type":"string","maxLength":500,"pattern":"^#[0-9a-fA-F]{6}$"},"text":{"type":"string","maxLength":500,"pattern":"^#[0-9a-fA-F]{6}$"}},"required":["primary","accent","background"],"additionalProperties":false},"icon_svg":{"type":"string","maxLength":20000},"support_url":{"type":"string","maxLength":300,"pattern":"^https://[^\\s]+$"},"domain":{"type":"string","maxLength":120,"pattern":"^([a-z0-9-]+\\.)+[a-z]{2,}$"}},"required":["name","bundle_id","colors"],"additionalProperties":false},"products":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":100},"status":{"type":"string","maxLength":500,"enum":["staging","active","suspended"]}},"required":["org","brand"],"additionalProperties":false}}}}}},"/v1/invites/accept":{"post":{"operationId":"acceptInvite","summary":"Accept an invitation (signed in as the invited, verified email)","tags":["Team"],"security":[{"sessionBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","maxLength":500,"minLength":10}},"required":["token"],"additionalProperties":false}}}}}},"/v1/me":{"get":{"operationId":"me","summary":"The signed-in user, their organisations, and the credential in use","tags":["Auth"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/token":{"delete":{"operationId":"revokeSelf","summary":"The CLI logs out: revoke the token used for this very call","tags":["Tokens"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orgs":{"post":{"operationId":"createOrg","summary":"Create an organisation; the caller becomes its owner (needs a verified email)","tags":["Organisations"],"security":[{"sessionBearer":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","maxLength":500,"pattern":"^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$"},"legal_name":{"type":"string","maxLength":200,"minLength":2}},"required":["slug","legal_name"],"additionalProperties":false}}}}},"get":{"operationId":"listOrgs","summary":"Organisations the caller belongs to","tags":["Organisations"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orgs/{org}":{"get":{"operationId":"getOrg","summary":"One organisation (slug or id)","tags":["Organisations"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"org:read"},"patch":{"operationId":"updateOrg","summary":"Change the claimed legal name (D34: after a first release run it stays pending until re-verified)","tags":["Organisations"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"legal_name":{"type":"string","maxLength":200,"minLength":2}},"required":["legal_name"],"additionalProperties":false}}}},"x-required-permission":"org:update"}},"/v1/orgs/{org}/api-keys":{"post":{"operationId":"createApiKey","summary":"Create a shop-API key (second factor required). The secret is shown once; it can grant and revoke entitlements for this organisation's products and nothing else.","tags":["Shop API"],"security":[{"sessionBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80,"minLength":1}},"required":["name"],"additionalProperties":false}}}},"x-required-permission":"team:manage","x-requires-step-up":true},"get":{"operationId":"listApiKeys","summary":"API keys (never the secret)","tags":["Shop API"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"team:manage"}},"/v1/orgs/{org}/api-keys/{kid}":{"delete":{"operationId":"revokeApiKey","summary":"Revoke an API key at once","tags":["Shop API"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"kid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"team:manage"}},"/v1/orgs/{org}/artefact-links":{"post":{"operationId":"createArtefactLink","summary":"Mint a signed link that downloads one artefact for 60 seconds","tags":["Private storage"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","maxLength":400}},"required":["key"],"additionalProperties":false}}}},"x-required-permission":"artefact:read"}},"/v1/orgs/{org}/artefacts":{"get":{"operationId":"listArtefacts","summary":"List artefacts of the organisation","tags":["Private storage"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"prefix","in":"query","required":false,"schema":{"type":"string"},"description":"only keys starting with this"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"artefact:read"}},"/v1/orgs/{org}/artefacts/{key}":{"put":{"operationId":"putArtefact","summary":"Upload a private artefact into the organisation prefix (immutable; send x-content-sha256 to have it verified)","tags":["Private storage"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"x-required-permission":"artefact:write"},"get":{"operationId":"getArtefact","summary":"Artefact metadata (content is fetched through a signed link)","tags":["Private storage"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"artefact:read"},"delete":{"operationId":"deleteArtefact","summary":"Delete an artefact","tags":["Private storage"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"artefact:write"}},"/v1/orgs/{org}/audit":{"get":{"operationId":"listAudit","summary":"The organisation's audit trail, newest first","tags":["Audit"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"action","in":"query","required":false,"schema":{"type":"string"},"description":"exact action or prefix ending in ."},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"1-200, default 50"},{"name":"before_seq","in":"query","required":false,"schema":{"type":"string"},"description":"page cursor"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"audit:read"}},"/v1/orgs/{org}/billing":{"get":{"operationId":"getBilling","summary":"Plan, billing state, run allowance and bandwidth per product","tags":["Billing"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"billing:read"}},"/v1/orgs/{org}/billing/cancel":{"post":{"operationId":"cancelPlan","summary":"Cancel at the end of the period (30-day grace, D17)","tags":["Billing"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"billing:manage"}},"/v1/orgs/{org}/billing/invoices":{"get":{"operationId":"listInvoices","summary":"Invoices with VAT lines","tags":["Billing"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"billing:read"}},"/v1/orgs/{org}/billing/ledger":{"get":{"operationId":"getLedger","summary":"The append-only usage and charge ledger","tags":["Billing"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"plan_fee | plan_proration | run | bandwidth | adjustment"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"1-500"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"billing:read"}},"/v1/orgs/{org}/billing/retry":{"post":{"operationId":"retryPayment","summary":"Retry a failed renewal payment now","tags":["Billing"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"billing:manage"}},"/v1/orgs/{org}/billing/settings":{"patch":{"operationId":"billingSettings","summary":"Opt in to overage runs and/or set a spend cap (D16). Without an opt-in a run beyond the allowance is refused, never silently billed.","tags":["Billing"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"overage_enabled":{"type":"boolean"},"spend_cap_minor":{"type":"integer","minimum":0}},"required":[],"additionalProperties":false}}}},"x-required-permission":"billing:manage"}},"/v1/orgs/{org}/disputes":{"get":{"operationId":"listOrgDisputes","summary":"Disputes against this organisation (reporter identity withheld)","tags":["Vendor names"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"name:manage"}},"/v1/orgs/{org}/entitlements":{"get":{"operationId":"getEntitlements","summary":"Plan, limits and founding flag of the organisation","tags":["Plan"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"org:read"}},"/v1/orgs/{org}/founding-consent":{"put":{"operationId":"setFoundingConsent","summary":"A founding partner agrees (or withdraws) to be named on the public register (S-208)","tags":["Founding partners"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"consent":{"type":"boolean"}},"required":["consent"],"additionalProperties":false}}}},"x-required-permission":"org:update"}},"/v1/orgs/{org}/invites":{"post":{"operationId":"createInvite","summary":"Invite someone by email (mail goes to the staging outbox)","tags":["Team"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":500,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"role":{"type":"string","maxLength":500,"enum":["admin","dev","billing","read-only"]}},"required":["email","role"],"additionalProperties":false}}}},"x-required-permission":"team:manage"},"get":{"operationId":"listInvites","summary":"Open invitations","tags":["Team"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"team:manage"}},"/v1/orgs/{org}/invites/{id}":{"delete":{"operationId":"revokeInvite","summary":"Withdraw an invitation","tags":["Team"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"team:manage"}},"/v1/orgs/{org}/members":{"get":{"operationId":"listMembers","summary":"Members and roles","tags":["Team"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"team:read"}},"/v1/orgs/{org}/members/{userId}":{"patch":{"operationId":"changeRole","summary":"Change a member role (owners are only changed by transfer)","tags":["Team"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","maxLength":500,"enum":["admin","dev","billing","read-only"]}},"required":["role"],"additionalProperties":false}}}},"x-required-permission":"team:manage"},"delete":{"operationId":"removeMember","summary":"Remove a member, or leave (an owner must transfer ownership first)","tags":["Team"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"team:read"}},"/v1/orgs/{org}/name-verification":{"post":{"operationId":"submitNameVerification","summary":"Submit evidence for the legal name (domain proof or company check). STAGING: reviewed by hand; nothing is looked up automatically.","tags":["Vendor names"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string","maxLength":500,"enum":["domain","company_check"]},"evidence":{"type":"string","maxLength":300,"minLength":3}},"required":["method","evidence"],"additionalProperties":false}}}},"x-required-permission":"name:manage"}},"/v1/orgs/{org}/products":{"get":{"operationId":"listProducts","summary":"Partner products of the organisation","tags":["Products"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"string"},"description":"1 to include archived products"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"},"post":{"operationId":"createProduct","summary":"Register a product (unlisted by default, D12)","tags":["Products"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":1},"slug":{"type":"string","maxLength":500,"pattern":"^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$"},"kinds":{"type":"array","items":{"type":"string","maxLength":500,"enum":["instrument","effect","midi-effect","plate"]},"minItems":1,"maxItems":4},"targets":{"type":"array","items":{"type":"string","maxLength":40},"minItems":1,"maxItems":20}},"required":["name","slug","kinds","targets"],"additionalProperties":false}}}},"x-required-permission":"product:manage"}},"/v1/orgs/{org}/products/{id}":{"get":{"operationId":"getProduct","summary":"One product (id or slug)","tags":["Products"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"},"patch":{"operationId":"updateProduct","summary":"Edit a product; listing in the shared Hub is opt-in and needs a verified vendor name","tags":["Products"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":1},"kinds":{"type":"array","items":{"type":"string","maxLength":500,"enum":["instrument","effect","midi-effect","plate"]},"minItems":1,"maxItems":4},"targets":{"type":"array","items":{"type":"string","maxLength":40},"minItems":1,"maxItems":20},"listed":{"type":"boolean"}},"required":[],"additionalProperties":false}}}},"x-required-permission":"product:manage"},"delete":{"operationId":"archiveProduct","summary":"Archive a product (kept for the record, unlisted, slug stays reserved)","tags":["Products"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:manage"}},"/v1/orgs/{org}/products/{id}/bundles":{"post":{"operationId":"uploadBundle","summary":"Upload a bare bundle zip (Name.vst3/ at the top, nothing beside it). x-content-sha256 is required and verified; the object is immutable; identity is the canonical bundle hash.","tags":["Runs"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"optional label"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"run:submit"},"get":{"operationId":"listBundles","summary":"Uploaded bundles of a product","tags":["Runs"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/products/{id}/code-batches":{"post":{"operationId":"createCodeBatch","summary":"Generate a batch of single-use redeem codes (1-2500 per batch, no plan cap, optional expiry, D13). The codes themselves come from /export.csv or /hand-out.","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1},"prefix":{"type":"string","maxLength":6},"expires_at":{"type":"string","maxLength":40},"note":{"type":"string","maxLength":200}},"required":["count"],"additionalProperties":false}}}},"x-required-permission":"product:manage"},"get":{"operationId":"listCodeBatches","summary":"Batches of a product with their counts","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/products/{id}/code-batches/{bid}":{"get":{"operationId":"getCodeBatch","summary":"One batch with its counts","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"bid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/products/{id}/code-batches/{bid}/codes":{"get":{"operationId":"listBatchCodes","summary":"The codes of a batch, masked (only the last four characters), with status, who they were handed to and when redeemed. Never the customer.","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"bid","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"unused | redeemed | revoked"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/products/{id}/code-batches/{bid}/export.csv":{"get":{"operationId":"exportCodeBatch","summary":"CSV of the batch: code, status, handed_to, handed_at, redeemed_at, expires_at. The plain codes leave the service only here and in /hand-out, and each export is audited.","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"bid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:manage"}},"/v1/orgs/{org}/products/{id}/code-batches/{bid}/hand-out":{"post":{"operationId":"handOutCodes","summary":"Take the next N unused codes of a batch for a channel (a reseller, a promotion): they are marked handed out to that label and returned once","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"bid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":500},"to":{"type":"string","maxLength":120,"minLength":1}},"required":["count","to"],"additionalProperties":false}}}},"x-required-permission":"product:manage"}},"/v1/orgs/{org}/products/{id}/code-batches/{bid}/revoke":{"post":{"operationId":"revokeCodeBatch","summary":"Revoke every unused code of a batch (a leaked list, a cancelled promotion). Codes already redeemed stay redeemed unless revoke_entitlements is true.","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"bid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300,"minLength":3},"revoke_entitlements":{"type":"boolean"}},"required":["reason"],"additionalProperties":false}}}},"x-required-permission":"product:manage"}},"/v1/orgs/{org}/products/{id}/code-batches/import":{"post":{"operationId":"importCodeBatch","summary":"Import codes you already have (8-40 letters and digits each, at most 2500); they are single-use like generated ones but carry no check character","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string","maxLength":60},"minItems":1,"maxItems":2500},"expires_at":{"type":"string","maxLength":40},"note":{"type":"string","maxLength":200}},"required":["codes"],"additionalProperties":false}}}},"x-required-permission":"product:manage"}},"/v1/orgs/{org}/products/{id}/codes/revoke":{"post":{"operationId":"revokeCode","summary":"Revoke one code (by the code itself or its id). A redeemed code is revoked too only together with its entitlement (revoke_entitlement).","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":80},"id":{"type":"string","maxLength":60},"reason":{"type":"string","maxLength":300,"minLength":3},"revoke_entitlement":{"type":"boolean"}},"required":["reason"],"additionalProperties":false}}}},"x-required-permission":"product:manage"}},"/v1/orgs/{org}/products/{id}/codes/stats":{"get":{"operationId":"codeStats","summary":"Redemption counts of a product: codes, handed out, redeemed, revoked, expired; entitlements by source; downloads and this month's bandwidth","tags":["Redeem codes"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/products/{id}/deliver":{"post":{"operationId":"deliverRun","summary":"Make a passing release run the live version. Only passed targets are delivered (D9); the stored bytes are re-hashed against the tested bytes first (S-93).","tags":["Delivery state"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"string","maxLength":40}},"required":["run"],"additionalProperties":false}}}},"x-required-permission":"org:update"}},"/v1/orgs/{org}/products/{id}/install-stats":{"get":{"operationId":"installStats","summary":"Anonymous install-event counts per month (install, update, remove) from the Hub (S-98); no customer, address or machine identity is stored","tags":["Hub catalogue"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/products/{id}/rollback":{"post":{"operationId":"rollbackVersion","summary":"Move the live pointer back to an earlier delivered version (default: the one before the live one)","tags":["Delivery state"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string","maxLength":60}},"required":[],"additionalProperties":false}}}},"x-required-permission":"org:update"}},"/v1/orgs/{org}/products/{id}/storefront":{"put":{"operationId":"putStorefront","summary":"What the Hub shows for the product: the \"buy at the maker's site\" link (no price or checkout, D12), access (entitled = code or order needed; open = any signed-in customer), blurb, kind, accent, changes, code prefix","tags":["Hub catalogue"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buy_url":{"type":"string","maxLength":300,"pattern":"^(https://[^\\s]+)?$"},"access":{"type":"string","maxLength":500,"enum":["entitled","open"]},"blurb":{"type":"string","maxLength":600},"kind":{"type":"string","maxLength":80},"accent":{"type":"string","maxLength":500,"enum":["amber","blue","green","red","violet","teal","slate"]},"changes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":20},"site_url":{"type":"string","maxLength":300,"pattern":"^(https://[^\\s]+)?$"},"code_prefix":{"type":"string","maxLength":6}},"required":[],"additionalProperties":false}}}},"x-required-permission":"product:manage"},"get":{"operationId":"getStorefront","summary":"The Hub-facing facts of a product and its public Hub id","tags":["Hub catalogue"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/products/{id}/targets":{"get":{"operationId":"productTargets","summary":"The latest passing run per target (S-69): what the gate looks at","tags":["Runs"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/products/{id}/versions":{"get":{"operationId":"listVersions","summary":"Delivered versions and the live pointer","tags":["Delivery state"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/products/{id}/versions/{vid}/withdraw":{"post":{"operationId":"withdrawVersion","summary":"Withdraw one delivered version (a bad build). It leaves the catalogue and its links stop at once; if it was live, the live pointer returns to the newest earlier version that still passes, else the product is withdrawn. Hubs flag installed copies and offer the replacement (S-198).","tags":["Delivery state"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"vid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300,"minLength":3}},"required":["reason"],"additionalProperties":false}}}},"x-required-permission":"org:update"}},"/v1/orgs/{org}/products/{id}/withdraw":{"post":{"operationId":"withdrawProduct","summary":"Withdraw the product: no live version, nothing offered. Installed copies are not touched here (that is E7 S-198).","tags":["Delivery state"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"org:update"}},"/v1/orgs/{org}/quote-requests":{"post":{"operationId":"requestQuote","summary":"Contact route for sample-heavy products (D19): over 1 GB per download needs a quote and a manual bandwidth override","tags":["Billing"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","maxLength":100},"expected_download_mb":{"type":"integer","minimum":1,"maximum":100000},"message":{"type":"string","maxLength":2000}},"required":["expected_download_mb"],"additionalProperties":false}}}},"x-required-permission":"product:manage"}},"/v1/orgs/{org}/rotations":{"get":{"operationId":"listRotations","summary":"All rotations, newest first","tags":["Signing identities"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"signer:read"}},"/v1/orgs/{org}/rotations/{rid}":{"delete":{"operationId":"cancelRotation","summary":"Cancel an open rotation (any owner or admin, including during cooling)","tags":["Signing identities"],"security":[{"sessionBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"signer:manage"}},"/v1/orgs/{org}/rotations/{rid}/confirm-email":{"post":{"operationId":"confirmRotationEmail","summary":"Confirm the emailed token (must be the requesting user)","tags":["Signing identities"],"security":[{"sessionBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","maxLength":500,"minLength":10}},"required":["token"],"additionalProperties":false}}}},"x-required-permission":"signer:manage"}},"/v1/orgs/{org}/rotations/{rid}/prove":{"post":{"operationId":"proveRotation","summary":"Submit the Ed25519 signature of the challenge made with the new identity's key","tags":["Signing identities"],"security":[{"sessionBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signature":{"type":"string","maxLength":200,"minLength":40}},"required":["signature"],"additionalProperties":false}}}},"x-required-permission":"signer:manage"}},"/v1/orgs/{org}/runs":{"post":{"operationId":"submitRun","summary":"Submit a run: kind test | release | fast. test and release are full-matrix and metered (D8); fast is tier 1 only, free, and jumps the queue (D7). Same bundle + kind + targets is deduplicated (S-224).","tags":["Runs"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","maxLength":100},"bundle":{"type":"string","maxLength":100},"kind":{"type":"string","maxLength":500,"enum":["test","release","fast"]},"targets":{"type":"array","items":{"type":"string","maxLength":40},"minItems":1,"maxItems":20},"rerun":{"type":"boolean"},"film":{"type":"boolean"}},"required":["product","bundle","kind"],"additionalProperties":false}}}},"x-required-permission":"run:submit"},"get":{"operationId":"listRuns","summary":"Runs of the organisation, newest first","tags":["Runs"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"product","in":"query","required":false,"schema":{"type":"string"},"description":"slug or id"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"queued | running | complete | inconclusive | refused | cancelled"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"1-200, default 50"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/runs/{rid}":{"get":{"operationId":"getRun","summary":"One run with per-target results (the status API of the CLI and the dashboard)","tags":["Runs"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"},"patch":{"operationId":"publishRun","summary":"Publish a run's report (vendor choice, D10) or return it to the default visibility","tags":["Reports"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"published":{"type":"boolean"}},"required":["published"],"additionalProperties":false}}}},"x-required-permission":"product:manage"}},"/v1/orgs/{org}/runs/{rid}/cancel":{"post":{"operationId":"cancelRun","summary":"Cancel a queued or running run; it never counts against the allowance","tags":["Runs"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"run:submit"}},"/v1/orgs/{org}/runs/{rid}/events":{"get":{"operationId":"runEvents","summary":"Server-sent events for the Follow view: queued, started, target_started, target_done, confirming, retry, complete ... Resumes from Last-Event-ID.","tags":["Runs"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"text/event-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/runs/{rid}/revoke":{"post":{"operationId":"revokeRun","summary":"Revoke a report for good: its permalink then answers 410 with a tombstone","tags":["Reports"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300}},"required":[],"additionalProperties":false}}}},"x-required-permission":"org:update"}},"/v1/orgs/{org}/signers":{"get":{"operationId":"listSigners","summary":"Registered signing identities with expiry warnings and open rotations","tags":["Signing identities"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"signer:read"},"post":{"operationId":"registerSigner","summary":"Register a signing identity (second factor + proof of key possession). It is pinned at the first release run.","tags":["Signing identities"],"security":[{"sessionBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","maxLength":500,"enum":["apple_team","authenticode","linux_key"]},"identifier":{"type":"string","maxLength":100},"label":{"type":"string","maxLength":100},"challenge_public_key":{"type":"string","maxLength":200,"minLength":40},"expires_at":{"type":"string","maxLength":40},"proof":{"type":"string","maxLength":200,"minLength":40}},"required":["kind","identifier","challenge_public_key","proof"],"additionalProperties":false}}}},"x-required-permission":"signer:manage","x-requires-step-up":true}},"/v1/orgs/{org}/signers/{id}":{"delete":{"operationId":"deleteSigner","summary":"Remove a registered identity that has not been pinned (pinned ones change only by rotation)","tags":["Signing identities"],"security":[{"sessionBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"signer:manage","x-requires-step-up":true}},"/v1/orgs/{org}/signers/{id}/rotate":{"post":{"operationId":"rotateSigner","summary":"Start rotating a pinned identity (D22): verified email + signed challenge, then a 24 h cooling period","tags":["Signing identities"],"security":[{"sessionBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","maxLength":500,"enum":["apple_team","authenticode","linux_key"]},"identifier":{"type":"string","maxLength":100},"label":{"type":"string","maxLength":100},"challenge_public_key":{"type":"string","maxLength":200,"minLength":40},"expires_at":{"type":"string","maxLength":40}},"required":["identifier","challenge_public_key"],"additionalProperties":false}}}},"x-required-permission":"signer:manage","x-requires-step-up":true}},"/v1/orgs/{org}/tokens":{"get":{"operationId":"listTokens","summary":"CLI tokens (secrets are never shown again); owners and admins see all, others their own","tags":["Tokens"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"token:list"},"post":{"operationId":"createToken","summary":"Create a scoped CLI token (second factor required). The secret is returned once.","tags":["Tokens"],"security":[{"sessionBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","maxLength":80,"minLength":1},"scope":{"type":"string","maxLength":500,"enum":["submit","admin"]},"expires_in_days":{"type":"integer","minimum":1,"maximum":365}},"required":["label","scope"],"additionalProperties":false}}}},"x-required-permission":"token:create","x-requires-step-up":true}},"/v1/orgs/{org}/tokens/{id}":{"delete":{"operationId":"revokeToken","summary":"Revoke a token (own tokens, or any when owner/admin)","tags":["Tokens"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"token:list"}},"/v1/orgs/{org}/transfer-ownership":{"post":{"operationId":"transferOwnership","summary":"Hand ownership to another member (second factor); the old owner becomes admin","tags":["Team"],"security":[{"sessionBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","maxLength":500}},"required":["user_id"],"additionalProperties":false}}}},"x-required-permission":"org:transfer","x-requires-step-up":true}},"/v1/orgs/{org}/usage":{"get":{"operationId":"getUsage","summary":"Run allowance and delivery bandwidth per product (also in /billing for those who may read it)","tags":["Billing"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"product:read"}},"/v1/orgs/{org}/whitelabel":{"get":{"operationId":"orgTenants","summary":"The organisation's white-label tenants (read only)","tags":["White label"],"security":[{"sessionBearer":[]},{"tokenBearer":[]}],"parameters":[{"name":"org","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-permission":"org:read"}},"/v1/reports/{id}":{"get":{"operationId":"getReportApi","summary":"The machine-readable report (same body as /r/<id>.json), for the CLI status command and the dashboard","tags":["Reports"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runner/claim":{"post":{"operationId":"runnerClaim","summary":"Claim the next queued run whose targets this runner can test, or { run: null }","tags":["Runner"],"security":[{"serviceKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runner_id":{"type":"string","maxLength":80,"minLength":3,"pattern":"^[A-Za-z0-9._-]+$"},"cli_version":{"type":"string","maxLength":40},"targets":{"type":"array","items":{"type":"string","maxLength":40},"minItems":1,"maxItems":10}},"required":["runner_id","cli_version","targets"],"additionalProperties":false}}}}}},"/v1/runner/runs/{rid}/bundle":{"get":{"operationId":"runnerBundle","summary":"The uploaded zip of a claimed run (verify x-content-sha256 before use)","tags":["Runner"],"security":[{"serviceKey":[]}],"parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string"}},{"name":"runner_id","in":"query","required":false,"schema":{"type":"string"},"description":"the claiming runner"}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runner/runs/{rid}/complete":{"post":{"operationId":"runnerComplete","summary":"Finish the run: the verdict is the aggregate of the targets already recorded (any fail fails, else any inconclusive, else pass)","tags":["Runner"],"security":[{"serviceKey":[]}],"parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runner_id":{"type":"string","maxLength":80,"minLength":3,"pattern":"^[A-Za-z0-9._-]+$"},"journal":{"type":"object"},"cli_version":{"type":"string","maxLength":40},"cancelled":{"type":"boolean"},"reason":{"type":"string","maxLength":500}},"required":["runner_id"],"additionalProperties":false}}}}}},"/v1/runner/runs/{rid}/heartbeat":{"post":{"operationId":"runnerHeartbeat","summary":"Extend the lease of a claimed run; answers whether the partner cancelled it","tags":["Runner"],"security":[{"serviceKey":[]}],"parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runner_id":{"type":"string","maxLength":80,"minLength":3,"pattern":"^[A-Za-z0-9._-]+$"},"target":{"type":"string","maxLength":40},"note":{"type":"string","maxLength":200}},"required":["runner_id"],"additionalProperties":false}}}}}},"/v1/runner/runs/{rid}/targets/{target}/film":{"put":{"operationId":"runnerTargetFilm","summary":"Upload the evidence film of a passing target","tags":["Runner"],"security":[{"serviceKey":[]}],"parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string"}},{"name":"target","in":"path","required":true,"schema":{"type":"string"}},{"name":"runner_id","in":"query","required":false,"schema":{"type":"string"},"description":"the claiming runner"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"/v1/runner/runs/{rid}/targets/{target}/result":{"post":{"operationId":"runnerTargetResult","summary":"Record one target's outcome (journal, log, the runner's own report files)","tags":["Runner"],"security":[{"serviceKey":[]}],"parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string"}},{"name":"target","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runner_id":{"type":"string","maxLength":80,"minLength":3,"pattern":"^[A-Za-z0-9._-]+$"},"status":{"type":"string","maxLength":500,"enum":["pass","fail","inconclusive"]},"passed":{"type":"integer"},"failed":{"type":"integer"},"seconds":{"type":"number"},"marginal":{"type":"boolean"},"note":{"type":"string","maxLength":2000},"exit":{"type":"integer"},"journal":{"type":"object"},"log":{"type":"string","maxLength":200000},"report_files":{"type":"object"}},"required":["runner_id","status"],"additionalProperties":false}}}}}},"/v1/shop/entitlements":{"post":{"operationId":"shopGrant","summary":"Give a customer a product by e-mail (a sale in your shop). Needs an Idempotency-Key header: a retry with the same key and body returns the first answer (Idempotent-Replayed: true); the same key with a different body is 422. A customer without a Modulr account is invited by e-mail.","tags":["Shop API"],"security":[{"partnerApiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","maxLength":60,"minLength":1},"email":{"type":"string","maxLength":200,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"order_ref":{"type":"string","maxLength":80,"minLength":1},"note":{"type":"string","maxLength":200}},"required":["product","email","order_ref"],"additionalProperties":false}}}}},"get":{"operationId":"shopList","summary":"List the entitlements of your products, oldest first, with cursor paging","tags":["Shop API"],"security":[{"partnerApiKey":[]}],"parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string"},"description":"only this customer"},{"name":"product","in":"query","required":false,"schema":{"type":"string"},"description":"only this product"},{"name":"order_ref","in":"query","required":false,"schema":{"type":"string"},"description":"only this order"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"active | revoked"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"1-200, default 50"},{"name":"after","in":"query","required":false,"schema":{"type":"string"},"description":"cursor: the id of the last entitlement of the previous page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shop/entitlements/{id}":{"get":{"operationId":"shopGet","summary":"One entitlement","tags":["Shop API"],"security":[{"partnerApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shop/entitlements/{id}/revoke":{"post":{"operationId":"shopRevoke","summary":"Revoke an entitlement (a refund). Revoking twice is fine. The customer can no longer download; a copy already installed is not touched.","tags":["Shop API"],"security":[{"partnerApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/v1/shop/orders/{ref}/revoke":{"post":{"operationId":"shopRevokeOrder","summary":"Revoke every entitlement created for an order reference","tags":["Shop API"],"security":[{"partnerApiKey":[]}],"parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/v1/shop/products":{"get":{"operationId":"shopProducts","summary":"Your products as the Hub knows them: hub id, state, live version, access, whether listed","tags":["Shop API"],"security":[{"partnerApiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/vendors/{slug}":{"get":{"operationId":"getVendor","summary":"Public vendor identity for reports, badge and Hub: the verified legal name, or none","tags":["Vendor names"],"security":[],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/verify/{hash}":{"get":{"operationId":"verifyApi","summary":"Is this exact build verified? Looks up the newest public report by bundle hash and returns its state with the embed snippet and terms","tags":["Reports"],"security":[],"parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/verify":{"get":{"operationId":"verifyPage","summary":"Public verification page: paste a bundle hash","tags":["Reports"],"security":[],"parameters":[{"name":"hash","in":"query","required":false,"schema":{"type":"string"},"description":"bundle hash to verify"}],"responses":{"200":{"description":"Success","content":{"text/html":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/verify/{hash}":{"get":{"operationId":"verifyPageHash","summary":"Verification page for one hash","tags":["Reports"],"security":[],"parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"text/html":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/wl/{tenant}/v1/catalogue":{"get":{"operationId":"wlCatalogue","summary":"A white-label Hub's own catalogue: the tenant's product subset in the shared catalogue's shape, behind the same gate","tags":["White label"],"security":[],"parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/wl/{tenant}/v1/config":{"get":{"operationId":"wlConfig","summary":"The brand configuration a white-label Hub build reads: name, colours, bundle id, icon, update feed, domain state","tags":["White label"],"security":[],"parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/wl/{tenant}/v1/download/{id}/{version}/{file}":{"get":{"operationId":"wlDownload","summary":"Link to the zip of the live, certified version (302 to a signed 60-second link; ?link=1 returns the link as JSON). Needs a customer session and an entitlement (or an open product). The link serves the file only after the stored bytes are re-hashed against the certified hash.","tags":["White label"],"security":[{"customerBearer":[]}],"parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"}},{"name":"link","in":"query","required":false,"schema":{"type":"string"},"description":"1 for JSON"}],"responses":{"200":{"description":"Success","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/wl/{tenant}/v1/installed":{"post":{"operationId":"wlInstalled","summary":"Installed-copy check inside a white-label Hub","tags":["White label"],"security":[],"parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":120},"version":{"type":"string","maxLength":60},"bundle_hash":{"type":"string","maxLength":64,"pattern":"^[a-fA-F0-9]{64}$"}},"required":["id"],"additionalProperties":false},"minItems":1,"maxItems":200}},"required":["installed"],"additionalProperties":false}}}}}},"/wl/{tenant}/v1/me/entitlements":{"get":{"operationId":"wlEntitlements","summary":"The customer's licences","tags":["White label"],"security":[{"customerBearer":[]}],"parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/wl/{tenant}/v1/products/{id}":{"get":{"operationId":"wlProduct","summary":"Product detail with Verified data inside a white-label Hub","tags":["White label"],"security":[],"parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"hash","in":"query","required":false,"schema":{"type":"string"},"description":"installed bundle hash"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/wl/{tenant}/v1/redeem":{"post":{"operationId":"wlRedeem","summary":"Redeem a code inside a white-label Hub (only for products of its subset)","tags":["White label"],"security":[{"customerBearer":[]}],"parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (the same envelope everywhere; device-token polling uses RFC 8628 error/error_description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":80,"minLength":1}},"required":["code"],"additionalProperties":false}}}}}}},"components":{"securitySchemes":{"sessionBearer":{"type":"http","scheme":"bearer","description":"Session token (mds_...) from POST /v1/auth/login"},"tokenBearer":{"type":"http","scheme":"bearer","description":"CLI token (mdp_...) bound to one organisation with scope submit or admin"},"partnerApiKey":{"type":"http","scheme":"bearer","description":"Partner shop-API key (mdk_...) bound to one organisation, created in the dashboard with a second factor"},"customerBearer":{"type":"http","scheme":"bearer","description":"Hub customer session (mdc_...); in staging minted by the gateway with the service key"},"serviceKey":{"type":"apiKey","in":"header","name":"X-Service-Key","description":"Internal pipeline / operator key (staging)"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{"type":"object"}}}}}}}}