{"openapi":"3.1.0","info":{"title":"Problee Builder Trading API","version":"1.0.0","description":"Browser-safe builder distribution API for self-serve hosted checkout integrations. Server API keys remain server-only; browser flows use publicIntegrationId plus short-lived trade attribution tokens.","contact":{"name":"Problee Protocol"}},"servers":[{"url":"/api/builder/v1","description":"Builder Trading API v1"}],"security":[],"paths":{"/integrations":{"post":{"operationId":"postIntegrations","summary":"Create a browser-safe builder integration","tags":["Builder"],"security":[{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBuilderIntegrationBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderIntegration"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"401":{"description":"Error: one of AUTH_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"AUTH_REQUIRED":{"summary":"AUTH_REQUIRED","value":{"type":"https://problee.com/errors/AUTH_REQUIRED","title":"Example AUTH_REQUIRED","status":401,"detail":"Example detail for AUTH_REQUIRED","code":"AUTH_REQUIRED"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}},"get":{"operationId":"getIntegrations","summary":"List builder integrations for the authenticated owner","tags":["Builder"],"security":[{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderIntegrationList"}}}},"401":{"description":"Error: one of AUTH_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"AUTH_REQUIRED":{"summary":"AUTH_REQUIRED","value":{"type":"https://problee.com/errors/AUTH_REQUIRED","title":"Example AUTH_REQUIRED","status":401,"detail":"Example detail for AUTH_REQUIRED","code":"AUTH_REQUIRED"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}}},"/integrations/{publicIntegrationId}/verify-origin":{"post":{"operationId":"postIntegrationsByPublicIntegrationIdVerifyOrigin","summary":"Verify ownership of an integration origin","tags":["Builder"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"publicIntegrationId","schema":{"$ref":"#/components/schemas/PublicIntegrationId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBuilderIntegrationOriginBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBuilderIntegrationOriginResponse"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"401":{"description":"Error: one of AUTH_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"AUTH_REQUIRED":{"summary":"AUTH_REQUIRED","value":{"type":"https://problee.com/errors/AUTH_REQUIRED","title":"Example AUTH_REQUIRED","status":401,"detail":"Example detail for AUTH_REQUIRED","code":"AUTH_REQUIRED"}}}}}},"403":{"description":"Error: one of FORBIDDEN","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}}}}}},"404":{"description":"Error: one of NOT_FOUND","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"type":"https://problee.com/errors/NOT_FOUND","title":"Example NOT_FOUND","status":404,"detail":"Example detail for NOT_FOUND","code":"NOT_FOUND"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}}},"/integrations/{publicIntegrationId}/wallet-auth-profiles":{"post":{"operationId":"postIntegrationsByPublicIntegrationIdWalletAuthProfiles","summary":"Create a partner wallet auth profile for hosted checkout","tags":["Builder"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"publicIntegrationId","schema":{"$ref":"#/components/schemas/PublicIntegrationId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBuilderWalletAuthProfileBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderWalletAuthProfile"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"401":{"description":"Error: one of AUTH_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"AUTH_REQUIRED":{"summary":"AUTH_REQUIRED","value":{"type":"https://problee.com/errors/AUTH_REQUIRED","title":"Example AUTH_REQUIRED","status":401,"detail":"Example detail for AUTH_REQUIRED","code":"AUTH_REQUIRED"}}}}}},"403":{"description":"Error: one of FORBIDDEN","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}}}}}},"404":{"description":"Error: one of NOT_FOUND","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"type":"https://problee.com/errors/NOT_FOUND","title":"Example NOT_FOUND","status":404,"detail":"Example detail for NOT_FOUND","code":"NOT_FOUND"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}},"get":{"operationId":"getIntegrationsByPublicIntegrationIdWalletAuthProfiles","summary":"List partner wallet auth profiles for an integration","tags":["Builder"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"publicIntegrationId","schema":{"$ref":"#/components/schemas/PublicIntegrationId"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderWalletAuthProfileList"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"401":{"description":"Error: one of AUTH_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"AUTH_REQUIRED":{"summary":"AUTH_REQUIRED","value":{"type":"https://problee.com/errors/AUTH_REQUIRED","title":"Example AUTH_REQUIRED","status":401,"detail":"Example detail for AUTH_REQUIRED","code":"AUTH_REQUIRED"}}}}}},"403":{"description":"Error: one of FORBIDDEN","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}}}}}},"404":{"description":"Error: one of NOT_FOUND","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"type":"https://problee.com/errors/NOT_FOUND","title":"Example NOT_FOUND","status":404,"detail":"Example detail for NOT_FOUND","code":"NOT_FOUND"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}}},"/integrations/{publicIntegrationId}/wallet-auth-profiles/{walletAuthProfileId}":{"patch":{"operationId":"patchIntegrationsByPublicIntegrationIdWalletAuthProfilesByWalletAuthProfileId","summary":"Update a partner wallet auth profile","tags":["Builder"],"security":[{"apiKey":[]}],"parameters":[{"in":"path","name":"publicIntegrationId","schema":{"$ref":"#/components/schemas/PublicIntegrationId"},"required":true},{"in":"path","name":"walletAuthProfileId","schema":{"$ref":"#/components/schemas/WalletAuthProfileId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBuilderWalletAuthProfileBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderWalletAuthProfile"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"401":{"description":"Error: one of AUTH_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"AUTH_REQUIRED":{"summary":"AUTH_REQUIRED","value":{"type":"https://problee.com/errors/AUTH_REQUIRED","title":"Example AUTH_REQUIRED","status":401,"detail":"Example detail for AUTH_REQUIRED","code":"AUTH_REQUIRED"}}}}}},"403":{"description":"Error: one of FORBIDDEN","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}}}}}},"404":{"description":"Error: one of NOT_FOUND","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"type":"https://problee.com/errors/NOT_FOUND","title":"Example NOT_FOUND","status":404,"detail":"Example detail for NOT_FOUND","code":"NOT_FOUND"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}}},"/trade-token":{"post":{"operationId":"postTradeToken","summary":"Create a short-lived browser trade attribution token","tags":["Builder"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBuilderTradeTokenBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBuilderTradeTokenResponse"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"403":{"description":"Error: one of FORBIDDEN, WALLET_AUTH_PROFILE_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}},"WALLET_AUTH_PROFILE_REQUIRED":{"summary":"WALLET_AUTH_PROFILE_REQUIRED","value":{"type":"https://problee.com/errors/WALLET_AUTH_PROFILE_REQUIRED","title":"Example WALLET_AUTH_PROFILE_REQUIRED","status":403,"detail":"Example detail for WALLET_AUTH_PROFILE_REQUIRED","code":"WALLET_AUTH_PROFILE_REQUIRED"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}}},"/checkout/sessions":{"post":{"operationId":"postCheckoutSessions","summary":"Create a hosted checkout session","tags":["Builder"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionResponse"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"401":{"description":"Error: one of AUTH_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"AUTH_REQUIRED":{"summary":"AUTH_REQUIRED","value":{"type":"https://problee.com/errors/AUTH_REQUIRED","title":"Example AUTH_REQUIRED","status":401,"detail":"Example detail for AUTH_REQUIRED","code":"AUTH_REQUIRED"}}}}}},"403":{"description":"Error: one of FORBIDDEN, WALLET_AUTH_PROFILE_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}},"WALLET_AUTH_PROFILE_REQUIRED":{"summary":"WALLET_AUTH_PROFILE_REQUIRED","value":{"type":"https://problee.com/errors/WALLET_AUTH_PROFILE_REQUIRED","title":"Example WALLET_AUTH_PROFILE_REQUIRED","status":403,"detail":"Example detail for WALLET_AUTH_PROFILE_REQUIRED","code":"WALLET_AUTH_PROFILE_REQUIRED"}}}}}},"410":{"description":"Error: one of WEB3AUTH_HANDOFF_EXPIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"WEB3AUTH_HANDOFF_EXPIRED":{"summary":"WEB3AUTH_HANDOFF_EXPIRED","value":{"type":"https://problee.com/errors/WEB3AUTH_HANDOFF_EXPIRED","title":"Example WEB3AUTH_HANDOFF_EXPIRED","status":410,"detail":"Example detail for WEB3AUTH_HANDOFF_EXPIRED","code":"WEB3AUTH_HANDOFF_EXPIRED"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}},"503":{"description":"Error: one of SERVICE_UNAVAILABLE","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"SERVICE_UNAVAILABLE":{"summary":"SERVICE_UNAVAILABLE","value":{"type":"https://problee.com/errors/SERVICE_UNAVAILABLE","title":"Example SERVICE_UNAVAILABLE","status":503,"detail":"Example detail for SERVICE_UNAVAILABLE","code":"SERVICE_UNAVAILABLE"}}}}}}}}},"/checkout/sessions/{sessionId}":{"get":{"operationId":"getCheckoutSessionsBySessionId","summary":"Get a hosted checkout session","tags":["Builder"],"security":[],"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","pattern":"^chk_[a-f0-9]{32}$"},"required":true},{"in":"header","name":"X-Checkout-Session-Token","schema":{"$ref":"#/components/schemas/CheckoutSessionAccessToken"},"required":true,"description":"Opaque checkout session access token returned when the hosted checkout session is created."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"403":{"description":"Error: one of FORBIDDEN","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}}}}}},"404":{"description":"Error: one of NOT_FOUND","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"type":"https://problee.com/errors/NOT_FOUND","title":"Example NOT_FOUND","status":404,"detail":"Example detail for NOT_FOUND","code":"NOT_FOUND"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}},"patch":{"operationId":"patchCheckoutSessionsBySessionId","summary":"Update hosted checkout lifecycle status","tags":["Builder"],"security":[],"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","pattern":"^chk_[a-f0-9]{32}$"},"required":true},{"in":"header","name":"X-Checkout-Session-Token","schema":{"$ref":"#/components/schemas/CheckoutSessionAccessToken"},"required":true,"description":"Opaque checkout session access token returned when the hosted checkout session is created."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCheckoutSessionStatusBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"403":{"description":"Error: one of FORBIDDEN, WALLET_MISMATCH","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}},"WALLET_MISMATCH":{"summary":"WALLET_MISMATCH","value":{"type":"https://problee.com/errors/WALLET_MISMATCH","title":"Example WALLET_MISMATCH","status":403,"detail":"Example detail for WALLET_MISMATCH","code":"WALLET_MISMATCH"}}}}}},"404":{"description":"Error: one of NOT_FOUND","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"type":"https://problee.com/errors/NOT_FOUND","title":"Example NOT_FOUND","status":404,"detail":"Example detail for NOT_FOUND","code":"NOT_FOUND"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}}},"/checkout/sessions/{sessionId}/execution-plan":{"get":{"operationId":"getCheckoutSessionsBySessionIdExecutionPlan","summary":"Get a first-party hosted checkout execution plan","tags":["Builder"],"security":[],"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","pattern":"^chk_[a-f0-9]{32}$"},"required":true},{"in":"header","name":"X-Checkout-Session-Token","schema":{"$ref":"#/components/schemas/CheckoutSessionAccessToken"},"required":true,"description":"Opaque checkout session access token returned when the hosted checkout session is created."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutExecutionPlan"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"403":{"description":"Error: one of FORBIDDEN","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}}}}}},"404":{"description":"Error: one of NOT_FOUND","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"type":"https://problee.com/errors/NOT_FOUND","title":"Example NOT_FOUND","status":404,"detail":"Example detail for NOT_FOUND","code":"NOT_FOUND"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}}},"/checkout/sessions/{sessionId}/wallet-auth/consume":{"post":{"operationId":"postCheckoutSessionsBySessionIdWalletAuthConsume","summary":"Consume a one-time checkout wallet auth handoff","tags":["Builder"],"security":[],"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","pattern":"^chk_[a-f0-9]{32}$"},"required":true},{"in":"header","name":"X-Checkout-Session-Token","schema":{"$ref":"#/components/schemas/CheckoutSessionAccessToken"},"required":true,"description":"Opaque checkout session access token returned when the hosted checkout session is created."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumeCheckoutWalletAuthHandoffResponse"}}}},"400":{"description":"Error: one of INVALID_PAYLOAD","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INVALID_PAYLOAD":{"summary":"INVALID_PAYLOAD","value":{"type":"https://problee.com/errors/INVALID_PAYLOAD","title":"Example INVALID_PAYLOAD","status":400,"detail":"Example detail for INVALID_PAYLOAD","code":"INVALID_PAYLOAD"}}}}}},"403":{"description":"Error: one of FORBIDDEN","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"FORBIDDEN":{"summary":"FORBIDDEN","value":{"type":"https://problee.com/errors/FORBIDDEN","title":"Example FORBIDDEN","status":403,"detail":"Example detail for FORBIDDEN","code":"FORBIDDEN"}}}}}},"404":{"description":"Error: one of NOT_FOUND","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"NOT_FOUND":{"summary":"NOT_FOUND","value":{"type":"https://problee.com/errors/NOT_FOUND","title":"Example NOT_FOUND","status":404,"detail":"Example detail for NOT_FOUND","code":"NOT_FOUND"}}}}}},"410":{"description":"Error: one of WEB3AUTH_HANDOFF_EXPIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"WEB3AUTH_HANDOFF_EXPIRED":{"summary":"WEB3AUTH_HANDOFF_EXPIRED","value":{"type":"https://problee.com/errors/WEB3AUTH_HANDOFF_EXPIRED","title":"Example WEB3AUTH_HANDOFF_EXPIRED","status":410,"detail":"Example detail for WEB3AUTH_HANDOFF_EXPIRED","code":"WEB3AUTH_HANDOFF_EXPIRED"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}},"503":{"description":"Error: one of SERVICE_UNAVAILABLE","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"SERVICE_UNAVAILABLE":{"summary":"SERVICE_UNAVAILABLE","value":{"type":"https://problee.com/errors/SERVICE_UNAVAILABLE","title":"Example SERVICE_UNAVAILABLE","status":503,"detail":"Example detail for SERVICE_UNAVAILABLE","code":"SERVICE_UNAVAILABLE"}}}}}}}}},"/metrics":{"get":{"operationId":"getMetrics","summary":"Read builder distribution metrics","tags":["Builder"],"security":[{"apiKey":[]}],"parameters":[{"in":"query","name":"from","schema":{"$ref":"#/components/schemas/IsoTimestamp"}},{"in":"query","name":"to","schema":{"$ref":"#/components/schemas/IsoTimestamp"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderMetricsResponse"}}}},"401":{"description":"Error: one of AUTH_REQUIRED","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"AUTH_REQUIRED":{"summary":"AUTH_REQUIRED","value":{"type":"https://problee.com/errors/AUTH_REQUIRED","title":"Example AUTH_REQUIRED","status":401,"detail":"Example detail for AUTH_REQUIRED","code":"AUTH_REQUIRED"}}}}}},"500":{"description":"Error: one of INTERNAL_ERROR","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"},"examples":{"INTERNAL_ERROR":{"summary":"INTERNAL_ERROR","value":{"type":"https://problee.com/errors/INTERNAL_ERROR","title":"Example INTERNAL_ERROR","status":500,"detail":"Example detail for INTERNAL_ERROR","code":"INTERNAL_ERROR"}}}}}}}}}},"components":{"schemas":{"CreateBuilderIntegrationBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"environment":{"$ref":"#/components/schemas/BuilderIntegrationEnvironment"},"allowedOrigins":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","format":"uri"}},"allowedChains":{"minItems":1,"maxItems":2,"type":"array","items":{"$ref":"#/components/schemas/ChainId"}},"allowedCollaterals":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"capabilities":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/BuilderCapability"}},"modeFlags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"rateLimitBucket":{"type":"string","minLength":1,"maxLength":64}},"required":["name","allowedOrigins","allowedChains","allowedCollaterals"]},"BuilderIntegrationEnvironment":{"type":"string","enum":["production","sandbox"]},"ChainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"EVM chain ID. 480 = World Chain, 8453 = Base. Other chains are out of scope for this surface."},"BuilderCapability":{"type":"string","enum":["embed:read","checkout:session","checkout:popup","checkout:iframe","metrics:read"]},"PublicIntegrationId":{"type":"string","pattern":"^pub_[a-f0-9]{24,64}$"},"VerifyBuilderIntegrationOriginBody":{"type":"object","properties":{"origin":{"type":"string","format":"uri"}},"required":["origin"]},"CreateBuilderWalletAuthProfileBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"provider":{"$ref":"#/components/schemas/BuilderWalletAuthProvider"},"web3AuthClientId":{"type":"string","minLength":10,"maxLength":512},"web3AuthNetwork":{"$ref":"#/components/schemas/Web3AuthNetwork"},"allowedCheckoutOrigins":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uri"}},"loginMode":{"$ref":"#/components/schemas/BuilderWalletAuthLoginMode"},"allowedAuthConnectionIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"groupedAuthConnectionId":{"type":"string","minLength":1,"maxLength":128},"jwt":{"type":"object","properties":{"issuer":{"type":"string","format":"uri"},"audience":{"type":"string","minLength":1,"maxLength":256},"jwksUrl":{"type":"string","format":"uri"},"subjectClaim":{"type":"string","minLength":1,"maxLength":64},"verifierIdField":{"type":"string","minLength":1,"maxLength":64}}}},"required":["name","web3AuthClientId","web3AuthNetwork","allowedCheckoutOrigins"]},"BuilderWalletAuthProvider":{"type":"string","enum":["web3auth"]},"Web3AuthNetwork":{"type":"string","enum":["sapphire_mainnet","sapphire_devnet"]},"BuilderWalletAuthLoginMode":{"type":"string","enum":["modal","custom_jwt","modal_or_custom_jwt"]},"WalletAuthProfileId":{"type":"string","pattern":"^wap_[a-f0-9]{24,64}$"},"UpdateBuilderWalletAuthProfileBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"provider":{"$ref":"#/components/schemas/BuilderWalletAuthProvider"},"web3AuthClientId":{"type":"string","minLength":10,"maxLength":512},"web3AuthNetwork":{"$ref":"#/components/schemas/Web3AuthNetwork"},"allowedCheckoutOrigins":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uri"}},"loginMode":{"$ref":"#/components/schemas/BuilderWalletAuthLoginMode"},"allowedAuthConnectionIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"groupedAuthConnectionId":{"type":"string","minLength":1,"maxLength":128},"jwt":{"type":"object","properties":{"issuer":{"type":"string","format":"uri"},"audience":{"type":"string","minLength":1,"maxLength":256},"jwksUrl":{"type":"string","format":"uri"},"subjectClaim":{"type":"string","minLength":1,"maxLength":64},"verifierIdField":{"type":"string","minLength":1,"maxLength":64}}},"status":{"$ref":"#/components/schemas/BuilderWalletAuthStatus"}}},"BuilderWalletAuthStatus":{"type":"string","enum":["active","paused","revoked"]},"CreateBuilderTradeTokenBody":{"type":"object","properties":{"publicIntegrationId":{"$ref":"#/components/schemas/PublicIntegrationId"},"chainId":{"$ref":"#/components/schemas/ChainId"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"collateralToken":{"type":"string","minLength":1,"maxLength":128},"expectedWalletAddress":{"$ref":"#/components/schemas/EvmAddress"},"walletProviderHint":{"$ref":"#/components/schemas/BuilderWalletProviderHint"},"walletAuthProfileId":{"$ref":"#/components/schemas/WalletAuthProfileId"},"capabilities":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/BuilderCapability"}}},"required":["publicIntegrationId","chainId","marketAddress","collateralToken"]},"EvmAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Checksummed or lowercase 20-byte EVM address (0x + 40 hex)."},"BuilderWalletProviderHint":{"type":"string","enum":["web3auth","metamask","worldapp","baseapp","walletconnect"]},"CreateCheckoutSessionBody":{"type":"object","properties":{"chainId":{"$ref":"#/components/schemas/ChainId"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"tradeType":{"type":"string","enum":["buy","sell"]},"side":{"$ref":"#/components/schemas/TradeSide"},"amountWei":{"$ref":"#/components/schemas/WeiString"},"collateralToken":{"type":"string","minLength":1,"maxLength":128},"slippageBps":{"type":"integer","minimum":0,"maximum":10000},"publicIntegrationId":{"$ref":"#/components/schemas/PublicIntegrationId"},"tradeToken":{"type":"string"},"expectedWalletAddress":{"$ref":"#/components/schemas/EvmAddress"},"walletProviderHint":{"$ref":"#/components/schemas/BuilderWalletProviderHint"},"walletAuthProfileId":{"$ref":"#/components/schemas/WalletAuthProfileId"},"walletAuthHandoff":{"type":"object","properties":{"type":{"type":"string","const":"web3auth_jwt"},"idToken":{"type":"string","minLength":16,"maxLength":16384},"expiresAt":{"$ref":"#/components/schemas/IsoTimestamp"}},"required":["type","idToken"]},"successUrl":{"type":"string","format":"uri"},"cancelUrl":{"type":"string","format":"uri"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["chainId","marketAddress","tradeType","side","amountWei","collateralToken"]},"TradeSide":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}],"description":"0-indexed on-chain trade side used on `/trade/quote` and `/trade/prepare`. Binary markets accept {0,1} (0=YES, 1=NO); ternary markets accept {0,1,2} (0=YES, 1=NO, 2=DRAW). Contrast with `ResolutionOutcome`, which is the 1-indexed outcome slot on `/resolve/*` — the indices intentionally do not match because trades are placed against on-chain `outcomeId`s starting at 0 while the resolution layer reports the human-facing 1-indexed slot."},"WeiString":{"type":"string","pattern":"^\\d+$","description":"Non-negative integer amount in the token's smallest unit (wei for ETH-family tokens, 6-decimal for USDC), serialized as a base-10 string to avoid JS number precision loss."},"IsoTimestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp with timezone offset."},"CheckoutSessionAccessToken":{"type":"string","minLength":32,"maxLength":512,"description":"Opaque checkout session access token returned when the hosted checkout session is created."},"UpdateCheckoutSessionStatusBody":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/CheckoutSessionStatus"},"walletAddress":{"$ref":"#/components/schemas/EvmAddress"},"txHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"quoteId":{"type":"string","minLength":1,"maxLength":128},"failureCode":{"type":"string","minLength":1,"maxLength":128},"failureReason":{"type":"string","maxLength":512},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["status"]},"CheckoutSessionStatus":{"type":"string","enum":["created","opened","wallet_connected","quoted","approval_required","submitted","indexed","failed","cancelled","expired"]},"ProblemDetailsErrorEntry":{"type":"object","properties":{"path":{"type":"string","description":"JSON pointer or dot-path to the offending field."},"message":{"type":"string","description":"Human-readable description of the field error."}},"required":["path","message"]},"MarketCreatedEvent":{"type":"object","properties":{"type":{"type":"string","const":"market.created"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"question":{"type":"string"},"category":{"$ref":"#/components/schemas/MarketCategory"}},"required":["type","id","timestamp","marketAddress","question","category"]},"MarketCategory":{"type":"string","enum":["CRYPTO","SPORTS","POLITICS","DAILY_LIFE","LOCAL","SOCIAL","FUN","OTHER"],"description":"Agent-supplied topical grouping. The protocol stores the string verbatim; UI uses it for discovery filters."},"MarketChallengeWindowOpenedEvent":{"type":"object","properties":{"type":{"type":"string","const":"market.challengeWindowOpened"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"outcome":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","id","timestamp","marketAddress","outcome"]},"MarketResolvedEvent":{"type":"object","properties":{"type":{"type":"string","const":"market.resolved"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"outcome":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","id","timestamp","marketAddress","outcome"]},"MarketDisputedEvent":{"type":"object","properties":{"type":{"type":"string","const":"market.disputed"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"challenger":{"$ref":"#/components/schemas/EvmAddress"},"counterOutcome":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","id","timestamp","marketAddress","challenger","counterOutcome"]},"NegotiationCounteredEvent":{"type":"object","properties":{"type":{"type":"string","const":"negotiation.countered"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"negotiationId":{"type":"string"},"adjustedFields":{"type":"array","items":{"type":"string"}}},"required":["type","id","timestamp","negotiationId","adjustedFields"]},"NegotiationAcceptedEvent":{"type":"object","properties":{"type":{"type":"string","const":"negotiation.accepted"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"negotiationId":{"type":"string"}},"required":["type","id","timestamp","negotiationId"]},"NegotiationRejectedEvent":{"type":"object","properties":{"type":{"type":"string","const":"negotiation.rejected"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"negotiationId":{"type":"string"},"reason":{"type":"string"}},"required":["type","id","timestamp","negotiationId","reason"]},"NegotiationExpiredEvent":{"type":"object","properties":{"type":{"type":"string","const":"negotiation.expired"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"negotiationId":{"type":"string"}},"required":["type","id","timestamp","negotiationId"]},"ErrorReason":{"type":"string","enum":["AUTH_REQUIRED","WALLET_AUTH_REQUIRED","WALLET_AUTH_INVALID","INSUFFICIENT_TIER","FORBIDDEN","FEATURE_DISABLED","NOT_ORB_VERIFIED","NOT_AUTHORIZED","NOT_MARKET_CREATOR","WALLET_REQUIRED","EMAIL_NOT_VERIFIED","EMAIL_ALREADY_REGISTERED","WALLET_ADDRESS_MISMATCH","WALLET_PARAM_NOT_ALLOWED","OWNER_ID_MISMATCH","OWNERSHIP_MISMATCH","OWNERSHIP_PROOF_REQUIRED","WALLET_AUTH_PROFILE_REQUIRED","WALLET_MISMATCH","WEB3AUTH_LOGIN_FAILED","KEY_LIMIT_REACHED","SCOPE_WIDENING_DENIED","INVALID_REQUEST","INVALID_PAYLOAD","INVALID_QUERY","INVALID_HEADER","MISSING_FIELDS","INVALID_ID","INVALID_SCOPES","INVALID_SPENDING_LIMIT","INVALID_EXPIRES_AT","INVALID_WEBHOOK_URL","WEBHOOK_LIMIT_REACHED","KEY_ALREADY_REVOKED","MARKET_ID_REQUIRED","INVALID_OUTCOME","INVALID_CHAIN","INVALID_COLLATERAL","MISSING_COLLATERAL","INVALID_QUESTION","QUESTION_TOO_LONG","INVALID_SNAPSHOT","BATCH_TOO_LARGE","MAX_DEPTH_EXCEEDED","PAYLOAD_TOO_LARGE","INVALID_MARKET_REQUIRED","INVALID_MARKET_PAIR","INVALID_FORECAST_SIDE","MARKET_NOT_LIVE_FOR_SIDE","PREFLIGHT_FAILED","PROPOSAL_FAILED","ACCEPT_FAILED","REJECT_FAILED","CONTENT_BLOCKED","SECURITY_RISK_BLOCKED","NO_PENDING_FEES","BAD_REQUEST","CORS_REJECTED","NOT_FOUND","MARKET_NOT_FOUND","AGENT_NOT_FOUND","CHAIN_NOT_FOUND","PARENT_NOT_FOUND","FACTORY_NOT_DEPLOYED","KEY_NOT_FOUND","API_KEY_NOT_FOUND","WEBHOOK_NOT_FOUND","BUILDER_ID_NOT_FOUND","NO_API_KEYS","MARKET_CLOSED","MARKET_NOT_OPEN_YET","EXPIRED_TOKEN","WEB3AUTH_HANDOFF_EXPIRED","CONFLICT","MARKET_NOT_LIVE","MARKET_NOT_RESOLVED","CONTENT_SEALED","TIMING_SEALED","STALE_UPDATE","ALREADY_RESOLVED","ALREADY_SWEPT","SWEEP_IN_PROGRESS","DUPLICATE_CONTENT","AGENT_ALREADY_EXISTS","NAME_TAKEN","AMBIGUOUS_MARKET_ADDRESS","IDEMPOTENCY_KEY_CONFLICT","NONCE_REUSED","KEY_GENERATION_CONFLICT","MARKET_INSOLVENT","SLIPPAGE_EXCEEDED","INSUFFICIENT_ALLOWANCE","INSUFFICIENT_PREFUND","INSUFFICIENT_DEPOSIT","INSUFFICIENT_PULL","RATE_LIMITED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","QUOTE_STATE_UNAVAILABLE","PROTOCOL_UNAVAILABLE","PROTOCOL_PAUSED","EMBED_ATTRIBUTION_UNAVAILABLE","REFERRAL_TABLES_MISSING","STATS_FETCH_FAILED","PAYOUT_SCHEDULE_FETCH_FAILED","QUOTE_FAILED","INVALID_MARKET_STATE","MATH_OVERFLOW","UNKNOWN_CONTRACT_ERROR","DEADLINE_EXPIRED","ZERO_INPUT","ZERO_NET_INPUT","ZERO_DELTA","INVALID_MARKET","INVALID_TOKEN","NATIVE_ROUTE_UNAVAILABLE"],"description":"Stable, machine-readable reason code. Clients branch on this field, not on `title` or `detail`."},"BuilderIntegration":{"type":"object","properties":{"id":{"type":"string"},"publicIntegrationId":{"$ref":"#/components/schemas/PublicIntegrationId"},"builderId":{"$ref":"#/components/schemas/BuilderId"},"ownerId":{"anyOf":[{"$ref":"#/components/schemas/EvmAddress"},{"type":"null"}]},"apiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"environment":{"$ref":"#/components/schemas/BuilderIntegrationEnvironment"},"allowedOrigins":{"minItems":1,"type":"array","items":{"type":"string","format":"uri"}},"verifiedOrigins":{"type":"array","items":{"type":"string","format":"uri"}},"originVerificationStatus":{"$ref":"#/components/schemas/BuilderOriginVerificationStatus"},"allowedChains":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ChainId"}},"allowedCollaterals":{"minItems":1,"type":"array","items":{"type":"string"}},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/BuilderCapability"}},"modeFlags":{"type":"array","items":{"type":"string"}},"rateLimitBucket":{"type":"string"},"status":{"$ref":"#/components/schemas/BuilderIntegrationStatus"},"createdAt":{"$ref":"#/components/schemas/IsoTimestamp"},"updatedAt":{"$ref":"#/components/schemas/IsoTimestamp"}},"required":["id","publicIntegrationId","builderId","ownerId","apiKeyId","name","environment","allowedOrigins","verifiedOrigins","originVerificationStatus","allowedChains","allowedCollaterals","capabilities","modeFlags","rateLimitBucket","status","createdAt","updatedAt"],"additionalProperties":false},"BuilderId":{"type":"string","minLength":1,"maxLength":128},"BuilderOriginVerificationStatus":{"type":"string","enum":["pending","verified","failed"]},"BuilderIntegrationStatus":{"type":"string","enum":["active","paused","revoked"]},"BuilderIntegrationList":{"type":"array","items":{"$ref":"#/components/schemas/BuilderIntegration"}},"VerifyBuilderIntegrationOriginResponse":{"type":"object","properties":{"publicIntegrationId":{"$ref":"#/components/schemas/PublicIntegrationId"},"origin":{"type":"string","format":"uri"},"verified":{"type":"boolean"},"method":{"type":"string","enum":["well-known","dns","none"]},"checkedAt":{"$ref":"#/components/schemas/IsoTimestamp"}},"required":["publicIntegrationId","origin","verified","method","checkedAt"],"additionalProperties":false},"BuilderWalletAuthProfile":{"type":"object","properties":{"id":{"type":"string"},"walletAuthProfileId":{"$ref":"#/components/schemas/WalletAuthProfileId"},"publicIntegrationId":{"$ref":"#/components/schemas/PublicIntegrationId"},"builderId":{"$ref":"#/components/schemas/BuilderId"},"provider":{"$ref":"#/components/schemas/BuilderWalletAuthProvider"},"name":{"type":"string"},"web3AuthClientId":{"type":"string"},"web3AuthNetwork":{"$ref":"#/components/schemas/Web3AuthNetwork"},"allowedCheckoutOrigins":{"minItems":1,"type":"array","items":{"type":"string","format":"uri"}},"loginMode":{"$ref":"#/components/schemas/BuilderWalletAuthLoginMode"},"allowedAuthConnectionIds":{"type":"array","items":{"type":"string"}},"groupedAuthConnectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jwt":{"anyOf":[{"$ref":"#/components/schemas/BuilderWalletAuthJwtConfig"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/BuilderWalletAuthStatus"},"createdAt":{"$ref":"#/components/schemas/IsoTimestamp"},"updatedAt":{"$ref":"#/components/schemas/IsoTimestamp"}},"required":["id","walletAuthProfileId","publicIntegrationId","builderId","provider","name","web3AuthClientId","web3AuthNetwork","allowedCheckoutOrigins","loginMode","allowedAuthConnectionIds","groupedAuthConnectionId","jwt","status","createdAt","updatedAt"],"additionalProperties":false},"BuilderWalletAuthJwtConfig":{"type":"object","properties":{"issuer":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"audience":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"jwksUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"subjectClaim":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"verifierIdField":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["issuer","audience","jwksUrl","subjectClaim","verifierIdField"],"additionalProperties":false},"BuilderWalletAuthProfileList":{"type":"array","items":{"$ref":"#/components/schemas/BuilderWalletAuthProfile"}},"CreateBuilderTradeTokenResponse":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"$ref":"#/components/schemas/IsoTimestamp"},"publicIntegrationId":{"$ref":"#/components/schemas/PublicIntegrationId"},"builderId":{"$ref":"#/components/schemas/BuilderId"}},"required":["token","expiresAt","publicIntegrationId","builderId"],"additionalProperties":false},"CreateCheckoutSessionResponse":{"type":"object","properties":{"sessionId":{"type":"string"},"checkoutAccessToken":{"$ref":"#/components/schemas/CheckoutSessionAccessToken"},"checkoutUrl":{"type":"string","format":"uri"},"expiresAt":{"$ref":"#/components/schemas/IsoTimestamp"},"builderId":{"$ref":"#/components/schemas/BuilderId"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"chainId":{"$ref":"#/components/schemas/ChainId"}},"required":["sessionId","checkoutAccessToken","checkoutUrl","expiresAt","builderId","marketAddress","chainId"],"additionalProperties":false},"CheckoutSession":{"type":"object","properties":{"sessionId":{"type":"string"},"status":{"$ref":"#/components/schemas/CheckoutSessionStatus"},"builderId":{"$ref":"#/components/schemas/BuilderId"},"publicIntegrationId":{"anyOf":[{"$ref":"#/components/schemas/PublicIntegrationId"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"chainId":{"$ref":"#/components/schemas/ChainId"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"tradeType":{"type":"string","enum":["buy","sell"]},"side":{"$ref":"#/components/schemas/TradeSide"},"amountWei":{"$ref":"#/components/schemas/WeiString"},"collateralToken":{"type":"string"},"slippageBps":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"successUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedWalletAddress":{"anyOf":[{"$ref":"#/components/schemas/EvmAddress"},{"type":"null"}]},"walletProviderHint":{"anyOf":[{"$ref":"#/components/schemas/BuilderWalletProviderHint"},{"type":"null"}]},"walletAddress":{"anyOf":[{"$ref":"#/components/schemas/EvmAddress"},{"type":"null"}]},"txHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"quoteId":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"execution":{"$ref":"#/components/schemas/CheckoutExecutionConstraints"},"walletAuth":{"$ref":"#/components/schemas/CheckoutWalletAuthInstructions"},"events":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSessionEvent"}},"expiresAt":{"$ref":"#/components/schemas/IsoTimestamp"},"createdAt":{"$ref":"#/components/schemas/IsoTimestamp"},"updatedAt":{"$ref":"#/components/schemas/IsoTimestamp"}},"required":["sessionId","status","builderId","publicIntegrationId","origin","chainId","marketAddress","tradeType","side","amountWei","collateralToken","slippageBps","successUrl","cancelUrl","expectedWalletAddress","walletProviderHint","walletAddress","txHash","quoteId","failureCode","failureReason","metadata","execution","walletAuth","events","expiresAt","createdAt","updatedAt"],"additionalProperties":false},"CheckoutExecutionConstraints":{"type":"object","properties":{"mode":{"type":"string","const":"hosted_checkout"},"walletSigning":{"type":"string","const":"user_controlled"},"approvalPolicy":{"type":"string","const":"permit2_exact_or_explicit_operator"},"allowedChains":{"type":"array","items":{"$ref":"#/components/schemas/ChainId"}},"allowedCollaterals":{"type":"array","items":{"type":"string"}},"worldAppAllowedChains":{"type":"array","items":{"$ref":"#/components/schemas/ChainId"}}},"required":["mode","walletSigning","approvalPolicy","allowedChains","allowedCollaterals","worldAppAllowedChains"],"additionalProperties":false},"CheckoutWalletAuthInstructions":{"type":"object","properties":{"providerHint":{"anyOf":[{"$ref":"#/components/schemas/BuilderWalletProviderHint"},{"type":"null"}]},"expectedWalletAddress":{"anyOf":[{"$ref":"#/components/schemas/EvmAddress"},{"type":"null"}]},"profile":{"anyOf":[{"type":"object","properties":{"walletAuthProfileId":{"$ref":"#/components/schemas/WalletAuthProfileId"},"provider":{"$ref":"#/components/schemas/BuilderWalletAuthProvider"},"web3AuthClientId":{"type":"string"},"web3AuthNetwork":{"$ref":"#/components/schemas/Web3AuthNetwork"},"loginMode":{"$ref":"#/components/schemas/BuilderWalletAuthLoginMode"},"allowedAuthConnectionIds":{"type":"array","items":{"type":"string"}},"groupedAuthConnectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"jwt":{"anyOf":[{"$ref":"#/components/schemas/BuilderWalletAuthJwtConfig"},{"type":"null"}]}},"required":["walletAuthProfileId","provider","web3AuthClientId","web3AuthNetwork","loginMode","allowedAuthConnectionIds","groupedAuthConnectionId","jwt"],"additionalProperties":false},{"type":"null"}]},"handoff":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"web3auth_jwt"},"available":{"type":"boolean"},"expiresAt":{"anyOf":[{"$ref":"#/components/schemas/IsoTimestamp"},{"type":"null"}]}},"required":["type","available","expiresAt"],"additionalProperties":false},{"type":"null"}]}},"required":["providerHint","expectedWalletAddress","profile","handoff"],"additionalProperties":false},"CheckoutSessionEvent":{"type":"object","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/CheckoutSessionStatus"},"walletAddress":{"anyOf":[{"$ref":"#/components/schemas/EvmAddress"},{"type":"null"}]},"txHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"quoteId":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"$ref":"#/components/schemas/IsoTimestamp"}},"required":["id","status","walletAddress","txHash","quoteId","failureCode","failureReason","metadata","createdAt"],"additionalProperties":false},"CheckoutExecutionPlan":{"type":"object","properties":{"sessionId":{"type":"string"},"status":{"$ref":"#/components/schemas/CheckoutSessionStatus"},"chainId":{"$ref":"#/components/schemas/ChainId"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"tradeType":{"type":"string","enum":["buy","sell"]},"side":{"$ref":"#/components/schemas/TradeSide"},"amountWei":{"$ref":"#/components/schemas/WeiString"},"collateralToken":{"type":"string"},"slippageBps":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"successUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedWalletAddress":{"anyOf":[{"$ref":"#/components/schemas/EvmAddress"},{"type":"null"}]},"walletProviderHint":{"anyOf":[{"$ref":"#/components/schemas/BuilderWalletProviderHint"},{"type":"null"}]},"execution":{"$ref":"#/components/schemas/CheckoutExecutionConstraints"},"walletAuth":{"$ref":"#/components/schemas/CheckoutWalletAuthInstructions"}},"required":["sessionId","status","chainId","marketAddress","tradeType","side","amountWei","collateralToken","slippageBps","successUrl","cancelUrl","expectedWalletAddress","walletProviderHint","execution","walletAuth"],"additionalProperties":false},"ConsumeCheckoutWalletAuthHandoffResponse":{"type":"object","properties":{"handoff":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"web3auth_jwt"},"idToken":{"type":"string"},"expiresAt":{"$ref":"#/components/schemas/IsoTimestamp"}},"required":["type","idToken","expiresAt"],"additionalProperties":false},{"type":"null"}]}},"required":["handoff"],"additionalProperties":false},"BuilderMetricsResponse":{"type":"object","properties":{"builderId":{"$ref":"#/components/schemas/BuilderId"},"period":{"type":"object","properties":{"from":{"$ref":"#/components/schemas/IsoTimestamp"},"to":{"$ref":"#/components/schemas/IsoTimestamp"}},"required":["from","to"],"additionalProperties":false},"totals":{"type":"object","properties":{"embedLoads":{"type":"integer","minimum":0,"maximum":9007199254740991},"apiCalls":{"type":"integer","minimum":0,"maximum":9007199254740991},"tradesRouted":{"type":"integer","minimum":0,"maximum":9007199254740991},"volumeRouted":{"$ref":"#/components/schemas/WeiString"},"uniqueWallets":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["embedLoads","apiCalls","tradesRouted","volumeRouted","uniqueWallets"],"additionalProperties":false},"checkout":{"type":"object","properties":{"sessionsCreated":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"walletConnected":{"type":"integer","minimum":0,"maximum":9007199254740991},"quoted":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvalRequired":{"type":"integer","minimum":0,"maximum":9007199254740991},"submitted":{"type":"integer","minimum":0,"maximum":9007199254740991},"indexed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":0,"maximum":9007199254740991},"expired":{"type":"integer","minimum":0,"maximum":9007199254740991},"quoteToSubmitRatio":{"type":"number","minimum":0},"submitToIndexRatio":{"type":"number","minimum":0},"volumeByIntegration":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"failureCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","count"],"additionalProperties":false}},"walletAuthProfiles":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["sessionsCreated","opened","walletConnected","quoted","approvalRequired","submitted","indexed","failed","cancelled","expired","quoteToSubmitRatio","submitToIndexRatio","volumeByIntegration","failureCodes","walletAuthProfiles"],"additionalProperties":false},"daily":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["builderId","period","totals","checkout","daily"],"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"default":"about:blank","description":"URI that identifies the problem type. Problee emits `https://problee.com/errors/<code>` per RFC 9457 §3.1; `about:blank` is still accepted for backward-compatible clients.","type":"string"},"title":{"type":"string","description":"Short, human-readable summary — stable per problem type."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"HTTP status code for this response (duplicate of HTTP status line)."},"detail":{"description":"Human-readable explanation specific to this occurrence.","type":"string"},"instance":{"description":"URI identifying this specific occurrence (request path).","type":"string"},"code":{"$ref":"#/components/schemas/ErrorReason"},"requestId":{"description":"Correlation ID — echo of X-Request-Id header if provided, else server-generated.","type":"string"},"errors":{"description":"Field-level validation errors; present on 400 INVALID_PAYLOAD responses.","type":"array","items":{"$ref":"#/components/schemas/ProblemDetailsErrorEntryOutput"}}},"required":["type","title","status","code"],"additionalProperties":{},"description":"RFC 9457 Problem Details error envelope. Sent with Content-Type: application/problem+json. Additional top-level keys are permitted per RFC 9457 §3.2."},"ProblemDetailsErrorEntryOutput":{"type":"object","properties":{"path":{"type":"string","description":"JSON pointer or dot-path to the offending field."},"message":{"type":"string","description":"Human-readable description of the field error."}},"required":["path","message"],"additionalProperties":false},"MarketCreatedEventOutput":{"type":"object","properties":{"type":{"type":"string","const":"market.created"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"question":{"type":"string"},"category":{"$ref":"#/components/schemas/MarketCategory"}},"required":["type","id","timestamp","marketAddress","question","category"],"additionalProperties":false},"MarketChallengeWindowOpenedEventOutput":{"type":"object","properties":{"type":{"type":"string","const":"market.challengeWindowOpened"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"outcome":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","id","timestamp","marketAddress","outcome"],"additionalProperties":false},"MarketResolvedEventOutput":{"type":"object","properties":{"type":{"type":"string","const":"market.resolved"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"outcome":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","id","timestamp","marketAddress","outcome"],"additionalProperties":false},"MarketDisputedEventOutput":{"type":"object","properties":{"type":{"type":"string","const":"market.disputed"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"marketAddress":{"$ref":"#/components/schemas/EvmAddress"},"challenger":{"$ref":"#/components/schemas/EvmAddress"},"counterOutcome":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","id","timestamp","marketAddress","challenger","counterOutcome"],"additionalProperties":false},"NegotiationCounteredEventOutput":{"type":"object","properties":{"type":{"type":"string","const":"negotiation.countered"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"negotiationId":{"type":"string"},"adjustedFields":{"type":"array","items":{"type":"string"}}},"required":["type","id","timestamp","negotiationId","adjustedFields"],"additionalProperties":false},"NegotiationAcceptedEventOutput":{"type":"object","properties":{"type":{"type":"string","const":"negotiation.accepted"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"negotiationId":{"type":"string"}},"required":["type","id","timestamp","negotiationId"],"additionalProperties":false},"NegotiationRejectedEventOutput":{"type":"object","properties":{"type":{"type":"string","const":"negotiation.rejected"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"negotiationId":{"type":"string"},"reason":{"type":"string"}},"required":["type","id","timestamp","negotiationId","reason"],"additionalProperties":false},"NegotiationExpiredEventOutput":{"type":"object","properties":{"type":{"type":"string","const":"negotiation.expired"},"id":{"type":"string"},"timestamp":{"$ref":"#/components/schemas/IsoTimestamp"},"negotiationId":{"type":"string"}},"required":["type","id","timestamp","negotiationId"],"additionalProperties":false},"AgentWsEvent":{"oneOf":[{"$ref":"#/components/schemas/MarketCreatedEventOutput"},{"$ref":"#/components/schemas/MarketChallengeWindowOpenedEventOutput"},{"$ref":"#/components/schemas/MarketResolvedEventOutput"},{"$ref":"#/components/schemas/MarketDisputedEventOutput"},{"$ref":"#/components/schemas/NegotiationCounteredEventOutput"},{"$ref":"#/components/schemas/NegotiationAcceptedEventOutput"},{"$ref":"#/components/schemas/NegotiationRejectedEventOutput"},{"$ref":"#/components/schemas/NegotiationExpiredEventOutput"}],"description":"Source-backed Agent WebSocket event. Discriminated by `type`; only the event variants available for subscription today are included.","type":"object","discriminator":{"propertyName":"type","mapping":{"market.created":"#/components/schemas/MarketCreatedEventOutput","market.challengeWindowOpened":"#/components/schemas/MarketChallengeWindowOpenedEventOutput","market.resolved":"#/components/schemas/MarketResolvedEventOutput","market.disputed":"#/components/schemas/MarketDisputedEventOutput","negotiation.countered":"#/components/schemas/NegotiationCounteredEventOutput","negotiation.accepted":"#/components/schemas/NegotiationAcceptedEventOutput","negotiation.rejected":"#/components/schemas/NegotiationRejectedEventOutput","negotiation.expired":"#/components/schemas/NegotiationExpiredEventOutput"}}},"CreatorContentEnvelope":{"type":"object","properties":{"renderer":{"type":"string","minLength":1,"maxLength":128,"description":"Free-form renderer identifier. Not validated against a closed list."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Renderer-specific data (max 4096 bytes once JSON-serialized). Opaque to the protocol."},"label":{"description":"Optional display label","type":"string","maxLength":200},"timestamp":{"description":"Unix ms (defaults to server time)","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["renderer","data"],"additionalProperties":false,"description":"Opaque content envelope forwarded by the protocol and retained only as ephemeral live state."}},"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Server-side builder API key. Never expose this in browser code."}}}}