{"openapi":"3.1.0","info":{"title":"Swivy API","version":"1.0.0","description":"Swivy control-plane and runtime API. This contract documents the primary headers and payloads used by the current platform. Legacy migration headers such as x-env-id and x-api-key are still accepted in code, but they are intentionally not the primary documented contract here."},"servers":[{"url":"/","description":"Current Swivy deployment"}],"tags":[{"name":"system","description":"Health, capabilities, and infrastructure status"},{"name":"control","description":"Organization, project, environment, and policy management"},{"name":"oidc","description":"OIDC discovery, auth code flow, JWKS, and Sign in with Swop"},{"name":"runtime-auth","description":"Email login, session discovery, and MFA"},{"name":"runtime-accounts","description":"Managed accounts, linked wallets, and custody flows"},{"name":"runtime-intents","description":"Signing and transaction intents"},{"name":"runtime-session-grants","description":"Delegated session keys for agents and backend workers"}],"components":{"securitySchemes":{"AdminToken":{"type":"apiKey","in":"header","name":"x-admin-token","description":"Deployment-level control-plane admin token."},"SwivyAdminKey":{"type":"apiKey","in":"header","name":"x-swivy-admin-key","description":"Organization-scoped control-plane admin credential. Supported on organization, project, and environment management routes."},"SwivyAppId":{"type":"apiKey","in":"header","name":"x-swivy-app-id","description":"Environment-scoped public app identifier."},"SwivyPublishableKey":{"type":"apiKey","in":"header","name":"x-swivy-publishable-key","description":"Environment-scoped browser or mobile credential."},"SwivySecretKey":{"type":"apiKey","in":"header","name":"x-swivy-secret-key","description":"Environment-scoped server credential."},"BearerSession":{"type":"http","scheme":"bearer","bearerFormat":"opaque session token","description":"Opaque runtime session token returned by email verification or OIDC token exchange."},"OidcAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Swivy-issued OIDC access token."}},"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"reasons":{"type":"array","items":{"type":"string"}},"supportedActions":{"type":"array","items":{"type":"string"}}}},"Chain":{"type":"string","enum":["evm","solana"]},"AuthMethodType":{"type":"string","enum":["email","passkey","totp","sms"]},"ManagedAccountType":{"type":"string","enum":["smart","managed"]},"WalletPurpose":{"type":"string","enum":["agent","personal","recovery","treasury"]},"CustodyMode":{"type":"string","enum":["managed_tee","split_custody"]},"ManagedKeyShareKind":{"type":"string","enum":["server","device","recovery"]},"SessionKeyCurve":{"type":"string","enum":["ed25519"]},"IntentKind":{"type":"string","enum":["sign_message","sign_digest","sign_typed_data","sign_transaction","execute_transaction"]},"SigningIntentKind":{"type":"string","enum":["sign_message","sign_digest","sign_typed_data","sign_transaction"]},"IntentStatus":{"type":"string","enum":["pending_step_up","queued","processing","completed","failed"]},"SecureSignerMode":{"type":"string","enum":["software","mock_tee","nitro_tee"]},"SignerTransport":{"type":"string","enum":["local","remote"]},"NitroPcrMap":{"type":"object","additionalProperties":{"type":"string"}},"SignerAttestation":{"type":"object","required":["mode","provider","enclaveId","measurement","issuedAt","document","signatureAlgorithm","signatureBase64","publicKeyFingerprint"],"properties":{"mode":{"$ref":"#/components/schemas/SecureSignerMode"},"provider":{"type":"string"},"enclaveId":{"type":"string"},"measurement":{"type":"string"},"issuedAt":{"type":"string","format":"date-time"},"document":{"type":"string"},"signatureAlgorithm":{"type":"string","enum":["ed25519"]},"signatureBase64":{"type":"string"},"publicKeyFingerprint":{"type":"string"},"imageSha384":{"type":"string"},"pcrs":{"$ref":"#/components/schemas/NitroPcrMap"},"kmsKeyArn":{"type":"string"}}},"SecureSignerStatus":{"type":"object","required":["mode","transport","provider","enclaveId","measurement","healthy","trustVerified","attestation"],"properties":{"mode":{"$ref":"#/components/schemas/SecureSignerMode"},"transport":{"$ref":"#/components/schemas/SignerTransport"},"provider":{"type":"string"},"enclaveId":{"type":"string"},"measurement":{"type":"string"},"healthy":{"type":"boolean"},"trustVerified":{"type":"boolean"},"remoteUrl":{"type":"string"},"imageSha384":{"type":"string"},"pcrs":{"$ref":"#/components/schemas/NitroPcrMap"},"kmsKeyArn":{"type":"string"},"attestation":{"$ref":"#/components/schemas/SignerAttestation"}}},"ChainCapabilities":{"type":"object","required":["chain","supportsSmartAccounts","supportsLinkedWallets","supportsMessageSigning","supportsTransactionSigning","supportsHostedExecution","supportsSessionDelegation"],"properties":{"chain":{"$ref":"#/components/schemas/Chain"},"supportsSmartAccounts":{"type":"boolean"},"supportsLinkedWallets":{"type":"boolean"},"supportsMessageSigning":{"type":"boolean"},"supportsTransactionSigning":{"type":"boolean"},"supportsHostedExecution":{"type":"boolean"},"supportsSessionDelegation":{"type":"boolean"}}},"EnvironmentChainRpcHeader":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"value":{"type":"string","minLength":1,"maxLength":4000}}},"EnvironmentChainRpcConfig":{"type":"object","required":["environmentId","chain","network","rpcUrl","wsUrl","headers","commitment","skipPreflight","maxRetries","enabled","createdAt","updatedAt"],"properties":{"environmentId":{"type":"string"},"chain":{"$ref":"#/components/schemas/Chain"},"network":{"type":"string"},"rpcUrl":{"type":"string","format":"uri"},"wsUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"headers":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentChainRpcHeader"}},"commitment":{"anyOf":[{"type":"string","enum":["processed","confirmed","finalized"]},{"type":"null"}]},"skipPreflight":{"type":"boolean"},"maxRetries":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"EnvironmentPolicy":{"type":"object","required":["allowedChains","exportPolicy","signingPolicy","executionPolicy","walletPolicy","sessionPolicy","recoveryPolicy"],"properties":{"allowedChains":{"type":"array","items":{"$ref":"#/components/schemas/Chain"}},"exportPolicy":{"type":"object","required":["enabled","requireMfa"],"properties":{"enabled":{"type":"boolean"},"requireMfa":{"type":"boolean"}}},"signingPolicy":{"type":"object","required":["requireMfa","allowRawSigning","allowedKinds"],"properties":{"requireMfa":{"type":"boolean"},"allowRawSigning":{"type":"boolean"},"allowedKinds":{"type":"array","items":{"$ref":"#/components/schemas/SigningIntentKind"}}}},"executionPolicy":{"type":"object","required":["requireMfa","hostedExecution","maxTransactionValueUsd","sponsorship"],"properties":{"requireMfa":{"type":"boolean"},"hostedExecution":{"type":"boolean"},"maxTransactionValueUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"sponsorship":{"type":"object","required":["enabled","autoSponsorTransactions","sponsoredNetworks"],"properties":{"enabled":{"type":"boolean"},"autoSponsorTransactions":{"type":"boolean"},"sponsoredNetworks":{"type":"array","items":{"type":"string"}},"allowClientTransactions":{"type":"boolean"},"maxSpendPerUserUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxSpendPerDayUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowedContractAddresses":{"type":"array","items":{"type":"string"}}}}}},"walletPolicy":{"type":"object","required":["allowManagedAccounts","allowLinkedWallets","allowSplitCustody","defaultCustodyMode","autoCreateManagedAccounts","managedAccountChains"],"properties":{"allowManagedAccounts":{"type":"boolean"},"allowLinkedWallets":{"type":"boolean"},"allowSplitCustody":{"type":"boolean"},"defaultCustodyMode":{"$ref":"#/components/schemas/CustodyMode"},"autoCreateManagedAccounts":{"type":"boolean"},"managedAccountChains":{"type":"array","items":{"$ref":"#/components/schemas/Chain"}}}},"blockchainDataPolicy":{"type":"object","required":["enabled","primaryProvider","allowFallbackProviders","providers"],"properties":{"enabled":{"type":"boolean"},"primaryProvider":{"type":"string","enum":["solscope","helius","solscan","jupiter","custom"]},"allowFallbackProviders":{"type":"boolean"},"providers":{"type":"array","items":{"type":"object","required":["id","enabled","baseUrl","apiKeySecretRef","priority"],"properties":{"id":{"type":"string","enum":["solscope","helius","solscan","jupiter","custom"]},"enabled":{"type":"boolean"},"baseUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"apiKeySecretRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"integer","minimum":1}}}}}},"rpcProviderPolicy":{"type":"object","required":["enabled","primaryProvider","allowFallbackProviders","autoImportNetworks","controlPlaneUrl","dataPlaneUrl","projectId","projectSecretRef","providedNetworks"],"properties":{"enabled":{"type":"boolean"},"primaryProvider":{"type":"string","enum":["rpc-infra","alchemy","quicknode","helius","custom"]},"allowFallbackProviders":{"type":"boolean"},"autoImportNetworks":{"type":"boolean"},"controlPlaneUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"dataPlaneUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectSecretRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"providedNetworks":{"type":"array","items":{"type":"object","required":["key","label","chain","chainId","enabled","rpcUrl","wsUrl","priority"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"chain":{"$ref":"#/components/schemas/Chain"},"chainId":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"enabled":{"type":"boolean"},"rpcUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"wsUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"priority":{"type":"integer","minimum":1}}}}}},"sessionPolicy":{"type":"object","required":["allowDelegatedSessionKeys","requireMfa","defaultExpirySeconds","maxExpirySeconds","allowedSigningKinds","allowTransactionExecution","allowedNetworks","maxTransactionValueUsd"],"properties":{"allowDelegatedSessionKeys":{"type":"boolean"},"requireMfa":{"type":"boolean"},"defaultExpirySeconds":{"type":"integer"},"maxExpirySeconds":{"type":"integer"},"allowedSigningKinds":{"type":"array","items":{"$ref":"#/components/schemas/SigningIntentKind"}},"allowTransactionExecution":{"type":"boolean"},"allowedNetworks":{"type":"array","items":{"type":"string"}},"maxTransactionValueUsd":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"recoveryPolicy":{"type":"object","required":["allowEmailRecovery","allowPasskeyRecovery","allowSmsRecovery"],"properties":{"allowEmailRecovery":{"type":"boolean"},"allowPasskeyRecovery":{"type":"boolean"},"allowSmsRecovery":{"type":"boolean"}}}}},"AuthMethod":{"type":"object","required":["id","type","label","active","recoveryCapable"],"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/AuthMethodType"},"label":{"type":"string"},"active":{"type":"boolean"},"recoveryCapable":{"type":"boolean"}}},"ManagedAccount":{"type":"object","required":["id","environmentId","identityId","ownerId","chain","purpose","accountType","custodyMode","address","publicKey","label","metadata","createdAt"],"properties":{"id":{"type":"string"},"environmentId":{"type":"string"},"identityId":{"type":"string"},"ownerId":{"type":"string"},"chain":{"$ref":"#/components/schemas/Chain"},"purpose":{"$ref":"#/components/schemas/WalletPurpose"},"accountType":{"$ref":"#/components/schemas/ManagedAccountType"},"custodyMode":{"$ref":"#/components/schemas/CustodyMode"},"address":{"type":"string"},"publicKey":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"}}},"ManagedKeyShare":{"type":"object","required":["id","ownerId","identityId","kind","commitment","encryptedPayload","active","metadata","createdAt"],"properties":{"id":{"type":"string"},"ownerId":{"type":"string"},"identityId":{"type":"string"},"kind":{"$ref":"#/components/schemas/ManagedKeyShareKind"},"commitment":{"type":"string"},"encryptedPayload":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"}}},"SessionGrantScope":{"type":"object","required":["allowedSigningKinds","allowTransactionExecution","allowedNetworks","maxTransactionValueUsd","maxUses"],"properties":{"allowedSigningKinds":{"type":"array","items":{"$ref":"#/components/schemas/SigningIntentKind"}},"allowTransactionExecution":{"type":"boolean"},"allowedNetworks":{"type":"array","items":{"type":"string"}},"maxTransactionValueUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}}},"SessionGrant":{"type":"object","required":["id","environmentId","identityId","accountId","chain","curve","publicKey","label","scope","uses","expiresAt","lastUsedAt","revokedAt","metadata","createdAt"],"properties":{"id":{"type":"string"},"environmentId":{"type":"string"},"identityId":{"type":"string"},"accountId":{"type":"string"},"chain":{"$ref":"#/components/schemas/Chain"},"curve":{"$ref":"#/components/schemas/SessionKeyCurve"},"publicKey":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"$ref":"#/components/schemas/SessionGrantScope"},"uses":{"type":"integer","minimum":0},"expiresAt":{"type":"string","format":"date-time"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"}}},"LinkedWallet":{"type":"object","required":["id","environmentId","identityId","chain","address","connectorType","metadata","createdAt"],"properties":{"id":{"type":"string"},"environmentId":{"type":"string"},"identityId":{"type":"string"},"chain":{"$ref":"#/components/schemas/Chain"},"address":{"type":"string"},"connectorType":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"}}},"ExecutionResult":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["completed","failed"]},"signature":{"type":"string"},"signedPayload":{"type":"string"},"transactionHash":{"type":"string"},"error":{"type":"string"},"attestation":{"$ref":"#/components/schemas/SignerAttestation"},"metadata":{"type":"object","additionalProperties":true}}},"TypedDataField":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string"}}},"TypedData":{"type":"object","required":["types","message"],"properties":{"domain":{"type":"object","additionalProperties":true},"types":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/TypedDataField"}}},"primaryType":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"object","additionalProperties":true}}},"IntentPayload":{"type":"object","properties":{"network":{"anyOf":[{"type":"string"},{"type":"null"}]},"sponsorshipRequested":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"message":{"type":"string"},"messageHex":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"messageBase64":{"type":"string"},"digestHex":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"typedData":{"$ref":"#/components/schemas/TypedData"},"transaction":{"type":"object","additionalProperties":true},"serializedTransactionBase64":{"type":"string"},"requestedValueUsd":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"TransactionIntent":{"type":"object","required":["id","environmentId","identityId","accountId","chain","kind","status","requiresMfa","challengeId","payload","result","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"environmentId":{"type":"string"},"identityId":{"type":"string"},"accountId":{"type":"string"},"chain":{"$ref":"#/components/schemas/Chain"},"kind":{"$ref":"#/components/schemas/IntentKind"},"status":{"$ref":"#/components/schemas/IntentStatus"},"requiresMfa":{"type":"boolean"},"challengeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"$ref":"#/components/schemas/IntentPayload"},"result":{"anyOf":[{"$ref":"#/components/schemas/ExecutionResult"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Identity":{"type":"object","required":["id","projectId","externalUserId","username","email","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"externalUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email"},"createdAt":{"type":"string","format":"date-time"}}},"RuntimeSession":{"type":"object","required":["id","identityId","projectId","environmentId"],"properties":{"id":{"type":"string"},"identityId":{"type":"string"},"projectId":{"type":"string"},"environmentId":{"type":"string"}}},"Environment":{"type":"object","required":["id","projectId","appId","name","slug","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"appId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"EnvironmentCredential":{"type":"object","required":["id","environmentId","appId","label","publishableKeyPrefix","secretKeyPrefix","active","createdAt","lastUsedAt"],"properties":{"id":{"type":"string"},"environmentId":{"type":"string"},"appId":{"type":"string"},"label":{"type":"string"},"publishableKeyPrefix":{"type":"string"},"secretKeyPrefix":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"Project":{"type":"object","required":["id","organizationId","name","slug","createdAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"Organization":{"type":"object","required":["id","name","slug","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"OrganizationAdminRole":{"type":"string","enum":["owner","admin","developer","viewer"]},"OrganizationAdminCredential":{"type":"object","required":["id","organizationId","memberId","label","role","secretKeyPrefix","active","createdAt","lastUsedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"memberId":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"role":{"$ref":"#/components/schemas/OrganizationAdminRole"},"secretKeyPrefix":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"OrganizationInviteStatus":{"type":"string","enum":["pending","accepted","revoked","expired"]},"OrganizationMember":{"type":"object","required":["id","organizationId","email","name","role","active","invitedAt","acceptedAt","createdAt","revokedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"email":{"type":"string","format":"email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"$ref":"#/components/schemas/OrganizationAdminRole"},"active":{"type":"boolean"},"invitedAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"OrganizationInvite":{"type":"object","required":["id","organizationId","email","role","status","invitedByCredentialId","createdAt","expiresAt","acceptedAt","revokedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"$ref":"#/components/schemas/OrganizationAdminRole"},"status":{"$ref":"#/components/schemas/OrganizationInviteStatus"},"invitedByCredentialId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"OrganizationOverview":{"type":"object","required":["organization","projects"],"properties":{"organization":{"$ref":"#/components/schemas/Organization"},"projects":{"type":"array","items":{"type":"object","required":["project","environments"],"properties":{"project":{"$ref":"#/components/schemas/Project"},"environments":{"type":"array","items":{"$ref":"#/components/schemas/Environment"}}}}}}},"WebhookDescriptor":{"type":"object","required":["id","url"],"properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"}}},"WebhookSecretReveal":{"allOf":[{"$ref":"#/components/schemas/WebhookDescriptor"},{"type":"object","required":["secret"],"properties":{"secret":{"type":"string"}}}]},"AuditLog":{"type":"object","required":["id","environmentId","actorType","actorId","eventType","targetType","targetId","payload","createdAt"],"properties":{"id":{"type":"string"},"environmentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"type":"string"},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"eventType":{"type":"string"},"targetType":{"type":"string"},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{},"createdAt":{"type":"string","format":"date-time"}}},"EnvironmentIdentitySnapshot":{"type":"object","required":["identity","authMethods","managedAccounts","linkedWallets","sessionGrants","recentIntents"],"properties":{"identity":{"$ref":"#/components/schemas/Identity"},"authMethods":{"type":"array","items":{"$ref":"#/components/schemas/AuthMethod"}},"managedAccounts":{"type":"array","items":{"type":"object","required":["account","shares"],"properties":{"account":{"$ref":"#/components/schemas/ManagedAccount"},"shares":{"type":"array","items":{"$ref":"#/components/schemas/ManagedKeyShare"}}}}},"linkedWallets":{"type":"array","items":{"$ref":"#/components/schemas/LinkedWallet"}},"sessionGrants":{"type":"array","items":{"$ref":"#/components/schemas/SessionGrant"}},"recentIntents":{"type":"array","items":{"$ref":"#/components/schemas/TransactionIntent"}}}},"EnvironmentDashboard":{"type":"object","required":["environment","project","organization","policy","credentials","chains","webhooks","auditLogs","identities","recentIntents","stats"],"properties":{"environment":{"$ref":"#/components/schemas/Environment"},"project":{"$ref":"#/components/schemas/Project"},"organization":{"anyOf":[{"$ref":"#/components/schemas/Organization"},{"type":"null"}]},"policy":{"$ref":"#/components/schemas/EnvironmentPolicy"},"credentials":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentCredential"}},"chains":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentChainRpcConfig"}},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDescriptor"}},"auditLogs":{"type":"array","items":{"$ref":"#/components/schemas/AuditLog"}},"identities":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentIdentitySnapshot"}},"recentIntents":{"type":"array","items":{"$ref":"#/components/schemas/TransactionIntent"}},"stats":{"type":"object","required":["identities","managedAccounts","splitCustodyAccounts","sessionGrants","linkedWallets","intents","pendingIntents","webhooks"],"properties":{"identities":{"type":"integer","minimum":0},"managedAccounts":{"type":"integer","minimum":0},"splitCustodyAccounts":{"type":"integer","minimum":0},"sessionGrants":{"type":"integer","minimum":0},"linkedWallets":{"type":"integer","minimum":0},"intents":{"type":"integer","minimum":0},"pendingIntents":{"type":"integer","minimum":0},"webhooks":{"type":"integer","minimum":0}}}}},"HealthResponse":{"type":"object","required":["ok","service","readiness","inlineIntentProcessing","database","emailDelivery","chains","signer","signerOk","webauthn"],"properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"readiness":{"type":"object","required":["serving","launch"],"properties":{"serving":{"type":"boolean"},"launch":{"type":"boolean"}}},"inlineIntentProcessing":{"type":"boolean"},"database":{"type":"object","required":["ok","driver"],"properties":{"ok":{"type":"boolean"},"driver":{"type":"string","enum":["sqlite","postgres"]},"error":{"type":"string"}}},"emailDelivery":{"type":"object","required":["ok","mode"],"properties":{"ok":{"type":"boolean"},"mode":{"type":"string","enum":["log","smtp","http"]},"error":{"type":"string"}}},"chains":{"type":"array","items":{"$ref":"#/components/schemas/ChainCapabilities"}},"signer":{"anyOf":[{"$ref":"#/components/schemas/SecureSignerStatus"},{"type":"null"}]},"signerOk":{"type":"boolean"},"signerError":{"type":"string"},"webauthn":{"type":"object","required":["ok","rpId","allowedOrigins"],"properties":{"ok":{"type":"boolean"},"rpId":{"type":"string"},"allowedOrigins":{"type":"array","items":{"type":"string"}},"error":{"type":"string"}}}}},"CapabilitiesResponse":{"type":"object","required":["capabilities"],"properties":{"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/ChainCapabilities"}}}},"OrganizationCreateRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1}}},"ProjectCreateRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1}}},"EnvironmentCreateRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1}}},"EnvironmentApiKeyResponse":{"type":"object","required":["environment","credential","appId","publishableKey","secretKey","apiKey"],"properties":{"environment":{"$ref":"#/components/schemas/Environment"},"credential":{"$ref":"#/components/schemas/EnvironmentCredential"},"appId":{"type":"string"},"publishableKey":{"type":"string"},"secretKey":{"type":"string"},"apiKey":{"type":"string"}}},"OrganizationAdminCredentialCreateRequest":{"type":"object","properties":{"label":{"type":"string","minLength":1,"default":"Rotated admin key"},"role":{"allOf":[{"$ref":"#/components/schemas/OrganizationAdminRole"}],"default":"admin"}}},"OrganizationInviteCreateRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"role":{"allOf":[{"$ref":"#/components/schemas/OrganizationAdminRole"}],"default":"viewer"},"expiresInHours":{"type":"integer","minimum":1,"maximum":720}}},"OrganizationInviteAcceptRequest":{"type":"object","required":["token"],"properties":{"token":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}}},"OrganizationMemberUpdateRequest":{"type":"object","required":["role"],"properties":{"role":{"$ref":"#/components/schemas/OrganizationAdminRole"}}},"OrganizationAdminCredentialProvisionResponse":{"type":"object","required":["organization","credential","adminKey"],"properties":{"organization":{"$ref":"#/components/schemas/Organization"},"credential":{"$ref":"#/components/schemas/OrganizationAdminCredential"},"adminKey":{"type":"string"}}},"OrganizationAdminCredentialListResponse":{"type":"object","required":["organization","credentials"],"properties":{"organization":{"$ref":"#/components/schemas/Organization"},"credentials":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAdminCredential"}}}},"OrganizationInviteProvisionResponse":{"type":"object","required":["organization","invite","inviteToken"],"properties":{"organization":{"$ref":"#/components/schemas/Organization"},"invite":{"$ref":"#/components/schemas/OrganizationInvite"},"inviteToken":{"type":"string"}}},"OrganizationInviteListResponse":{"type":"object","required":["organization","invites"],"properties":{"organization":{"$ref":"#/components/schemas/Organization"},"invites":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInvite"}}}},"OrganizationInviteAcceptResponse":{"type":"object","required":["organization","invite","member","credential","adminKey"],"properties":{"organization":{"$ref":"#/components/schemas/Organization"},"invite":{"$ref":"#/components/schemas/OrganizationInvite"},"member":{"$ref":"#/components/schemas/OrganizationMember"},"credential":{"$ref":"#/components/schemas/OrganizationAdminCredential"},"adminKey":{"type":"string"}}},"OrganizationInviteRevokeResponse":{"type":"object","required":["organizationId","inviteId","revoked"],"properties":{"organizationId":{"type":"string"},"inviteId":{"type":"string"},"revoked":{"type":"boolean"}}},"OrganizationMemberListResponse":{"type":"object","required":["organization","members"],"properties":{"organization":{"$ref":"#/components/schemas/Organization"},"members":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMember"}}}},"OrganizationMemberRevokeResponse":{"type":"object","required":["organizationId","memberId","revoked"],"properties":{"organizationId":{"type":"string"},"memberId":{"type":"string"},"revoked":{"type":"boolean"}}},"OrganizationMemberUpdateResponse":{"type":"object","required":["organizationId","member","credentials"],"properties":{"organizationId":{"type":"string"},"member":{"$ref":"#/components/schemas/OrganizationMember"},"credentials":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAdminCredential"}}}},"OrganizationAdminCredentialRevokeResponse":{"type":"object","required":["organizationId","credentialId","revoked"],"properties":{"organizationId":{"type":"string"},"credentialId":{"type":"string"},"revoked":{"type":"boolean"}}},"CredentialCreateRequest":{"type":"object","properties":{"label":{"type":"string","minLength":1,"default":"Rotated key"}}},"CredentialRevokeResponse":{"type":"object","required":["environmentId","credentialId","revoked"],"properties":{"environmentId":{"type":"string"},"credentialId":{"type":"string"},"revoked":{"type":"boolean"}}},"OrganizationOverviewResponse":{"type":"object","required":["overview","capabilities"],"properties":{"overview":{"$ref":"#/components/schemas/OrganizationOverview"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/ChainCapabilities"}}}},"EnvironmentPolicyResponse":{"type":"object","required":["environmentId","policy"],"properties":{"environmentId":{"type":"string"},"policy":{"$ref":"#/components/schemas/EnvironmentPolicy"}}},"EnvironmentDashboardResponse":{"type":"object","required":["dashboard","capabilities","signer"],"properties":{"dashboard":{"$ref":"#/components/schemas/EnvironmentDashboard"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/ChainCapabilities"}},"signer":{"$ref":"#/components/schemas/SecureSignerStatus"}}},"EnvironmentChainRpcConfigRequest":{"type":"object","required":["rpcUrl"],"properties":{"network":{"type":"string","minLength":1,"maxLength":100},"rpcUrl":{"type":"string","format":"uri"},"wsUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"headers":{"type":"array","maxItems":32,"items":{"$ref":"#/components/schemas/EnvironmentChainRpcHeader"}},"commitment":{"anyOf":[{"type":"string","enum":["processed","confirmed","finalized"]},{"type":"null"}]},"skipPreflight":{"type":"boolean"},"maxRetries":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"enabled":{"type":"boolean"}}},"WebhookCreateRequest":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},"EmailRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"externalUserId":{"type":"string"}}},"EmailVerifyRequest":{"type":"object","required":["email","code"],"properties":{"email":{"type":"string","format":"email"},"code":{"type":"string","minLength":6,"maxLength":6},"externalUserId":{"type":"string"}}},"EmailRequestResponse":{"type":"object","required":["identity","codeDelivery"],"properties":{"identity":{"$ref":"#/components/schemas/Identity"},"codeDelivery":{"type":"string"}}},"EmailVerifyResponse":{"type":"object","required":["sessionToken","session","identity","authMethods","managedAccounts","linkedWallets","sessionGrants","environmentPolicy"],"properties":{"sessionToken":{"type":"string"},"session":{"$ref":"#/components/schemas/RuntimeSession"},"identity":{"$ref":"#/components/schemas/Identity"},"authMethods":{"type":"array","items":{"$ref":"#/components/schemas/AuthMethod"}},"managedAccounts":{"type":"array","items":{"$ref":"#/components/schemas/ManagedAccount"}},"linkedWallets":{"type":"array","items":{"$ref":"#/components/schemas/LinkedWallet"}},"sessionGrants":{"type":"array","items":{"$ref":"#/components/schemas/SessionGrant"}},"environmentPolicy":{"$ref":"#/components/schemas/EnvironmentPolicy"}}},"OidcEmailRequestResponse":{"type":"object","required":["ok","codeDelivery"],"properties":{"ok":{"type":"boolean"},"codeDelivery":{"type":"string"}}},"OidcWalletClaim":{"type":"object","required":["id","chain","address","publicKey","custodyMode"],"properties":{"id":{"type":"string"},"chain":{"$ref":"#/components/schemas/Chain"},"address":{"type":"string"},"publicKey":{"type":"string"},"custodyMode":{"$ref":"#/components/schemas/CustodyMode"}}},"OidcUserInfoResponse":{"type":"object","required":["sub"],"properties":{"sub":{"type":"string"},"email":{"type":"string","format":"email"},"email_verified":{"type":"boolean"},"name":{"type":"string"},"wallets":{"type":"array","items":{"$ref":"#/components/schemas/OidcWalletClaim"}}}},"OidcDiscoveryDocument":{"type":"object","required":["issuer","authorization_endpoint","token_endpoint","userinfo_endpoint","end_session_endpoint","jwks_uri","response_types_supported","response_modes_supported","grant_types_supported","subject_types_supported","id_token_signing_alg_values_supported","token_endpoint_auth_methods_supported","code_challenge_methods_supported","scopes_supported","claims_supported"],"properties":{"issuer":{"type":"string","format":"uri"},"authorization_endpoint":{"type":"string","format":"uri"},"token_endpoint":{"type":"string","format":"uri"},"userinfo_endpoint":{"type":"string","format":"uri"},"end_session_endpoint":{"type":"string","format":"uri"},"jwks_uri":{"type":"string","format":"uri"},"response_types_supported":{"type":"array","items":{"type":"string"}},"response_modes_supported":{"type":"array","items":{"type":"string"}},"grant_types_supported":{"type":"array","items":{"type":"string"}},"subject_types_supported":{"type":"array","items":{"type":"string"}},"id_token_signing_alg_values_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"claims_supported":{"type":"array","items":{"type":"string"}}}},"OidcJwks":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"object","required":["kty","crv","use","alg","kid","x"],"properties":{"kty":{"type":"string"},"crv":{"type":"string"},"use":{"type":"string"},"alg":{"type":"string"},"kid":{"type":"string"},"x":{"type":"string"}}}}}},"OidcLogoutResponse":{"type":"object","required":["ok","loggedOut"],"properties":{"ok":{"type":"boolean"},"loggedOut":{"type":"boolean"}}},"OidcClientTokenEndpointAuthMethod":{"type":"string","enum":["none","client_secret_post","client_secret_basic"]},"OidcClientApplicationType":{"type":"string","enum":["web","spa","native"]},"OidcClient":{"type":"object","required":["id","environmentId","name","clientId","redirectUris","scopes","grantTypes","tokenEndpointAuthMethod","applicationType","active","createdAt"],"properties":{"id":{"type":"string"},"environmentId":{"type":"string"},"name":{"type":"string"},"clientId":{"type":"string"},"redirectUris":{"type":"array","items":{"type":"string","format":"uri"}},"scopes":{"type":"array","items":{"type":"string"}},"grantTypes":{"type":"array","items":{"type":"string"}},"tokenEndpointAuthMethod":{"$ref":"#/components/schemas/OidcClientTokenEndpointAuthMethod"},"applicationType":{"$ref":"#/components/schemas/OidcClientApplicationType"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"OidcClientCreateRequest":{"type":"object","required":["name","redirectUris"],"properties":{"name":{"type":"string","minLength":1},"redirectUris":{"type":"array","items":{"type":"string","format":"uri"}},"scopes":{"type":"array","items":{"type":"string","enum":["openid","profile","email","wallets.read","wallets.execute"]}},"grantTypes":{"type":"array","items":{"type":"string","enum":["authorization_code","refresh_token"]}},"tokenEndpointAuthMethod":{"$ref":"#/components/schemas/OidcClientTokenEndpointAuthMethod"},"applicationType":{"$ref":"#/components/schemas/OidcClientApplicationType"}}},"OidcClientProvisionResponse":{"type":"object","required":["client","clientSecret"],"properties":{"client":{"$ref":"#/components/schemas/OidcClient"},"clientSecret":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"OidcClientListResponse":{"type":"object","required":["clients"],"properties":{"clients":{"type":"array","items":{"$ref":"#/components/schemas/OidcClient"}}}},"OidcClientRevokeResponse":{"type":"object","required":["environmentId","clientId","revoked"],"properties":{"environmentId":{"type":"string"},"clientId":{"type":"string"},"revoked":{"type":"boolean"}}},"OidcTokenRequest":{"type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"]},"code":{"type":"string","minLength":1},"redirect_uri":{"type":"string","format":"uri"},"refresh_token":{"type":"string","minLength":1},"client_id":{"type":"string","minLength":1},"client_secret":{"type":"string","minLength":1},"code_verifier":{"type":"string","minLength":1}}},"OidcTokenResponse":{"type":"object","required":["access_token","id_token","token_type","expires_in","scope"],"properties":{"access_token":{"type":"string"},"id_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"integer","minimum":1},"scope":{"type":"string"}}},"OidcAuthorizeConsentRequest":{"type":"object","required":["client_id","redirect_uri","scope","decision"],"properties":{"client_id":{"type":"string","minLength":1},"redirect_uri":{"type":"string","format":"uri"},"scope":{"type":"string","minLength":1},"state":{"type":"string"},"nonce":{"type":"string"},"code_challenge":{"type":"string"},"code_challenge_method":{"type":"string","enum":["S256"]},"decision":{"type":"string","enum":["approve","deny"]},"remember":{"type":"boolean"}}},"OidcAuthorizeConsentResponse":{"type":"object","required":["redirectTo"],"properties":{"redirectTo":{"type":"string","format":"uri"}}},"OidcExchangeRequest":{"type":"object","required":["token"],"properties":{"token":{"type":"string","minLength":1}}},"RuntimeConfigResponse":{"type":"object","required":["environment","deployment","auth","policy"],"properties":{"environment":{"type":"object","required":["id","projectId","appId","name"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"appId":{"type":"string"},"name":{"type":"string"}}},"deployment":{"type":"object","required":["tier","strictConfig","publicOrigin"],"properties":{"tier":{"type":"string","enum":["development","staging","production"]},"strictConfig":{"type":"boolean"},"publicOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}}},"auth":{"type":"object","required":["email","sms","passkeys"],"properties":{"email":{"type":"object","required":["enabled","codeDelivery","requestWindowSeconds","maxRequestsPerWindow","verifyWindowSeconds","maxVerifyAttemptsPerWindow"],"properties":{"enabled":{"type":"boolean"},"codeDelivery":{"type":"string"},"requestWindowSeconds":{"type":"integer","minimum":1},"maxRequestsPerWindow":{"type":"integer","minimum":1},"verifyWindowSeconds":{"type":"integer","minimum":1},"maxVerifyAttemptsPerWindow":{"type":"integer","minimum":1}}},"sms":{"type":"object","required":["enabled","codeDelivery"],"properties":{"enabled":{"type":"boolean"},"codeDelivery":{"type":"string"}}},"passkeys":{"type":"object","required":["rpName","rpId","allowedOrigins"],"properties":{"rpName":{"type":"string"},"rpId":{"type":"string"},"allowedOrigins":{"type":"array","items":{"type":"string","format":"uri"}}}}}},"policy":{"type":"object","required":["allowedChains","wallet","sessions","execution","recovery"],"properties":{"allowedChains":{"type":"array","items":{"$ref":"#/components/schemas/Chain"}},"wallet":{"type":"object","required":["defaultCustodyMode","allowSplitCustody","autoCreateManagedAccounts","managedAccountChains"],"properties":{"defaultCustodyMode":{"anyOf":[{"$ref":"#/components/schemas/CustodyMode"},{"type":"null"}]},"allowSplitCustody":{"type":"boolean"},"autoCreateManagedAccounts":{"type":"boolean"},"managedAccountChains":{"type":"array","items":{"$ref":"#/components/schemas/Chain"}}}},"sessions":{"type":"object","required":["requireMfa","allowDelegatedSessionKeys","allowedNetworks"],"properties":{"requireMfa":{"type":"boolean"},"allowDelegatedSessionKeys":{"type":"boolean"},"allowedNetworks":{"type":"array","items":{"type":"string"}}}},"execution":{"type":"object","required":["requireMfa","sponsorshipEnabled"],"properties":{"requireMfa":{"type":"boolean"},"sponsorshipEnabled":{"type":"boolean"}}},"recovery":{"type":"object","required":["allowEmailRecovery","allowPasskeyRecovery","allowSmsRecovery"],"properties":{"allowEmailRecovery":{"type":"boolean"},"allowPasskeyRecovery":{"type":"boolean"},"allowSmsRecovery":{"type":"boolean"}}}}}}},"RuntimeMeResponse":{"type":"object","required":["session","identity","environment","authMethods","managedAccounts","linkedWallets","sessionGrants","environmentPolicy"],"properties":{"session":{"$ref":"#/components/schemas/RuntimeSession"},"identity":{"$ref":"#/components/schemas/Identity"},"environment":{"$ref":"#/components/schemas/Environment"},"authMethods":{"type":"array","items":{"$ref":"#/components/schemas/AuthMethod"}},"managedAccounts":{"type":"array","items":{"$ref":"#/components/schemas/ManagedAccount"}},"linkedWallets":{"type":"array","items":{"$ref":"#/components/schemas/LinkedWallet"}},"sessionGrants":{"type":"array","items":{"$ref":"#/components/schemas/SessionGrant"}},"environmentPolicy":{"$ref":"#/components/schemas/EnvironmentPolicy"}}},"UsernameClaimRequest":{"type":"object","required":["username"],"properties":{"username":{"type":"string","minLength":3,"maxLength":32}}},"UsernameClaimResponse":{"type":"object","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/Identity"}}},"PublicIdentityProfile":{"type":"object","required":["username","managedAccounts","linkedWallets"],"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"managedAccounts":{"type":"array","items":{"type":"object","required":["chain","address","purpose","custodyMode"],"properties":{"chain":{"$ref":"#/components/schemas/Chain"},"address":{"type":"string"},"purpose":{"type":"string"},"custodyMode":{"type":"string"}}}},"linkedWallets":{"type":"array","items":{"type":"object","required":["chain","address","connectorType"],"properties":{"chain":{"$ref":"#/components/schemas/Chain"},"address":{"type":"string"},"connectorType":{"type":"string"}}}}}},"IdentityLookupResponse":{"type":"object","required":["profile"],"properties":{"profile":{"$ref":"#/components/schemas/PublicIdentityProfile"}}},"TotpStartRequest":{"type":"object","properties":{"label":{"type":"string","minLength":1,"default":"Authenticator app"}}},"TotpStartResponse":{"type":"object","required":["method","secret","otpauthUrl"],"properties":{"method":{"$ref":"#/components/schemas/AuthMethod"},"secret":{"type":"string"},"otpauthUrl":{"type":"string"}}},"TotpVerifyRequest":{"type":"object","required":["authMethodId","code"],"properties":{"authMethodId":{"type":"string","minLength":1},"code":{"type":"string","minLength":6,"maxLength":6}}},"OkResponse":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}},"PasskeyRegistrationStartRequest":{"type":"object","properties":{"label":{"type":"string","minLength":1,"default":"Passkey"}}},"PasskeyRegistrationStartResponse":{"type":"object","required":["authMethod","challengeId","methodType","options","expiresAt"],"properties":{"authMethod":{"$ref":"#/components/schemas/AuthMethod"},"challengeId":{"type":"string"},"methodType":{"type":"string","enum":["passkey"]},"options":{"type":"object","additionalProperties":true},"expiresAt":{"type":"string","format":"date-time"}}},"PasskeyRegistrationFinishRequest":{"type":"object","required":["authMethodId","challengeId","registrationResponse"],"properties":{"authMethodId":{"type":"string","minLength":1},"challengeId":{"type":"string","minLength":1},"registrationResponse":{"type":"object","additionalProperties":true}}},"PasskeyRegistrationFinishResponse":{"type":"object","required":["ok","authMethod"],"properties":{"ok":{"type":"boolean"},"authMethod":{"$ref":"#/components/schemas/AuthMethod"}}},"PasskeyImportRequest":{"type":"object","required":["label","credentialId","publicKeyPem"],"properties":{"label":{"type":"string","minLength":1,"default":"Passkey"},"credentialId":{"type":"string","minLength":1},"publicKeyPem":{"type":"string"}}},"AuthMethodResponse":{"type":"object","required":["authMethod"],"properties":{"authMethod":{"$ref":"#/components/schemas/AuthMethod"}}},"SmsStartRequest":{"type":"object","required":["phoneNumber"],"properties":{"label":{"type":"string","minLength":1,"default":"SMS"},"phoneNumber":{"type":"string","pattern":"^\\+[1-9]\\d{7,14}$"}}},"SmsStartResponse":{"type":"object","required":["authMethod","challengeId","methodType","phoneNumber","delivery","expiresAt"],"properties":{"authMethod":{"$ref":"#/components/schemas/AuthMethod"},"challengeId":{"type":"string"},"methodType":{"type":"string","enum":["sms"]},"phoneNumber":{"type":"string"},"delivery":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}},"SmsVerifyRequest":{"type":"object","required":["authMethodId","challengeId","code"],"properties":{"authMethodId":{"type":"string","minLength":1},"challengeId":{"type":"string","minLength":1},"code":{"type":"string","minLength":6,"maxLength":6}}},"ChallengePurpose":{"type":"string","enum":["account_export","intent_approval","recovery","session_delegation","wallet_reconstruction"]},"ChallengeCreateRequest":{"type":"object","required":["authMethodId","purpose"],"properties":{"authMethodId":{"type":"string","minLength":1},"purpose":{"$ref":"#/components/schemas/ChallengePurpose"}}},"ChallengeCreateResponse":{"type":"object","required":["challengeId","purpose","expiresAt","methodType"],"properties":{"challengeId":{"type":"string"},"purpose":{"$ref":"#/components/schemas/ChallengePurpose"},"expiresAt":{"type":"string","format":"date-time"},"methodType":{"$ref":"#/components/schemas/AuthMethodType"},"nonce":{"type":"string"},"options":{"type":"object","additionalProperties":true},"delivery":{"type":"string"}}},"ChallengeVerifyRequest":{"type":"object","required":["challengeId"],"properties":{"challengeId":{"type":"string","minLength":1},"code":{"type":"string"},"signatureBase64":{"type":"string"},"authenticationResponse":{"type":"object","additionalProperties":true}}},"ManagedKeyShareRegistration":{"type":"object","required":["commitment"],"properties":{"commitment":{"type":"string","minLength":1},"encryptedPayload":{"type":"string"},"metadata":{"type":"object","additionalProperties":true}}},"BrowserManagedAccountProvisioning":{"type":"object","required":["publicKey","address","serverShare","deviceShare"],"properties":{"publicKey":{"type":"string","minLength":1},"address":{"type":"string","minLength":1},"accountType":{"$ref":"#/components/schemas/ManagedAccountType"},"serverShare":{"type":"object","required":["commitment","encryptedPayload"],"properties":{"commitment":{"type":"string","minLength":1},"encryptedPayload":{"type":"string","minLength":1},"metadata":{"type":"object","additionalProperties":true}}},"deviceShare":{"type":"object","required":["commitment"],"properties":{"commitment":{"type":"string","minLength":1},"metadata":{"type":"object","additionalProperties":true}}},"recoveryShare":{"type":"object","required":["commitment"],"properties":{"commitment":{"type":"string","minLength":1},"metadata":{"type":"object","additionalProperties":true}}}}},"ManagedAccountCreateRequest":{"type":"object","required":["chain"],"properties":{"chain":{"$ref":"#/components/schemas/Chain"},"purpose":{"$ref":"#/components/schemas/WalletPurpose"},"label":{"type":"string"},"custodyMode":{"$ref":"#/components/schemas/CustodyMode"},"splitCustody":{"type":"object","required":["deviceShare"],"properties":{"deviceShare":{"$ref":"#/components/schemas/ManagedKeyShareRegistration"},"recoveryShare":{"$ref":"#/components/schemas/ManagedKeyShareRegistration"}}},"browserProvisioning":{"$ref":"#/components/schemas/BrowserManagedAccountProvisioning"}}},"ManagedAccountCreateResponse":{"type":"object","required":["account","attestation","existing"],"properties":{"account":{"$ref":"#/components/schemas/ManagedAccount"},"attestation":{},"existing":{"type":"boolean"}}},"ListAccountsResponse":{"type":"object","required":["managedAccounts","linkedWallets"],"properties":{"managedAccounts":{"type":"array","items":{"$ref":"#/components/schemas/ManagedAccount"}},"linkedWallets":{"type":"array","items":{"$ref":"#/components/schemas/LinkedWallet"}}}},"AccountCustodyResponse":{"type":"object","required":["account","shares"],"properties":{"account":{"$ref":"#/components/schemas/ManagedAccount"},"shares":{"type":"array","items":{"$ref":"#/components/schemas/ManagedKeyShare"}}}},"ServerShareResponse":{"type":"object","required":["account","serverShare"],"properties":{"account":{"$ref":"#/components/schemas/ManagedAccount"},"serverShare":{"$ref":"#/components/schemas/ManagedKeyShare"}}},"ServerShareAccessRequest":{"type":"object","required":["challengeId"],"properties":{"challengeId":{"type":"string","minLength":1}}},"LocalSigningAuditRequest":{"type":"object","required":["chain","signingKind"],"properties":{"chain":{"$ref":"#/components/schemas/Chain"},"signingKind":{"type":"string","enum":["message","typed_data","transaction"]},"challengeId":{"type":"string","minLength":1},"signerAddress":{"type":"string","minLength":1},"signerPublicKey":{"type":"string","minLength":1},"signedPayloadPresent":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":true}}},"LocalSigningAuditResponse":{"type":"object","required":["ok","eventType"],"properties":{"ok":{"type":"boolean"},"eventType":{"type":"string"}}},"EnableSplitCustodyRequest":{"type":"object","required":["deviceShare"],"properties":{"deviceShare":{"$ref":"#/components/schemas/ManagedKeyShareRegistration"},"recoveryShare":{"$ref":"#/components/schemas/ManagedKeyShareRegistration"}}},"SessionGrantCreateRequest":{"type":"object","required":["accountId","publicKey"],"properties":{"accountId":{"type":"string","minLength":1},"label":{"type":"string"},"challengeId":{"type":"string"},"publicKey":{"type":"string"},"expiresInSeconds":{"type":"integer","minimum":1},"scope":{"type":"object","properties":{"allowedSigningKinds":{"type":"array","items":{"$ref":"#/components/schemas/SigningIntentKind"}},"allowTransactionExecution":{"type":"boolean"},"allowedNetworks":{"type":"array","items":{"type":"string"}},"maxTransactionValueUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}}}}},"SessionGrantResponse":{"type":"object","required":["sessionGrant"],"properties":{"sessionGrant":{"$ref":"#/components/schemas/SessionGrant"}}},"SessionGrantsListResponse":{"type":"object","required":["sessionGrants"],"properties":{"sessionGrants":{"type":"array","items":{"$ref":"#/components/schemas/SessionGrant"}}}},"SessionGrantAuthorization":{"type":"object","required":["nonce","expiresAt","signatureBase64"],"properties":{"nonce":{"type":"string","minLength":16,"maxLength":200},"expiresAt":{"type":"string","format":"date-time"},"signatureBase64":{"type":"string","minLength":1}}},"SessionIntentRequest":{"type":"object","required":["payload","authorization"],"properties":{"payload":{"$ref":"#/components/schemas/IntentPayload"},"authorization":{"$ref":"#/components/schemas/SessionGrantAuthorization"}}},"LinkedWalletCreateRequest":{"type":"object","required":["chain","address","connectorType"],"properties":{"chain":{"$ref":"#/components/schemas/Chain"},"address":{"type":"string","minLength":1},"connectorType":{"type":"string","minLength":1},"metadata":{"type":"object","additionalProperties":true}}},"LinkedWalletResponse":{"type":"object","required":["linkedWallet"],"properties":{"linkedWallet":{"$ref":"#/components/schemas/LinkedWallet"}}},"IntentRequest":{"type":"object","required":["accountId","chain","payload"],"properties":{"accountId":{"type":"string","minLength":1},"chain":{"$ref":"#/components/schemas/Chain"},"challengeId":{"type":"string"},"payload":{"$ref":"#/components/schemas/IntentPayload"}}},"TransactionIntentResponse":{"type":"object","required":["intent"],"properties":{"intent":{"$ref":"#/components/schemas/TransactionIntent"}}},"ExportRequest":{"type":"object","required":["challengeId"],"properties":{"challengeId":{"type":"string","minLength":1}}},"ExportedAccountResponse":{"type":"object","required":["accountId","chain","privateKey","attestation"],"properties":{"accountId":{"type":"string"},"chain":{"$ref":"#/components/schemas/Chain"},"privateKey":{"type":"string"},"attestation":{}}},"RawSignRequest":{"type":"object","required":["challengeId","payload"],"properties":{"challengeId":{"type":"string","minLength":1},"payload":{"$ref":"#/components/schemas/IntentPayload"}}},"RawSignResponse":{"type":"object","required":["result"],"properties":{"result":{"$ref":"#/components/schemas/ExecutionResult"}}}}},"paths":{"/openapi.json":{"get":{"tags":["system"],"summary":"Fetch the OpenAPI document","operationId":"getOpenApiDocument","responses":{"200":{"description":"OpenAPI document","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/health":{"get":{"tags":["system"],"summary":"Get deployment health summary","operationId":"getHealth","responses":{"200":{"description":"Service health","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/ready":{"get":{"tags":["system"],"summary":"Get serving readiness status","operationId":"getReadiness","responses":{"200":{"description":"Service is ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"Service dependencies are not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/deployment/readiness":{"get":{"tags":["system"],"summary":"Get launch readiness status","operationId":"getDeploymentReadiness","responses":{"200":{"description":"Deployment is launch ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"Deployment launch checks are not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/control/chains/capabilities":{"get":{"tags":["system"],"summary":"List chain capabilities","operationId":"listControlChainCapabilities","responses":{"200":{"description":"Capabilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapabilitiesResponse"}}}}}}},"/v1/control/infrastructure/signer":{"get":{"tags":["system"],"summary":"Get signer infrastructure status","operationId":"getSignerInfrastructureStatus","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"responses":{"200":{"description":"Signer status","content":{"application/json":{"schema":{"type":"object","required":["signer"],"properties":{"signer":{"$ref":"#/components/schemas/SecureSignerStatus"}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organizations":{"post":{"tags":["control"],"summary":"Create an organization","operationId":"createOrganization","security":[{"AdminToken":[]}],"requestBody":{"required":true,"description":"Organization payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreateRequest"}}}},"responses":{"200":{"description":"Created organization and issued its initial owner credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationAdminCredentialProvisionResponse"}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organizations/{organizationId}/projects":{"post":{"tags":["control"],"summary":"Create a project","operationId":"createProject","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Project payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreateRequest"}}}},"responses":{"200":{"description":"Created project","content":{"application/json":{"schema":{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/Project"}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/projects/{projectId}":{"patch":{"tags":["control"],"summary":"Rename a project","operationId":"updateProject","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"Project identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Project payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreateRequest"}}}},"responses":{"200":{"description":"Updated project","content":{"application/json":{"schema":{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/Project"}}}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Project slug already exists in this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/projects/{projectId}/environments":{"post":{"tags":["control"],"summary":"Create an environment and issue its first credential pair","operationId":"createEnvironment","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"Project identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Environment payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Created environment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentApiKeyResponse"}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}":{"patch":{"tags":["control"],"summary":"Rename an environment","operationId":"updateEnvironment","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Environment payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Updated environment","content":{"application/json":{"schema":{"type":"object","required":["environment"],"properties":{"environment":{"$ref":"#/components/schemas/Environment"}}}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Environment slug already exists in this project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/credentials":{"get":{"tags":["control"],"summary":"List environment credentials","operationId":"listEnvironmentCredentials","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Credential list","content":{"application/json":{"schema":{"type":"object","required":["credentials"],"properties":{"credentials":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentCredential"}}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["control"],"summary":"Rotate or create a new environment credential pair","operationId":"createEnvironmentCredential","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"description":"Credential creation payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialCreateRequest"}}}},"responses":{"200":{"description":"Created environment credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentApiKeyResponse"}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/credentials/{credentialId}":{"delete":{"tags":["control"],"summary":"Revoke an environment credential pair","operationId":"revokeEnvironmentCredential","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}},{"name":"credentialId","in":"path","required":true,"description":"Credential identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Credential revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialRevokeResponse"}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Credential not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organizations/{organizationId}/overview":{"get":{"tags":["control"],"summary":"Get organization overview","operationId":"getOrganizationOverview","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Organization overview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOverviewResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organizations/{organizationId}/admin-credentials":{"get":{"tags":["control"],"summary":"List organization admin credentials","operationId":"listOrganizationAdminCredentials","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Organization admin credential list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationAdminCredentialListResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Credential is outside this organization or lacks read access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["control"],"summary":"Create an organization admin credential","operationId":"createOrganizationAdminCredential","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"description":"Organization admin credential payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationAdminCredentialCreateRequest"}}}},"responses":{"200":{"description":"Created organization admin credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationAdminCredentialProvisionResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Credential lacks owner access for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organizations/{organizationId}/members":{"get":{"tags":["control"],"summary":"List organization members","operationId":"listOrganizationMembers","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Organization member list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberListResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Credential is outside this organization or lacks read access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organizations/{organizationId}/members/{memberId}":{"patch":{"tags":["control"],"summary":"Update an organization member role and sync their active admin credentials","operationId":"updateOrganizationMemberRole","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}},{"name":"memberId","in":"path","required":true,"description":"Organization member identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Organization member role payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberUpdateRequest"}}}},"responses":{"200":{"description":"Organization member updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberUpdateResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Credential lacks owner access for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization or member not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update would remove the last active owner credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["control"],"summary":"Revoke an organization member and deactivate their admin credentials","operationId":"revokeOrganizationMember","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}},{"name":"memberId","in":"path","required":true,"description":"Organization member identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Organization member revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberRevokeResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Credential lacks owner access for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization or member not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Revocation would remove the last active owner credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organizations/{organizationId}/invites":{"get":{"tags":["control"],"summary":"List organization invites","operationId":"listOrganizationInvites","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Organization invite list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInviteListResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Credential is outside this organization or lacks read access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["control"],"summary":"Create an organization invite","operationId":"createOrganizationInvite","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Organization invite payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInviteCreateRequest"}}}},"responses":{"200":{"description":"Created organization invite","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInviteProvisionResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Credential lacks owner access for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organizations/{organizationId}/invites/{inviteId}":{"delete":{"tags":["control"],"summary":"Revoke an organization invite","operationId":"revokeOrganizationInvite","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}},{"name":"inviteId","in":"path","required":true,"description":"Organization invite identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Organization invite revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInviteRevokeResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Credential lacks owner access for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization or invite not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organizations/{organizationId}/admin-credentials/{credentialId}":{"delete":{"tags":["control"],"summary":"Revoke an organization admin credential","operationId":"revokeOrganizationAdminCredential","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"organizationId","in":"path","required":true,"description":"Organization identifier","schema":{"type":"string","minLength":1}},{"name":"credentialId","in":"path","required":true,"description":"Organization admin credential identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Organization admin credential revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationAdminCredentialRevokeResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Credential lacks owner access for this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Organization or credential not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Revocation would remove the last active owner credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/organization-invites/{inviteId}/accept":{"post":{"tags":["control"],"summary":"Accept an organization invite and mint an org-scoped admin credential","operationId":"acceptOrganizationInvite","parameters":[{"name":"inviteId","in":"path","required":true,"description":"Organization invite identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Organization invite acceptance payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInviteAcceptRequest"}}}},"responses":{"200":{"description":"Accepted organization invite","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInviteAcceptResponse"}}}},"404":{"description":"Invite not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Invite expired, already used, or member already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/policy":{"put":{"tags":["control"],"summary":"Replace environment policy","operationId":"updateEnvironmentPolicy","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Environment policy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentPolicy"}}}},"responses":{"200":{"description":"Updated environment policy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentPolicyResponse"}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/dashboard":{"get":{"tags":["control"],"summary":"Get environment dashboard snapshot","operationId":"getEnvironmentDashboard","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Environment dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentDashboardResponse"}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/chains":{"get":{"tags":["control"],"summary":"List environment RPC targets","operationId":"listEnvironmentChainRpcConfigs","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Environment RPC targets","content":{"application/json":{"schema":{"type":"object","required":["chains"],"properties":{"chains":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentChainRpcConfig"}}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/chains/{chain}":{"put":{"tags":["control"],"summary":"Create or update an environment RPC target","operationId":"upsertEnvironmentChainRpcConfig","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}},{"name":"chain","in":"path","required":true,"description":"Chain family","schema":{"$ref":"#/components/schemas/Chain"}}],"requestBody":{"required":true,"description":"Chain RPC target configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentChainRpcConfigRequest"}}}},"responses":{"200":{"description":"Updated environment RPC target","content":{"application/json":{"schema":{"type":"object","required":["chain"],"properties":{"chain":{"$ref":"#/components/schemas/EnvironmentChainRpcConfig"}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/webhooks":{"post":{"tags":["control"],"summary":"Create a webhook endpoint","operationId":"createWebhook","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Webhook target","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}}}},"responses":{"200":{"description":"Created webhook","content":{"application/json":{"schema":{"type":"object","required":["webhook"],"properties":{"webhook":{"$ref":"#/components/schemas/WebhookSecretReveal"}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["control"],"summary":"List webhooks","operationId":"listWebhooks","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Webhook list","content":{"application/json":{"schema":{"type":"object","required":["webhooks"],"properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDescriptor"}}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/webhooks/{webhookId}/rotate-secret":{"post":{"tags":["control"],"summary":"Rotate a webhook signing secret","operationId":"rotateWebhookSecret","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}},{"name":"webhookId","in":"path","required":true,"description":"Webhook identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Rotated webhook secret","content":{"application/json":{"schema":{"type":"object","required":["webhook"],"properties":{"webhook":{"$ref":"#/components/schemas/WebhookSecretReveal"}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/webhooks/{webhookId}":{"delete":{"tags":["control"],"summary":"Revoke a webhook endpoint","operationId":"revokeWebhook","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}},{"name":"webhookId","in":"path","required":true,"description":"Webhook identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Revoked webhook","content":{"application/json":{"schema":{"type":"object","required":["environmentId","webhookId","revoked"],"properties":{"environmentId":{"type":"string"},"webhookId":{"type":"string"},"revoked":{"type":"boolean"}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/audit":{"get":{"tags":["control"],"summary":"List environment audit logs","operationId":"listAuditLogs","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Audit logs","content":{"application/json":{"schema":{"type":"object","required":["logs"],"properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/AuditLog"}}}}}}},"401":{"description":"Invalid or missing admin token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/oidc-clients":{"get":{"tags":["control"],"summary":"List OIDC clients for an environment","operationId":"listOidcClients","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OIDC client list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcClientListResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["control"],"summary":"Create an OIDC client for Sign in with Swop","operationId":"createOidcClient","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"OIDC client payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcClientCreateRequest"}}}},"responses":{"200":{"description":"Created OIDC client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcClientProvisionResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/control/environments/{environmentId}/oidc-clients/{clientId}":{"delete":{"tags":["control"],"summary":"Revoke an OIDC client","operationId":"revokeOidcClient","security":[{"SwivyAdminKey":[]},{"AdminToken":[]}],"parameters":[{"name":"environmentId","in":"path","required":true,"description":"Environment identifier","schema":{"type":"string","minLength":1}},{"name":"clientId","in":"path","required":true,"description":"OIDC client identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OIDC client revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcClientRevokeResponse"}}}},"401":{"description":"Invalid or missing control-plane credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Environment or OIDC client not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oidc/{appId}/.well-known/openid-configuration":{"get":{"tags":["oidc"],"summary":"Fetch the OIDC discovery document","operationId":"getOidcDiscoveryDocument","parameters":[{"name":"appId","in":"path","required":true,"description":"Environment app identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OIDC discovery document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcDiscoveryDocument"}}}},"404":{"description":"Issuer environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oidc/{appId}/jwks":{"get":{"tags":["oidc"],"summary":"Fetch the issuer JWKS","operationId":"getOidcJwks","parameters":[{"name":"appId","in":"path","required":true,"description":"Environment app identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OIDC JWKS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcJwks"}}}},"404":{"description":"Issuer environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oidc/{appId}/login/email/request":{"post":{"tags":["oidc"],"summary":"Request an email code for the hosted OIDC login flow","operationId":"requestOidcEmailCode","parameters":[{"name":"appId","in":"path","required":true,"description":"Environment app identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Email login payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}}},"responses":{"200":{"description":"Email code issued for OIDC login","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcEmailRequestResponse"}}}},"404":{"description":"Issuer environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Verification email delivery failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oidc/{appId}/login/email/verify":{"post":{"tags":["oidc"],"summary":"Verify an email code and establish the hosted OIDC session","operationId":"verifyOidcEmailCode","parameters":[{"name":"appId","in":"path","required":true,"description":"Environment app identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Email verification payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyRequest"}}}},"responses":{"200":{"description":"Runtime session and hosted OIDC session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyResponse"}}}},"401":{"description":"Invalid email code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oidc/{appId}/authorize/consent":{"post":{"tags":["oidc"],"summary":"Approve or deny the hosted OIDC consent prompt","description":"Used by the hosted Swivy authorize UI to record a consent decision and continue the authorization code flow.","operationId":"submitOidcConsentDecision","parameters":[{"name":"appId","in":"path","required":true,"description":"Environment app identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Hosted consent decision payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcAuthorizeConsentRequest"}}}},"responses":{"200":{"description":"Consent decision redirect target","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcAuthorizeConsentResponse"}}}},"400":{"description":"Invalid consent request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oidc/{appId}/logout":{"get":{"tags":["oidc"],"summary":"End the hosted OIDC session","description":"Clears the hosted Swivy OIDC session cookie and revokes the matching runtime session when one is present. Supports a post-logout redirect to a registered client redirect URI.","operationId":"logoutOidcSession","parameters":[{"name":"appId","in":"path","required":true,"description":"Environment app identifier","schema":{"type":"string","minLength":1}},{"name":"client_id","in":"query","required":false,"description":"OIDC client identifier","schema":{"type":"string","minLength":1}},{"name":"post_logout_redirect_uri","in":"query","required":false,"description":"Registered redirect URI to return the browser to after logout","schema":{"type":"string","format":"uri"}},{"name":"state","in":"query","required":false,"description":"Opaque client state value echoed to the post-logout redirect","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Hosted logout result or confirmation page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcLogoutResponse"}},"text/html":{"schema":{"type":"string"}}}},"302":{"description":"Redirect to the validated post-logout callback URL","headers":{"location":{"description":"Client logout callback URL","schema":{"type":"string","format":"uri"}}}},"400":{"description":"Invalid logout request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oidc/{appId}/authorize":{"get":{"tags":["oidc"],"summary":"Run the OIDC authorization code flow","description":"If a matching Swivy runtime session is not already present, this route can render the hosted email login page or return login_required. If login exists but consent is still required, it can render the hosted consent page or return consent_required.","operationId":"authorizeOidcClient","parameters":[{"name":"appId","in":"path","required":true,"description":"Environment app identifier","schema":{"type":"string","minLength":1}},{"name":"response_type","in":"query","required":true,"description":"OIDC response type","schema":{"type":"string","enum":["code"]}},{"name":"client_id","in":"query","required":true,"description":"OIDC client identifier","schema":{"type":"string","minLength":1}},{"name":"redirect_uri","in":"query","required":true,"description":"Registered redirect URI","schema":{"type":"string","format":"uri"}},{"name":"scope","in":"query","required":true,"description":"Space-delimited scopes","schema":{"type":"string","minLength":1}},{"name":"state","in":"query","required":false,"description":"Opaque client state value","schema":{"type":"string","minLength":1}},{"name":"nonce","in":"query","required":false,"description":"Nonce echoed into the ID token","schema":{"type":"string","minLength":1}},{"name":"code_challenge","in":"query","required":false,"description":"PKCE code challenge","schema":{"type":"string","minLength":1}},{"name":"code_challenge_method","in":"query","required":false,"description":"PKCE code challenge method","schema":{"type":"string","enum":["S256"]}},{"name":"prompt","in":"query","required":false,"description":"OIDC prompt behavior","schema":{"type":"string","minLength":1}},{"name":"login_hint","in":"query","required":false,"description":"Prefilled email address for the hosted login screen","schema":{"type":"string","minLength":1}},{"name":"screen_hint","in":"query","required":false,"description":"Choose whether the hosted page defaults to login or signup copy","schema":{"type":"string","enum":["login","signup"]}}],"responses":{"200":{"description":"Hosted OIDC login page","content":{"text/html":{"schema":{"type":"string"}}}},"302":{"description":"Redirect to the client callback with an authorization code or error","headers":{"location":{"description":"Client callback URL","schema":{"type":"string","format":"uri"}}}},"400":{"description":"Invalid authorize request or client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Consent required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oidc/{appId}/token":{"post":{"tags":["oidc"],"summary":"Exchange an authorization code for OIDC tokens","description":"Supports authorization_code and refresh_token grants plus public PKCE clients, client_secret_post, and client_secret_basic authentication.","operationId":"exchangeOidcAuthorizationCode","parameters":[{"name":"appId","in":"path","required":true,"description":"Environment app identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"OIDC token exchange payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcTokenRequest"}}}},"responses":{"200":{"description":"OIDC token response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcTokenResponse"}}}},"400":{"description":"Invalid grant or token request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oidc/{appId}/userinfo":{"get":{"tags":["oidc"],"summary":"Fetch OIDC userinfo claims","operationId":"getOidcUserInfo","security":[{"OidcAccessToken":[]}],"parameters":[{"name":"appId","in":"path","required":true,"description":"Environment app identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OIDC userinfo response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcUserInfoResponse"}}}},"401":{"description":"Invalid or missing OIDC access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Issuer environment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/chains/capabilities":{"get":{"tags":["system"],"summary":"List runtime chain capabilities","operationId":"listRuntimeChainCapabilities","responses":{"200":{"description":"Capabilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapabilitiesResponse"}}}}}}},"/v1/runtime/auth/email/request":{"post":{"tags":["runtime-auth"],"summary":"Request an email login code","operationId":"requestEmailCode","security":[{"SwivyAppId":[],"SwivyPublishableKey":[]},{"SwivyAppId":[],"SwivySecretKey":[]}],"requestBody":{"required":true,"description":"Email login payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}}},"responses":{"200":{"description":"Login code issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequestResponse"}}}},"401":{"description":"Missing or invalid environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Email delivery failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/auth/email/verify":{"post":{"tags":["runtime-auth"],"summary":"Verify an email login code and create a runtime session","operationId":"verifyEmailCode","security":[{"SwivyAppId":[],"SwivyPublishableKey":[]},{"SwivyAppId":[],"SwivySecretKey":[]}],"requestBody":{"required":true,"description":"Email verification payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyRequest"}}}},"responses":{"200":{"description":"Runtime session and profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyResponse"}}}},"401":{"description":"Invalid email code or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/auth/oidc/exchange":{"post":{"tags":["runtime-auth"],"summary":"Exchange a Swivy OIDC token for a runtime session in another environment","description":"Use this when another app signs the user in with Swop and then needs a normal Swivy runtime session plus managed wallets in its own environment.","operationId":"exchangeOidcTokenForRuntimeSession","security":[{"SwivyAppId":[],"SwivyPublishableKey":[]},{"SwivyAppId":[],"SwivySecretKey":[]}],"requestBody":{"required":true,"description":"OIDC token exchange payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcExchangeRequest"}}}},"responses":{"200":{"description":"Runtime session and profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyResponse"}}}},"401":{"description":"Invalid OIDC token or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"OIDC token is outside the current project boundary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/config":{"get":{"tags":["runtime-auth"],"summary":"Get public runtime auth and signup configuration for the current environment","operationId":"getRuntimeConfig","security":[{"SwivyAppId":[],"SwivyPublishableKey":[]},{"SwivyAppId":[],"SwivySecretKey":[]}],"responses":{"200":{"description":"Runtime auth configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeConfigResponse"}}}},"401":{"description":"Missing or invalid environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/me":{"get":{"tags":["runtime-auth"],"summary":"Get the current runtime profile","operationId":"getRuntimeProfile","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"responses":{"200":{"description":"Runtime profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeMeResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/id/username":{"post":{"tags":["runtime-auth"],"summary":"Claim or update the current runtime user's Swivy username","operationId":"claimRuntimeUsername","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"Username claim payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsernameClaimRequest"}}}},"responses":{"200":{"description":"Username claimed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsernameClaimResponse"}}}},"400":{"description":"Invalid or reserved username","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Username already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/id/{username}":{"get":{"tags":["runtime-auth"],"summary":"Look up a Swivy username in the current project","operationId":"lookupRuntimeUsername","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"parameters":[{"name":"username","in":"path","required":true,"description":"Swivy username","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Swivy username lookup","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityLookupResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Username not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/mfa/totp/start":{"post":{"tags":["runtime-auth"],"summary":"Start TOTP enrollment","operationId":"startTotpEnrollment","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":false,"description":"TOTP enrollment payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpStartRequest"}}}},"responses":{"200":{"description":"TOTP enrollment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpStartResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/mfa/totp/verify":{"post":{"tags":["runtime-auth"],"summary":"Verify a TOTP enrollment code","operationId":"verifyTotpEnrollment","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"TOTP verification payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpVerifyRequest"}}}},"responses":{"200":{"description":"TOTP verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Invalid TOTP code or runtime session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Auth method not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/mfa/passkeys/register/start":{"post":{"tags":["runtime-auth"],"summary":"Start passkey registration","operationId":"startPasskeyRegistration","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":false,"description":"Passkey registration payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegistrationStartRequest"}}}},"responses":{"200":{"description":"Passkey registration challenge and options","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegistrationStartResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Identity not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/mfa/passkeys/register/finish":{"post":{"tags":["runtime-auth"],"summary":"Finish passkey registration","operationId":"finishPasskeyRegistration","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"Passkey registration verification payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegistrationFinishRequest"}}}},"responses":{"200":{"description":"Passkey registration completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegistrationFinishResponse"}}}},"401":{"description":"Invalid passkey registration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Challenge or auth method not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Passkey already registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/mfa/passkeys":{"post":{"tags":["runtime-auth"],"summary":"Import a passkey public key directly","operationId":"importPasskey","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"Direct passkey import payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyImportRequest"}}}},"responses":{"200":{"description":"Passkey created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMethodResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/mfa/sms/start":{"post":{"tags":["runtime-auth"],"summary":"Start SMS MFA enrollment","operationId":"startSmsEnrollment","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"SMS enrollment payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsStartRequest"}}}},"responses":{"200":{"description":"SMS enrollment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsStartResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"SMS delivery failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/mfa/sms/verify":{"post":{"tags":["runtime-auth"],"summary":"Verify an SMS enrollment code","operationId":"verifySmsEnrollment","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"SMS verification payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsVerifyRequest"}}}},"responses":{"200":{"description":"SMS verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Invalid SMS code or runtime session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Challenge or auth method not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/mfa/challenges":{"post":{"tags":["runtime-auth"],"summary":"Create a step-up challenge","operationId":"createMfaChallenge","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"MFA challenge payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeCreateRequest"}}}},"responses":{"200":{"description":"Challenge created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeCreateResponse"}}}},"400":{"description":"Challenge could not be created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Active auth method not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"SMS delivery failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/mfa/challenges/verify":{"post":{"tags":["runtime-auth"],"summary":"Verify a step-up challenge","operationId":"verifyMfaChallenge","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"Challenge verification payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeVerifyRequest"}}}},"responses":{"200":{"description":"Challenge verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Missing passkey assertion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid verification code or signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Challenge or auth method not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/accounts/managed":{"post":{"tags":["runtime-accounts"],"summary":"Create or fetch a managed embedded account","operationId":"createManagedAccount","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"Managed account payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAccountCreateRequest"}}}},"responses":{"200":{"description":"Managed account resolution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAccountCreateResponse"}}}},"400":{"description":"Invalid custody or browser provisioning payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Managed account creation not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/accounts":{"get":{"tags":["runtime-accounts"],"summary":"List managed accounts and linked wallets","operationId":"listAccounts","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"responses":{"200":{"description":"Managed accounts and linked wallets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAccountsResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/accounts/{accountId}/custody":{"get":{"tags":["runtime-accounts"],"summary":"Get custody metadata for an account","operationId":"getAccountCustody","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Managed account identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Account custody metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCustodyResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Managed account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Client reconstruction required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/accounts/{accountId}/custody/server-share":{"post":{"tags":["runtime-accounts"],"summary":"Fetch the server share for a browser-split wallet","operationId":"getAccountServerShare","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Managed account identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Verified MFA challenge used to unlock local reconstruction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerShareAccessRequest"}}}},"responses":{"200":{"description":"Server share payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerShareResponse"}}}},"400":{"description":"Missing challenge identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid runtime session or unverified MFA challenge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Managed account or server share not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Server share not applicable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/accounts/{accountId}/custody/split":{"post":{"tags":["runtime-accounts"],"summary":"Enable split custody metadata for an existing account","operationId":"enableSplitCustody","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Managed account identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Split custody metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableSplitCustodyRequest"}}}},"responses":{"200":{"description":"Split custody enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCustodyResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Split custody not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Managed account or owner not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/accounts/{accountId}/local-signing-events":{"post":{"tags":["runtime-accounts"],"summary":"Record a client-reported browser-local signing event","operationId":"reportLocalSigningEvent","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Managed account identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Client-reported metadata for a browser-local signing flow","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalSigningAuditRequest"}}}},"responses":{"200":{"description":"Local signing audit event recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalSigningAuditResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Managed account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Local signing audit not applicable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/session-grants":{"get":{"tags":["runtime-session-grants"],"summary":"List delegated session grants","operationId":"listSessionGrants","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"responses":{"200":{"description":"Delegated session grants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionGrantsListResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["runtime-session-grants"],"summary":"Create a delegated session grant","operationId":"createSessionGrant","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"Delegated session-grant payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionGrantCreateRequest"}}}},"responses":{"200":{"description":"Created session grant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionGrantResponse"}}}},"400":{"description":"Session grant payload is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"MFA required or invalid runtime session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Session grant not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Managed account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Client reconstruction required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/session-grants/{grantId}/revoke":{"post":{"tags":["runtime-session-grants"],"summary":"Revoke a delegated session grant","operationId":"revokeSessionGrant","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"parameters":[{"name":"grantId","in":"path","required":true,"description":"Session grant identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Revoked session grant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionGrantResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session grant not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/session-grants/{grantId}/intents/signing":{"post":{"tags":["runtime-session-grants"],"summary":"Create a signing intent with a delegated session grant","operationId":"createSigningIntentWithSessionGrant","security":[{"SwivyAppId":[],"SwivyPublishableKey":[]},{"SwivyAppId":[],"SwivySecretKey":[]}],"parameters":[{"name":"grantId","in":"path","required":true,"description":"Session grant identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Delegated signing intent payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIntentRequest"}}}},"responses":{"200":{"description":"Queued or completed signing intent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionIntentResponse"}}}},"400":{"description":"Unsupported signing payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid session grant, authorization, or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Signing kind or network not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session grant or managed account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Client reconstruction required or nonce reused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/session-grants/{grantId}/intents/transactions":{"post":{"tags":["runtime-session-grants"],"summary":"Create a transaction intent with a delegated session grant","operationId":"createTransactionIntentWithSessionGrant","security":[{"SwivyAppId":[],"SwivyPublishableKey":[]},{"SwivyAppId":[],"SwivySecretKey":[]}],"parameters":[{"name":"grantId","in":"path","required":true,"description":"Session grant identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Delegated transaction intent payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIntentRequest"}}}},"responses":{"200":{"description":"Queued or completed transaction intent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionIntentResponse"}}}},"400":{"description":"Unsupported transaction payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid session grant, authorization, or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Execution, network, or value not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Session grant or managed account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Client reconstruction required or nonce reused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/accounts/linked":{"post":{"tags":["runtime-accounts"],"summary":"Link an external wallet","operationId":"linkWallet","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"Linked wallet payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedWalletCreateRequest"}}}},"responses":{"200":{"description":"Linked wallet created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedWalletResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Wallet linking not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/intents/signing":{"post":{"tags":["runtime-intents"],"summary":"Create a signing intent","operationId":"createSigningIntent","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"Signing intent payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentRequest"}}}},"responses":{"200":{"description":"Queued or completed signing intent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionIntentResponse"}}}},"400":{"description":"Unsupported signing payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"MFA required or invalid runtime session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Signing not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Managed account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Client reconstruction required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/intents/transactions":{"post":{"tags":["runtime-intents"],"summary":"Create a transaction intent","operationId":"createTransactionIntent","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"requestBody":{"required":true,"description":"Transaction intent payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentRequest"}}}},"responses":{"200":{"description":"Queued or completed transaction intent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionIntentResponse"}}}},"400":{"description":"Unsupported transaction payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"MFA required or invalid runtime session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Execution not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Managed account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Client reconstruction required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/intents/{intentId}":{"get":{"tags":["runtime-intents"],"summary":"Fetch an intent by id","operationId":"getIntent","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"parameters":[{"name":"intentId","in":"path","required":true,"description":"Intent identifier","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Intent payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionIntentResponse"}}}},"401":{"description":"Invalid runtime session or environment credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Intent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/accounts/{accountId}/export":{"post":{"tags":["runtime-accounts"],"summary":"Export a managed account private key","operationId":"exportManagedAccount","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Managed account identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Account export payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"200":{"description":"Exported private key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportedAccountResponse"}}}},"401":{"description":"Invalid MFA challenge or runtime session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Account export not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Managed account or owner not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Client reconstruction required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/runtime/accounts/{accountId}/raw-sign":{"post":{"tags":["runtime-accounts"],"summary":"Execute a raw signing payload immediately","operationId":"rawSignManagedAccount","security":[{"SwivyAppId":[],"SwivyPublishableKey":[],"BearerSession":[]},{"SwivyAppId":[],"SwivySecretKey":[],"BearerSession":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Managed account identifier","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Raw signing payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawSignRequest"}}}},"responses":{"200":{"description":"Raw signing result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawSignResponse"}}}},"400":{"description":"Unsupported raw-sign payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid MFA challenge or runtime session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Raw signing not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Managed account or owner not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Client reconstruction required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}