{"openapi":"3.1.1","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Mutual Trust API","version":"1.0.0-early-access","description":"Partner workload access with private client certificates. Errors are RFC 9457 problem details."},"servers":[{"url":"https://api.mutualtrust.io"}],"paths":{"/v1/spaces":{"post":{"summary":"Create a trust space with its own private trust anchor","operationId":"postVSpaces","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpace"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/spaces/{id}":{"get":{"summary":"Get a space with its issuer chain","operationId":"getVSpacesId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/spaces/{id}/trust-bundle.pem":{"get":{"summary":"Export public trust material","operationId":"getVSpacesIdTrustBundlePem","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/services":{"post":{"summary":"Create a service (API) with allowed route templates","operationId":"postVServices","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateService"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/services/{id}":{"get":{"summary":"Service, gateways, readiness and current policy revision","operationId":"getVServicesId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/services/{id}/receipts":{"get":{"summary":"Verification receipts (TLS and authorization separately)","operationId":"getVServicesIdReceipts","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/services/{id}/invitations":{"post":{"summary":"Invite a partner organization with a scoped grant","operationId":"postVServicesIdInvitations","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitation"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/services/{id}/gateways":{"post":{"summary":"Approve a gateway pairing code","operationId":"postVServicesIdGateways","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovePairing"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/invitations/{id}/accept":{"post":{"summary":"Redeem a one-time invitation secret and bind a workload","operationId":"postVInvitationsIdAccept","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInvitation"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/invitations/{id}/decline":{"post":{"summary":"Decline an invitation","operationId":"postVInvitationsIdDecline","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondInvitation"}}}},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/grants/{id}":{"get":{"summary":"Grant detail (each side sees only its view)","operationId":"getVGrantsId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/grants/{id}/revoke":{"post":{"summary":"Withdraw a grant (If-Match revision)","operationId":"postVGrantsIdRevoke","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"Current grant revision, e.g. \"3\""}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantReason"}}}},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/grants/{id}/suspend":{"post":{"summary":"Suspend a grant (slot stays reserved)","operationId":"postVGrantsIdSuspend","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"Current grant revision, e.g. \"3\""}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantReason"}}}},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/grants/{id}/resume":{"post":{"summary":"Resume a suspended grant","operationId":"postVGrantsIdResume","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"Current grant revision, e.g. \"3\""}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeGrant"}}}},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/grants/{id}/scope":{"patch":{"summary":"Preview or change grant scope","operationId":"patchVGrantsIdScope","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"Current grant revision, e.g. \"3\""}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGrantScope"}}}},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/operations/{id}":{"get":{"summary":"Per-gateway acknowledgment status for a change","operationId":"getVOperationsId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/workloads/{id}/enrollment-tokens":{"post":{"summary":"Approve a sandbox enrollment (browser)","operationId":"postVWorkloadsIdEnrollmentTokens","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnrollmentToken"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/enrollments":{"post":{"summary":"Present a workload attestation; receive a single-use challenge","operationId":"postVEnrollments","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnrollment"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"attestation"}},"/v1/enrollments/{id}/complete":{"post":{"summary":"Submit CSR + proof of possession; 202 when signing is pending","operationId":"postVEnrollmentsIdComplete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteEnrollment"}}}},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"challenge"}},"/v1/certificates/{id}/renew":{"post":{"summary":"Renew by key continuity","operationId":"postVCertificatesIdRenew","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenewCertificate"}}}},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"key_proof"}},"/v1/certificates/{id}/reloaded":{"post":{"summary":"Confirm the workload reloaded its new credential","operationId":"postVCertificatesIdReloaded","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmReload"}}}},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"key_proof"}},"/v1/certificates/{id}/revoke":{"post":{"summary":"Revoke one leaf","operationId":"postVCertificatesIdRevoke","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeCertificate"}}}},"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/pairings":{"post":{"summary":"Gateway registers its key and receives a pairing code","operationId":"postVPairings","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePairing"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"none"}},"/v1/gateways/{id}/manifest":{"get":{"summary":"Signed, target-scoped policy manifest (JWS ES256, pinned kid)","operationId":"getVGatewaysIdManifest","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"gateway"}},"/v1/gateways/{id}/acks":{"post":{"summary":"Signed acknowledgment of an applied revision","operationId":"postVGatewaysIdAcks","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayAck"}}}},"responses":{"202":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"gateway"}},"/v1/gateways/{id}/receipts":{"post":{"summary":"Signed verification receipts","operationId":"postVGatewaysIdReceipts","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayReceipts"}}}},"responses":{"202":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"gateway"}},"/v1/billing/checkout-sessions":{"post":{"summary":"Start Stripe Checkout for a capacity band","operationId":"postVBillingCheckoutSessions","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSession"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/v1/billing/portal-sessions":{"post":{"summary":"Open the Stripe customer portal","operationId":"postVBillingPortalSessions","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePortalSession"}}}},"responses":{"201":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"session_or_api_credential"}},"/webhooks/stripe":{"post":{"summary":"Stripe webhook ingress (signature verified on raw bytes)","operationId":"postWebhooksStripe","parameters":[],"responses":{"200":{"description":"Success"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"x-mt-auth":"stripe_signature"}}},"components":{"schemas":{"CreateOrganization":{"title":"CreateOrganization","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f<>]+$"}}},"CreateSpace":{"title":"CreateSpace","type":"object","additionalProperties":false,"required":["org_id","name","environment"],"properties":{"org_id":{"type":"string","pattern":"^org_[a-z0-9_]+$","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f<>]+$"},"environment":{"type":"string","enum":["sandbox","production"]}}},"CreateService":{"title":"CreateService","type":"object","additionalProperties":false,"required":["space_id","name","route_templates"],"properties":{"space_id":{"type":"string","pattern":"^spc_[a-z0-9_]+$","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f<>]+$"},"contact":{"type":"string","maxLength":200},"route_templates":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["name","methods","path"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f<>]+$"},"methods":{"type":"array","minItems":1,"maxItems":7,"items":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"uniqueItems":true},"path":{"type":"string","pattern":"^/[A-Za-z0-9._~\\-/]*(/\\*)?$","maxLength":200},"restricted":{"type":"boolean"}}}}}},"CreateInvitation":{"title":"CreateInvitation","type":"object","additionalProperties":false,"required":["consumer","scope"],"properties":{"consumer":{"type":"object","additionalProperties":false,"properties":{"org_id":{"type":"string","pattern":"^org_[a-z0-9_]+$","maxLength":64},"new_org_name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f<>]+$"}},"oneOf":[{"required":["org_id"]},{"required":["new_org_name"]}]},"scope":{"type":"object","additionalProperties":false,"required":["routes"],"properties":{"v":{"const":1},"routes":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["methods","path"],"properties":{"methods":{"type":"array","minItems":1,"maxItems":7,"items":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"uniqueItems":true},"path":{"type":"string","pattern":"^/[A-Za-z0-9._~\\-/]*(/\\*)?$","maxLength":200}}}}}},"expires_in_hours":{"type":"integer","minimum":1,"maximum":720},"grant_expires_at":{"type":"string","format":"date-time"}}},"AcceptInvitation":{"title":"AcceptInvitation","type":"object","additionalProperties":false,"required":["token","consumer_org_id","workload"],"properties":{"token":{"type":"string","minLength":20,"maxLength":200},"consumer_org_id":{"type":"string","pattern":"^org_[a-z0-9_]+$","maxLength":64},"workload":{"type":"object","additionalProperties":false,"required":["name","attestation_kind"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f<>]+$"},"attestation_kind":{"type":"string","enum":["sandbox_token","oidc_jwt"]},"issuer":{"type":"string","format":"uri","maxLength":300},"audience":{"type":"string","maxLength":200},"subject":{"type":"string","maxLength":300}}}}},"RespondInvitation":{"title":"RespondInvitation","type":"object","additionalProperties":false,"required":["token"],"properties":{"token":{"type":"string","minLength":20,"maxLength":200}}},"GrantReason":{"title":"GrantReason","type":"object","additionalProperties":false,"required":["reason_code"],"properties":{"reason_code":{"type":"string","enum":["contract_ended","security_incident","owner_request"]},"note":{"type":"string","maxLength":500}}},"ResumeGrant":{"title":"ResumeGrant","type":"object","additionalProperties":false,"properties":{"note":{"type":"string","maxLength":500}}},"UpdateGrantScope":{"title":"UpdateGrantScope","type":"object","additionalProperties":false,"required":["scope"],"properties":{"scope":{"type":"object","additionalProperties":false,"required":["routes"],"properties":{"v":{"const":1},"routes":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["methods","path"],"properties":{"methods":{"type":"array","minItems":1,"maxItems":7,"items":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"uniqueItems":true},"path":{"type":"string","pattern":"^/[A-Za-z0-9._~\\-/]*(/\\*)?$","maxLength":200}}}}}},"preview":{"type":"boolean"},"note":{"type":"string","maxLength":500}}},"CreatePairing":{"title":"CreatePairing","type":"object","additionalProperties":false,"required":["gateway_public_jwk"],"properties":{"gateway_public_jwk":{"type":"object","additionalProperties":true,"required":["kty","crv","x","y"],"properties":{"kty":{"const":"EC"},"crv":{"const":"P-256"},"x":{"type":"string"},"y":{"type":"string"}}},"connector_version":{"type":"string","maxLength":40}}},"ApprovePairing":{"title":"ApprovePairing","type":"object","additionalProperties":false,"required":["code","name"],"properties":{"code":{"type":"string","pattern":"^[A-Z0-9]{4}-?[A-Z0-9]{4}$"},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f<>]+$"}}},"GatewayAck":{"title":"GatewayAck","type":"object","additionalProperties":false,"required":["ack"],"properties":{"ack":{"type":"string","maxLength":4000}}},"GatewayReceipts":{"title":"GatewayReceipts","type":"object","additionalProperties":false,"required":["receipts"],"properties":{"receipts":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":6000}}}},"CreateEnrollmentToken":{"title":"CreateEnrollmentToken","type":"object","additionalProperties":false,"required":["grant_id"],"properties":{"grant_id":{"type":"string","pattern":"^gr_[a-z0-9_]+$","maxLength":64}}},"CreateEnrollment":{"title":"CreateEnrollment","type":"object","additionalProperties":false,"required":["attestation"],"properties":{"grant_id":{"type":"string","pattern":"^gr_[a-z0-9_]+$","maxLength":64},"workload_id":{"type":"string","pattern":"^wl_[a-z0-9_]+$","maxLength":64},"attestation":{"type":"object","additionalProperties":false,"required":["kind","token"],"properties":{"kind":{"type":"string","enum":["sandbox_token","oidc_jwt"]},"token":{"type":"string","minLength":20,"maxLength":8000}}}}},"CompleteEnrollment":{"title":"CompleteEnrollment","type":"object","additionalProperties":false,"required":["csr","proof"],"properties":{"challenge":{"type":"string","maxLength":200},"csr":{"type":"string","minLength":100,"maxLength":8000},"proof":{"type":"string","minLength":40,"maxLength":200}}},"RenewCertificate":{"title":"RenewCertificate","type":"object","additionalProperties":false,"required":["csr","proof","timestamp"],"properties":{"csr":{"type":"string","minLength":100,"maxLength":8000},"proof":{"type":"string","minLength":40,"maxLength":200},"timestamp":{"type":"integer"}}},"ConfirmReload":{"title":"ConfirmReload","type":"object","additionalProperties":false,"required":["proof","timestamp"],"properties":{"proof":{"type":"string","minLength":40,"maxLength":200},"timestamp":{"type":"integer"}}},"RevokeCertificate":{"title":"RevokeCertificate","type":"object","additionalProperties":false,"required":["reason_code"],"properties":{"reason_code":{"type":"string","enum":["key_compromise","superseded","cessation_of_operation","owner_request"]}}},"CreateCheckoutSession":{"title":"CreateCheckoutSession","type":"object","additionalProperties":false,"required":["org_id","sku"],"properties":{"org_id":{"type":"string","pattern":"^org_[a-z0-9_]+$","maxLength":64},"sku":{"type":"string","enum":["team_10","team_50"]}}},"CreatePortalSession":{"title":"CreatePortalSession","type":"object","additionalProperties":false,"required":["org_id"],"properties":{"org_id":{"type":"string","pattern":"^org_[a-z0-9_]+$","maxLength":64}}},"AssignRole":{"title":"AssignRole","type":"object","additionalProperties":false,"required":["user_id","role"],"properties":{"user_id":{"type":"string","pattern":"^usr_[a-z0-9_]+$","maxLength":64},"role":{"type":"string","enum":["owner","trust_admin","service_owner","partner_admin","billing_admin","auditor"]}}},"ApproveWorkloadIssuer":{"title":"ApproveWorkloadIssuer","type":"object","additionalProperties":false,"required":["issuer_url","jwks_uri"],"properties":{"issuer_url":{"type":"string","format":"uri","pattern":"^https://"},"jwks_uri":{"type":"string","format":"uri","pattern":"^https://"}}},"AdoptionEvent":{"title":"AdoptionEvent","type":"object","additionalProperties":false,"required":["milestone"],"properties":{"milestone":{"type":"string","enum":["demo_started","paired","enrolled","first_allow","first_deny","unattended_renewal"]},"cohort_id":{"type":"string","maxLength":64},"elapsed_ms":{"type":"integer","minimum":0},"connector_version":{"type":"string","maxLength":40},"error_code":{"type":"string","maxLength":64}}},"EventEnvelopeV1":{"title":"EventEnvelopeV1","type":"object","required":["schema_version","event_id","type","tenant_id","occurred_at","data"],"properties":{"schema_version":{"const":1},"event_id":{"type":"string","pattern":"^evt_[A-Za-z0-9_]+$"},"type":{"type":"string"},"tenant_id":{"type":"string","pattern":"^org_[a-z0-9_]+$"},"occurred_at":{"type":"string","format":"date-time"},"data":{"type":"object"}}},"GrantRevokedDataV1":{"title":"GrantRevokedDataV1","type":"object","required":["grant_id","service_id","revision","reason_code"],"properties":{"grant_id":{"type":"string","pattern":"^gr_[a-z0-9_]+$"},"service_id":{"type":"string","pattern":"^svc_[a-z0-9_]+$"},"revision":{"type":"integer","minimum":1},"reason_code":{"type":"string","enum":["contract_ended","security_incident","owner_request"]}}},"GrantActivatedDataV1":{"title":"GrantActivatedDataV1","type":"object","required":["grant_id","service_id","revision"],"properties":{"grant_id":{"type":"string","pattern":"^gr_[a-z0-9_]+$","maxLength":64},"service_id":{"type":"string","pattern":"^svc_[a-z0-9_]+$","maxLength":64},"revision":{"type":"integer","minimum":1}}},"GrantSuspendedDataV1":{"title":"GrantSuspendedDataV1","type":"object","required":["grant_id","service_id","revision","reason_code"],"properties":{"grant_id":{"type":"string","pattern":"^gr_[a-z0-9_]+$","maxLength":64},"service_id":{"type":"string","pattern":"^svc_[a-z0-9_]+$","maxLength":64},"revision":{"type":"integer","minimum":1},"reason_code":{"type":"string","enum":["contract_ended","security_incident","owner_request"]}}},"GrantResumedDataV1":{"title":"GrantResumedDataV1","type":"object","required":["grant_id","service_id","revision"],"properties":{"grant_id":{"type":"string","pattern":"^gr_[a-z0-9_]+$","maxLength":64},"service_id":{"type":"string","pattern":"^svc_[a-z0-9_]+$","maxLength":64},"revision":{"type":"integer","minimum":1}}},"GrantScopeChangedDataV1":{"title":"GrantScopeChangedDataV1","type":"object","required":["grant_id","service_id","revision"],"properties":{"grant_id":{"type":"string","pattern":"^gr_[a-z0-9_]+$","maxLength":64},"service_id":{"type":"string","pattern":"^svc_[a-z0-9_]+$","maxLength":64},"revision":{"type":"integer","minimum":1}}},"CertificateIssuedDataV1":{"title":"CertificateIssuedDataV1","type":"object","required":["certificate_id","grant_id","service_id","serial"],"properties":{"certificate_id":{"type":"string","pattern":"^crt_[a-z0-9_]+$","maxLength":64},"grant_id":{"type":"string","pattern":"^gr_[a-z0-9_]+$","maxLength":64},"service_id":{"type":"string","pattern":"^svc_[a-z0-9_]+$","maxLength":64},"serial":{"type":"string","pattern":"^[0-9a-f]+$"}}},"CertificateRevokedDataV1":{"title":"CertificateRevokedDataV1","type":"object","required":["certificate_id","service_id","serial"],"properties":{"certificate_id":{"type":"string","pattern":"^crt_[a-z0-9_]+$","maxLength":64},"service_id":{"type":"string","pattern":"^svc_[a-z0-9_]+$","maxLength":64},"serial":{"type":"string","pattern":"^[0-9a-f]+$"},"issuer_id":{"type":"string","pattern":"^iss_[a-z0-9_]+$","maxLength":64}}},"PolicyPublishRequestedDataV1":{"title":"PolicyPublishRequestedDataV1","type":"object","required":["service_id"],"properties":{"service_id":{"type":"string","pattern":"^svc_[a-z0-9_]+$","maxLength":64},"cause":{"type":"string","maxLength":80}}},"IssuerSuspendedDataV1":{"title":"IssuerSuspendedDataV1","type":"object","required":["issuer_id","space_id"],"properties":{"issuer_id":{"type":"string","pattern":"^iss_[a-z0-9_]+$","maxLength":64},"space_id":{"type":"string","pattern":"^spc_[a-z0-9_]+$","maxLength":64}}},"StripeEventReceivedDataV1":{"title":"StripeEventReceivedDataV1","type":"object","required":["inbox_id"],"properties":{"inbox_id":{"type":"string","pattern":"^pin_[a-z0-9_]+$","maxLength":64}}},"BillingReconcileRequestedDataV1":{"title":"BillingReconcileRequestedDataV1","type":"object","properties":{"tenant_id":{"type":"string","pattern":"^org_[a-z0-9_]+$","maxLength":64}}},"Problem":{"type":"object","required":["type","title","status","code"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"request_id":{"type":"string"},"instance":{"type":"string"}}}},"responses":{"Problem":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}