{ "openapi": "3.0.0", "info": { "title": "Vincent Registry API", "version": "1.0.3", "description": "API for Vincent App, Ability, and Policy Registry" }, "servers": [ { "url": "https://api.heyvincent.ai" }, { "url": "https://staging.api.heyvincent.ai" }, { "url": "http://localhost:3000/" } ], "components": { "securitySchemes": { "siweAuth": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "Sign In With Ethereum authentication (SIWE). Format is \"SIWE [JSON({ message, signature })]\"" } }, "schemas": { "Error": { "type": "object", "properties": { "code": { "type": "string", "description": "Error code", "example": "VALIDATION_ERROR" }, "message": { "type": "string", "description": "Error message", "example": "Invalid input provided" } }, "required": [ "message" ] }, "GenericResultMessage": { "type": "object", "properties": { "message": { "type": "string", "description": "Success message", "example": "Successfully deleted" } }, "required": [ "message" ] }, "ChangeOwner": { "type": "object", "properties": { "authorWalletAddress": { "type": "string", "description": "New owner address", "example": "0x123456789012345678901234567890123456abcd" } }, "required": [ "authorWalletAddress" ] }, "AppCreate": { "type": "object", "properties": { "deploymentStatus": { "type": "string", "enum": [ "dev", "test", "prod" ], "default": "dev", "description": "Identifies if an application is in development, test, or production.", "example": "dev" }, "contactEmail": { "type": "string", "format": "email", "description": "Contact email for the application manager", "example": "contact@example.com" }, "appUrl": { "type": "string", "format": "uri", "description": "This should be a landing page for the app.", "example": "https://myapplication.example.com/" }, "logo": { "type": "string", "description": "Base64 encoded logo image", "example": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAAA5JREFUGFdj/M+ACAAAAAD//wE7AnsAAAAAAElFTkSuQmCC" }, "appId": { "type": "number", "description": "Application ID", "example": 12345 }, "name": { "type": "string", "minLength": 2, "description": "The name of the application", "example": "Memecoin DCA App" }, "description": { "type": "string", "minLength": 10, "description": "Description of the application", "example": "This is a memecoin DCA App." } }, "required": [ "appId", "name", "description" ], "additionalProperties": false }, "AppEdit": { "type": "object", "properties": { "name": { "type": "string", "minLength": 2, "description": "The name of the application", "example": "Memecoin DCA App" }, "description": { "type": "string", "minLength": 10, "description": "Description of the application", "example": "This is a memecoin DCA App." }, "contactEmail": { "type": "string", "format": "email", "description": "Contact email for the application manager", "example": "contact@example.com" }, "appUrl": { "type": "string", "format": "uri", "description": "This should be a landing page for the app.", "example": "https://myapplication.example.com/" }, "logo": { "type": "string", "description": "Base64 encoded logo image", "example": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAAA5JREFUGFdj/M+ACAAAAAD//wE7AnsAAAAAAElFTkSuQmCC" }, "deploymentStatus": { "type": "string", "enum": [ "dev", "test", "prod" ], "description": "Identifies if an application is in development, test, or production.", "example": "dev" }, "activeVersion": { "type": "number", "description": "Active version of the application", "example": 1 } }, "additionalProperties": false }, "App": { "type": "object", "properties": { "_id": { "type": "string", "description": "Document ID", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was last modified" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was created" }, "appId": { "type": "number", "description": "Application ID", "example": 12345 }, "activeVersion": { "type": "number", "description": "Active version of the application", "example": 1 }, "name": { "type": "string", "minLength": 2, "description": "The name of the application", "example": "Memecoin DCA App" }, "description": { "type": "string", "minLength": 10, "description": "Description of the application", "example": "This is a memecoin DCA App." }, "contactEmail": { "type": "string", "format": "email", "description": "Contact email for the application manager", "example": "contact@example.com" }, "appUrl": { "type": "string", "format": "uri", "description": "This should be a landing page for the app.", "example": "https://myapplication.example.com/" }, "logo": { "type": "string", "description": "Base64 encoded logo image", "example": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAAA5JREFUGFdj/M+ACAAAAAD//wE7AnsAAAAAAElFTkSuQmCC" }, "deploymentStatus": { "type": "string", "enum": [ "dev", "test", "prod" ], "description": "Identifies if an application is in development, test, or production.", "example": "dev" }, "managerAddress": { "type": "string", "description": "App manager's wallet address. Derived from the authorization signature provided by the creator.", "example": "0x123456789012345678901234567890123456abcd", "readOnly": true }, "isDeleted": { "type": "boolean", "description": "Whether or not this App is deleted", "example": false } }, "required": [ "_id", "updatedAt", "createdAt", "appId", "name", "description", "managerAddress" ], "additionalProperties": false }, "AppSetActiveVersion": { "type": "object", "properties": { "activeVersion": { "type": "number", "description": "The version to set as active", "example": 2 } }, "required": [ "activeVersion" ], "additionalProperties": false }, "AppVersion": { "type": "object", "properties": { "_id": { "type": "string", "description": "Document ID", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was last modified" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was created" }, "appId": { "type": "number", "description": "Application ID", "example": 12312345, "readOnly": true }, "version": { "type": "number", "description": "App Version number", "example": 1, "readOnly": true }, "isDeleted": { "type": "boolean", "description": "Whether or not this AppVersion is deleted", "example": false } }, "required": [ "_id", "updatedAt", "createdAt", "appId", "version" ], "additionalProperties": false }, "AppVersionAbilityCreate": { "type": "object", "properties": { "hiddenSupportedPolicies": { "type": "array", "items": { "type": "string" }, "description": "Policies that are supported by this ability, but are hidden from users of this app specifically", "example": [ "@vincent/foo-bar-policy-1", "@vincent/foo-bar-policy-2" ] }, "abilityVersion": { "type": "string", "description": "Ability version", "example": "1.0.0" } }, "required": [ "abilityVersion" ], "additionalProperties": false }, "AppVersionAbilityEdit": { "type": "object", "properties": { "hiddenSupportedPolicies": { "type": "array", "items": { "type": "string" }, "description": "Policies that are supported by this ability, but are hidden from users of this app specifically", "example": [ "@vincent/foo-bar-policy-1", "@vincent/foo-bar-policy-2" ] } }, "additionalProperties": false }, "AppVersionAbility": { "type": "object", "properties": { "_id": { "type": "string", "description": "Document ID", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was last modified" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was created" }, "appId": { "type": "number", "description": "Application ID", "example": 5, "readOnly": true }, "appVersion": { "type": "number", "description": "Application version", "example": 2, "readOnly": true }, "abilityPackageName": { "type": "string", "description": "Ability package name", "example": "@vincent/foo-bar" }, "abilityVersion": { "type": "string", "description": "Ability version", "example": "1.0.0" }, "hiddenSupportedPolicies": { "type": "array", "items": { "type": "string" }, "description": "Policies that are supported by this ability, but are hidden from users of this app specifically", "example": [ "@vincent/foo-bar-policy-1", "@vincent/foo-bar-policy-2" ] }, "isDeleted": { "type": "boolean", "description": "Whether or not this AppVersionAbility is deleted", "example": false } }, "required": [ "_id", "updatedAt", "createdAt", "appId", "appVersion", "abilityPackageName", "abilityVersion" ], "additionalProperties": false }, "BatchDelegator": { "type": "object", "properties": { "delegatorAddress": { "type": "string", "description": "Ethereum address of the delegator (user who delegated ability to the app)", "example": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb" }, "abilityParams": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "description": "Ability-specific parameters for this delegator, which override the defaults", "example": { "AMOUNT": "1000000000000000000" } } }, "required": [ "delegatorAddress", "abilityParams" ] }, "ExecuteBatchAbilityRequest": { "type": "object", "properties": { "delegateePrivateKey": { "type": "string", "description": "Private key of the delegatee (app PKP). Used to derive the app ID automatically.", "example": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" }, "defaults": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "description": "Default parameters for the ability execution that apply to all delegators unless overridden", "example": { "ORIGIN_CHAIN_ID": 8453, "DESTINATION_CHAIN_ID": 8453, "ORIGIN_CURRENCY": "0x0000000000000000000000000000000000000000", "DESTINATION_CURRENCY": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "TRADE_TYPE": "EXACT_INPUT" } }, "delegators": { "type": "array", "items": { "$ref": "#/components/schemas/BatchDelegator" }, "minItems": 1, "description": "Array of delegators to execute the ability for" } }, "required": [ "delegateePrivateKey", "delegators" ] }, "DelegatorExecutionResultSuccess": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ true ] }, "transactionHash": { "type": "string", "description": "Transaction hash of the executed UserOperation", "example": "0xabc123..." }, "userOpHash": { "type": "string", "description": "UserOperation hash", "example": "0xdef456..." } }, "required": [ "success", "transactionHash", "userOpHash" ] }, "DelegatorExecutionResultFailure": { "type": "object", "properties": { "success": { "type": "boolean", "enum": [ false ] }, "error": { "type": "string", "description": "Error message describing why the execution failed", "example": "Precheck failed: Insufficient balance" } }, "required": [ "success", "error" ] }, "DelegatorExecutionResult": { "anyOf": [ { "$ref": "#/components/schemas/DelegatorExecutionResultSuccess" }, { "$ref": "#/components/schemas/DelegatorExecutionResultFailure" } ] }, "ExecuteBatchAbilityResponse": { "type": "object", "properties": { "results": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/DelegatorExecutionResult" }, "description": "Map of delegator addresses to their execution results", "example": { "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb": { "success": true, "transactionHash": "0xabc123...", "userOpHash": "0xdef456..." }, "0x1234567890123456789012345678901234567890": { "success": false, "error": "Precheck failed: Insufficient balance" } } } }, "required": [ "results" ] }, "AbilityCreate": { "type": "object", "properties": { "activeVersion": { "type": "string", "description": "Active version of the ability", "example": "1.0.0" }, "title": { "type": "string", "minLength": 2, "description": "Ability title - displayed to users in the dashboard/Vincent Explorer UI", "example": "ERC20 Approval Ability" }, "description": { "type": "string", "minLength": 10, "description": "Ability description - displayed to users in the dashboard/Vincent Explorer UI", "example": "An ability that manages ERC20 approvals for PKPs. Facilitates vincent-uniswap-swap-ability usage." }, "deploymentStatus": { "type": "string", "enum": [ "dev", "test", "prod" ], "default": "dev", "description": "Identifies if an ability is in development, test, or production.", "example": "dev" }, "logo": { "type": "string", "description": "Base64 encoded logo image", "example": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAAA5JREFUGFdj/M+ACAAAAAD//wE7AnsAAAAAAElFTkSuQmCC" } }, "required": [ "activeVersion", "title", "description" ], "additionalProperties": false }, "AbilityEdit": { "type": "object", "properties": { "activeVersion": { "type": "string", "description": "Active version of the ability", "example": "1.0.0" }, "title": { "type": "string", "minLength": 2, "description": "Ability title - displayed to users in the dashboard/Vincent Explorer UI", "example": "ERC20 Approval Ability" }, "description": { "type": "string", "minLength": 10, "description": "Ability description - displayed to users in the dashboard/Vincent Explorer UI", "example": "An ability that manages ERC20 approvals for PKPs. Facilitates vincent-uniswap-swap-ability usage." }, "deploymentStatus": { "type": "string", "enum": [ "dev", "test", "prod" ], "description": "Identifies if an ability is in development, test, or production.", "example": "dev" }, "logo": { "type": "string", "description": "Base64 encoded logo image", "example": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAAA5JREFUGFdj/M+ACAAAAAD//wE7AnsAAAAAAElFTkSuQmCC" } }, "additionalProperties": false }, "Ability": { "type": "object", "properties": { "_id": { "type": "string", "description": "Document ID", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was last modified" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was created" }, "packageName": { "type": "string", "description": "Ability NPM package name", "example": "@lit-protocol/vincent-erc20-approval-ability" }, "title": { "type": "string", "minLength": 2, "description": "Ability title - displayed to users in the dashboard/Vincent Explorer UI", "example": "ERC20 Approval Ability" }, "authorWalletAddress": { "type": "string", "description": "Author wallet address. Derived from the authorization signature provided by the creator.", "example": "0x123456789012345678901234567890123456abcd", "readOnly": true }, "description": { "type": "string", "minLength": 10, "description": "Ability description - displayed to users in the dashboard/Vincent Explorer UI", "example": "An ability that manages ERC20 approvals for PKPs. Facilitates vincent-uniswap-swap-ability usage." }, "logo": { "type": "string", "description": "Base64 encoded logo image", "example": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAAA5JREFUGFdj/M+ACAAAAAD//wE7AnsAAAAAAElFTkSuQmCC" }, "activeVersion": { "type": "string", "description": "Active version of the ability", "example": "1.0.0" }, "deploymentStatus": { "type": "string", "enum": [ "dev", "test", "prod" ], "description": "Identifies if an ability is in development, test, or production.", "example": "dev" }, "isDeleted": { "type": "boolean", "description": "Whether or not this Ability is deleted", "example": false } }, "required": [ "_id", "updatedAt", "createdAt", "packageName", "title", "authorWalletAddress", "description", "activeVersion" ], "additionalProperties": false }, "AbilityVersionCreate": { "type": "object", "properties": { "changes": { "type": "string", "minLength": 10, "description": "Changelog information for this version", "example": "Ensure commit() is run on spending policy limit for users who have it enabled." } }, "required": [ "changes" ], "additionalProperties": false }, "AbilityVersionEdit": { "type": "object", "properties": { "changes": { "type": "string", "minLength": 10, "description": "Changelog information for this version", "example": "Ensure commit() is run on spending policy limit for users who have it enabled." } }, "required": [ "changes" ], "additionalProperties": false }, "AbilityVersion": { "type": "object", "properties": { "_id": { "type": "string", "description": "Document ID", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was last modified" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was created" }, "packageName": { "type": "string", "description": "Ability NPM package name", "example": "@lit-protocol/vincent-erc20-approval-ability" }, "version": { "type": "string", "description": "Ability version - must be an exact semver.", "example": "1.0.0" }, "changes": { "type": "string", "minLength": 10, "description": "Changelog information for this version", "example": "Ensure commit() is run on spending policy limit for users who have it enabled." }, "repository": { "type": "array", "items": { "type": "string" }, "description": "Repository URLs" }, "description": { "type": "string", "description": "Policy description", "example": "This policy is a foo bar policy" }, "keywords": { "type": "array", "items": { "type": "string" }, "description": "Keywords for the policy", "example": [ "defi", "memecoin" ] }, "dependencies": { "type": "array", "items": { "type": "string" }, "description": "Dependencies of the policy" }, "author": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the author", "example": "Developer Name" }, "email": { "type": "string", "format": "email", "description": "Email of the author", "example": "contact@example.com" }, "url": { "type": "string", "format": "uri", "description": "URL of the author's website", "example": "https://example.com" } }, "required": [ "name", "email" ], "description": "Author information" }, "contributors": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the contributor", "example": "Contributor Name" }, "email": { "type": "string", "format": "email", "description": "Email of the contributor", "example": "contributor@example.com" }, "url": { "type": "string", "format": "uri", "description": "URL of the contributor's website", "example": "https://contributor-site.example.com" } }, "required": [ "name", "email" ] }, "description": "Contributors information" }, "homepage": { "type": "string", "format": "uri", "description": "Policy homepage", "example": "https://example-vincent-homepage.com" }, "supportedPolicies": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Supported policies. These are detected from 'dependencies' in the ability's package.json.", "example": { "@lit-protocol/vincent-spending-limit-policy": "1.0.0", "@lit-protocol/vincent-rate-limit-policy": "0.0.1" }, "readOnly": true }, "ipfsCid": { "type": "string", "description": "IPFS CID of the code that implements this ability.", "example": "QmdoY1VUxVvxShBQK5B6PP2jZFVw7PMTJ3qy2aiCARjMqo", "readOnly": true }, "policiesNotInRegistry": { "type": "array", "items": { "type": "string" }, "description": "Policy versions that are not in the registry but are supported by this ability", "example": [ "@lit-protocol/vincent-spending-limit-policy@1.0.1" ], "readOnly": true }, "isDeleted": { "type": "boolean", "description": "Whether or not this AbilityVersion is deleted", "example": false } }, "required": [ "_id", "updatedAt", "createdAt", "packageName", "version", "changes", "repository", "description", "keywords", "dependencies", "author", "contributors", "supportedPolicies", "ipfsCid", "policiesNotInRegistry" ], "additionalProperties": false }, "PolicyCreate": { "type": "object", "properties": { "activeVersion": { "type": "string", "description": "Active version of the policy; must be an exact semver", "example": "1.0.0" }, "title": { "type": "string", "minLength": 2, "description": "Policy title for displaying to users in the dashboard/Vincent Explorer UI", "example": "Vincent Spending Limit Policy" }, "description": { "type": "string", "minLength": 10, "description": "Policy description - displayed to users in the dashboard/Vincent Explorer UI", "example": "This policy is a foo bar policy" }, "deploymentStatus": { "type": "string", "enum": [ "dev", "test", "prod" ], "default": "dev", "description": "Identifies if a policy is in development, test, or production.", "example": "dev" }, "logo": { "type": "string", "description": "Base64 encoded logo image", "example": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAAA5JREFUGFdj/M+ACAAAAAD//wE7AnsAAAAAAElFTkSuQmCC" } }, "required": [ "activeVersion", "title", "description" ], "additionalProperties": false }, "PolicyEdit": { "type": "object", "properties": { "activeVersion": { "type": "string", "description": "Active version of the policy; must be an exact semver", "example": "1.0.0" }, "title": { "type": "string", "minLength": 2, "description": "Policy title for displaying to users in the dashboard/Vincent Explorer UI", "example": "Vincent Spending Limit Policy" }, "description": { "type": "string", "minLength": 10, "description": "Policy description - displayed to users in the dashboard/Vincent Explorer UI", "example": "This policy is a foo bar policy" }, "deploymentStatus": { "type": "string", "enum": [ "dev", "test", "prod" ], "description": "Identifies if a policy is in development, test, or production.", "example": "dev" }, "logo": { "type": "string", "description": "Base64 encoded logo image", "example": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAAA5JREFUGFdj/M+ACAAAAAD//wE7AnsAAAAAAElFTkSuQmCC" } }, "additionalProperties": false }, "Policy": { "type": "object", "properties": { "_id": { "type": "string", "description": "Document ID", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was last modified" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was created" }, "packageName": { "type": "string", "description": "Policy NPM package name", "example": "@lit-protocol/vincent-policy-spending-limit" }, "authorWalletAddress": { "type": "string", "description": "Author wallet address. Derived from the authorization signature provided by the creator.", "example": "0x123456789012345678901234567890123456abcd", "readOnly": true }, "description": { "type": "string", "minLength": 10, "description": "Policy description - displayed to users in the dashboard/Vincent Explorer UI", "example": "This policy is a foo bar policy" }, "logo": { "type": "string", "description": "Base64 encoded logo image", "example": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAAA5JREFUGFdj/M+ACAAAAAD//wE7AnsAAAAAAElFTkSuQmCC" }, "activeVersion": { "type": "string", "description": "Active version of the policy; must be an exact semver", "example": "1.0.0" }, "title": { "type": "string", "minLength": 2, "description": "Policy title for displaying to users in the dashboard/Vincent Explorer UI", "example": "Vincent Spending Limit Policy" }, "deploymentStatus": { "type": "string", "enum": [ "dev", "test", "prod" ], "description": "Identifies if a policy is in development, test, or production.", "example": "dev" }, "isDeleted": { "type": "boolean", "description": "Whether or not this Policy is deleted", "example": false } }, "required": [ "_id", "updatedAt", "createdAt", "packageName", "authorWalletAddress", "description", "activeVersion", "title" ], "additionalProperties": false }, "PolicyVersionCreate": { "type": "object", "properties": { "changes": { "type": "string", "description": "Changelog information for this version", "example": "Resolved issue with checking for spending limits on the wrong chain." } }, "required": [ "changes" ], "additionalProperties": false }, "PolicyVersionEdit": { "type": "object", "properties": { "changes": { "type": "string", "description": "Changelog information for this version", "example": "Resolved issue with checking for spending limits on the wrong chain." } }, "required": [ "changes" ], "additionalProperties": false }, "PolicyVersion": { "type": "object", "properties": { "_id": { "type": "string", "description": "Document ID", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was last modified" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when this was created" }, "packageName": { "type": "string", "description": "Policy NPM package name", "example": "@lit-protocol/vincent-policy-spending-limit" }, "version": { "type": "string", "description": "Policy version - must be an exact semver", "example": "1.0.0" }, "changes": { "type": "string", "description": "Changelog information for this version", "example": "Resolved issue with checking for spending limits on the wrong chain." }, "repository": { "type": "array", "items": { "type": "string" }, "description": "Repository URLs" }, "description": { "type": "string", "description": "Policy description", "example": "This policy is a foo bar policy" }, "keywords": { "type": "array", "items": { "type": "string" }, "description": "Keywords for the policy", "example": [ "defi", "memecoin" ] }, "dependencies": { "type": "array", "items": { "type": "string" }, "description": "Dependencies of the policy" }, "author": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the author", "example": "Developer Name" }, "email": { "type": "string", "format": "email", "description": "Email of the author", "example": "contact@example.com" }, "url": { "type": "string", "format": "uri", "description": "URL of the author's website", "example": "https://example.com" } }, "required": [ "name", "email" ], "description": "Author information" }, "contributors": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the contributor", "example": "Contributor Name" }, "email": { "type": "string", "format": "email", "description": "Email of the contributor", "example": "contributor@example.com" }, "url": { "type": "string", "format": "uri", "description": "URL of the contributor's website", "example": "https://contributor-site.example.com" } }, "required": [ "name", "email" ] }, "description": "Contributors information" }, "homepage": { "type": "string", "format": "uri", "description": "Policy homepage", "example": "https://example-vincent-homepage.com" }, "ipfsCid": { "type": "string", "description": "IPFS CID of the code that implements this policy.", "example": "QmdoY1VUxVvxShBQK5B6PP2jZFVw7PMTJ3qy2aiCARjMqo", "readOnly": true }, "parameters": { "type": "object", "properties": { "uiSchema": { "type": "string", "description": "UI Schema for parameter display", "example": "{\"type\":\"object\",\"properties\":{}}" }, "jsonSchema": { "type": "string", "description": "JSON Schema for parameter validation", "example": "{\"type\":\"object\",\"required\":[],\"properties\":{}}" } }, "required": [ "uiSchema", "jsonSchema" ], "description": "Schema parameters", "readOnly": true }, "isDeleted": { "type": "boolean", "description": "Whether or not this PolicyVersion is deleted", "example": false } }, "required": [ "_id", "updatedAt", "createdAt", "packageName", "version", "changes", "repository", "description", "keywords", "dependencies", "author", "contributors", "ipfsCid" ], "additionalProperties": false }, "InstallAppRequest": { "type": "object", "properties": { "userControllerAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "EOA address that controls the user smart wallet", "example": "0x123456789012345678901234567890123456abcd" }, "sponsorGas": { "type": "boolean", "description": "If true (default), returns EIP2771 typed data for sponsored gas relay. If false, returns raw transaction data for direct EOA submission (user pays gas).", "example": true } }, "required": [ "userControllerAddress" ], "additionalProperties": false }, "InstallAppResponse": { "type": "object", "properties": { "agentSignerAddress": { "type": "string", "description": "The PKP address that the app will use to sign things", "example": "0x123456789012345678901234567890123456abcd" }, "agentSmartAccountAddress": { "type": "string", "description": "The smart account address calculated from the PKP address, used on the frontend to verify they get the same smart wallet address", "example": "0x123456789012345678901234567890123456abcd" }, "appInstallationDataToSign": { "type": "object", "properties": { "chainId": { "anyOf": [ { "type": "string" }, { "type": "number" } ], "description": "Chain ID where the transaction will be executed", "example": 84532 }, "target": { "type": "string", "description": "Target contract address", "example": "0x1234567890123456789012345678901234567890" }, "data": { "type": "string", "description": "Encoded function call data", "example": "0x..." }, "user": { "type": "string", "description": "User address that will sign the typed data", "example": "0x123456789012345678901234567890123456abcd" }, "userNonce": { "anyOf": [ { "type": "string" }, { "type": "number" } ], "description": "User nonce for replay protection", "example": "0" }, "userDeadline": { "anyOf": [ { "type": "string" }, { "type": "number" } ], "description": "Deadline timestamp for the transaction", "example": "1234567890" } }, "required": [ "chainId", "target", "data", "user", "userNonce", "userDeadline" ], "description": "The EIP2771 TypedData to sign for permitAppVersion via Gelato relay (gas-sponsored). Contains the transaction details for permitting the app version on the Vincent registry." }, "agentSmartAccountDeploymentDataToSign": { "type": "object", "properties": { "messageToSign": { "type": "string", "description": "Hex-encoded message hash to sign for UserOperation", "example": "0x1234..." }, "userOperation": { "type": "object", "properties": { "sender": { "type": "string", "description": "Smart account address", "example": "0x123456789012345678901234567890123456abcd" }, "nonce": { "type": "string", "description": "Account nonce as string", "example": "0" }, "factory": { "type": "string", "description": "Factory address for account deployment", "example": "0x1234567890123456789012345678901234567890" }, "factoryData": { "type": "string", "description": "Factory calldata for deployment", "example": "0x..." }, "callData": { "type": "string", "description": "Calldata for the account to execute", "example": "0x..." }, "callGasLimit": { "type": "string", "description": "Gas limit for the call", "example": "100000" }, "verificationGasLimit": { "type": "string", "description": "Gas limit for verification", "example": "100000" }, "preVerificationGas": { "type": "string", "description": "Gas for pre-verification", "example": "50000" }, "maxFeePerGas": { "type": "string", "description": "Maximum fee per gas", "example": "1000000000" }, "maxPriorityFeePerGas": { "type": "string", "description": "Maximum priority fee per gas", "example": "1000000000" }, "paymaster": { "type": "string", "description": "Paymaster address", "example": "0x1234567890123456789012345678901234567890" }, "paymasterVerificationGasLimit": { "type": "string", "description": "Gas limit for paymaster verification", "example": "100000" }, "paymasterPostOpGasLimit": { "type": "string", "description": "Gas limit for paymaster post-op", "example": "50000" }, "paymasterData": { "type": "string", "description": "Paymaster-specific data", "example": "0x" }, "signature": { "type": "string", "description": "Signature placeholder", "example": "0x" } }, "required": [ "sender", "nonce", "callData", "callGasLimit", "verificationGasLimit", "preVerificationGas", "maxFeePerGas", "maxPriorityFeePerGas" ], "description": "Complete UserOperation object that will be submitted with the signature" } }, "required": [ "messageToSign", "userOperation" ], "description": "Data for signing the smart account deployment UserOperation. Contains messageToSign (hex hash) and the complete userOperation object that will be submitted with the signature." }, "sessionKeyApprovalDataToSign": { "type": "object", "properties": { "domain": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "string" }, "chainId": { "anyOf": [ { "type": "string" }, { "type": "number" } ] }, "verifyingContract": { "type": "string" }, "salt": { "type": "string" } }, "description": "EIP-712 domain" }, "types": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type" ] } }, "description": "EIP-712 type definitions" }, "primaryType": { "type": "string", "description": "Primary type name" }, "message": { "type": "string", "description": "Message to sign" } }, "required": [ "types", "message" ], "description": "EIP-712 TypedData for session key approval. This enables the PKP signer to act on behalf of the smart account by granting it permission to execute transactions." }, "alreadyInstalled": { "type": "boolean", "description": "True if the app is already installed for this user. If true, the typed data fields will be undefined." } }, "required": [ "agentSignerAddress", "agentSmartAccountAddress" ], "additionalProperties": false }, "CompleteInstallationRequest": { "type": "object", "properties": { "userControllerAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "EOA address that controls the user smart wallet", "example": "0x123456789012345678901234567890123456abcd" }, "agentSignerAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "The PKP address that will be used as the agent signer", "example": "0x123456789012345678901234567890123456abcd" }, "appInstallation": { "type": "object", "properties": { "typedDataSignature": { "type": "string", "description": "The signature of the EIP2771 typed data", "example": "0x..." }, "dataToSign": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object", "properties": {} } ] }, "description": "The original EIP2771 typed data that was signed" } }, "required": [ "typedDataSignature", "dataToSign" ], "additionalProperties": false, "description": "Signed EIP2771 typed data for permitAppVersion transaction" }, "agentSmartAccountDeployment": { "type": "object", "properties": { "typedDataSignature": { "type": "string", "description": "The signature of the UserOperation message hash", "example": "0x..." }, "userOperation": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object", "properties": {} } ] }, "description": "The UserOperation that was signed for smart account deployment" } }, "required": [ "typedDataSignature", "userOperation" ], "additionalProperties": false, "description": "Signed UserOperation for smart account deployment" }, "sessionKeyApproval": { "type": "object", "properties": { "typedDataSignature": { "type": "string", "description": "The signature of the session key approval EIP-712 typed data", "example": "0x..." } }, "required": [ "typedDataSignature" ], "additionalProperties": false, "description": "Signed permission account data for session key approval" } }, "required": [ "userControllerAddress", "agentSignerAddress", "appInstallation", "agentSmartAccountDeployment", "sessionKeyApproval" ], "additionalProperties": false }, "CompleteInstallationResponse": { "type": "object", "properties": { "deployAgentSmartAccountTransactionHash": { "type": "string", "description": "Transaction hash for smart account deployment", "example": "0x9d260d1bbe075be0cda52a3271df062748f3182ede91b3aae5cd115f7b26552b" }, "serializedPermissionAccount": { "type": "string", "description": "Serialized permission account that can be used by the PKP to sign transactions. The permission plugin will be automatically enabled on-chain when the PKP submits its first UserOperation.", "example": "{\"accountAddress\":\"0x...\",\"permissionParams\":{...}}" }, "completeAppInstallationTransactionHash": { "type": "string", "description": "Transaction hash for permitAppVersion (app installation completion)", "example": "0x9d260d1bbe075be0cda52a3271df062748f3182ede91b3aae5cd115f7b26552b" } }, "required": [ "deployAgentSmartAccountTransactionHash", "serializedPermissionAccount", "completeAppInstallationTransactionHash" ], "additionalProperties": false }, "GetAgentAccountRequest": { "type": "object", "properties": { "userControllerAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "EOA address that controls the user smart wallet", "example": "0x123456789012345678901234567890123456abcd" } }, "required": [ "userControllerAddress" ], "additionalProperties": false }, "GetAgentAccountResponse": { "type": "object", "properties": { "agentAddress": { "type": "string", "nullable": true, "description": "The agent smart account address if registered, or null if the agent does not exist", "example": "0x123456789012345678901234567890123456abcd" } }, "required": [ "agentAddress" ], "additionalProperties": false }, "UninstallAppRequest": { "type": "object", "properties": { "appVersion": { "type": "integer", "minimum": 0, "exclusiveMinimum": true, "description": "The version of the app to uninstall", "example": 1 }, "userControllerAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "EOA address that controls the user smart wallet", "example": "0x123456789012345678901234567890123456abcd" }, "sponsorGas": { "type": "boolean", "description": "If true (default), returns EIP2771 typed data for sponsored gas relay. If false, returns raw transaction data for direct EOA submission (user pays gas).", "example": true } }, "required": [ "appVersion", "userControllerAddress" ], "additionalProperties": false }, "UninstallAppResponse": { "type": "object", "properties": { "rawTransaction": { "type": "object", "properties": { "to": { "type": "string", "description": "The target contract address", "example": "0x1234567890123456789012345678901234567890" }, "data": { "type": "string", "description": "The encoded transaction data", "example": "0x..." } }, "required": [ "to", "data" ], "additionalProperties": false, "description": "Raw transaction data for direct EOA submission. Present when sponsorGas=false." }, "uninstallDataToSign": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object", "properties": {} } ] }, "description": "The EIP2771 TypedData to sign for sponsored gas relay. Present when sponsorGas=true (default)." } }, "additionalProperties": false }, "CompleteUninstallRequest": { "type": "object", "properties": { "typedDataSignature": { "type": "string", "description": "The signature of the typed data from the user wallet", "example": "0x..." }, "uninstallDataToSign": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "object", "properties": {} } ] }, "description": "The uninstallDataToSign object returned from uninstall-app. Generated by the Gelato SDK." } }, "required": [ "typedDataSignature", "uninstallDataToSign" ], "additionalProperties": false }, "CompleteUninstallResponse": { "type": "object", "properties": { "transactionHash": { "type": "string", "description": "The transaction hash of the completed uninstall transaction", "example": "0x9d260d1bbe075be0cda52a3271df062748f3182ede91b3aae5cd115f7b26552b" } }, "required": [ "transactionHash" ], "additionalProperties": false }, "GetAgentFundsRequest": { "type": "object", "properties": { "userControllerAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "The Ethereum address of the user controller wallet", "example": "0x123456789012345678901234567890123456abcd" }, "networks": { "type": "array", "items": { "type": "string" }, "description": "Networks to query for token balances", "example": [ "base-mainnet", "base-sepolia" ] } }, "required": [ "userControllerAddress", "networks" ], "additionalProperties": false }, "GetAgentFundsResponse": { "type": "object", "properties": { "agentAddress": { "type": "string", "description": "The derived agent smart account address", "example": "0x123456789012345678901234567890123456abcd" }, "tokens": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string", "description": "Wallet address that holds the token" }, "network": { "type": "string", "description": "Network identifier", "example": "base-mainnet" }, "tokenAddress": { "type": "string", "description": "Token contract address" }, "tokenBalance": { "type": "string", "description": "Token balance in wei/smallest unit" }, "tokenMetadata": { "type": "object", "properties": { "decimals": { "type": "number", "description": "Token decimals", "example": 18 }, "logo": { "type": "string", "nullable": true, "description": "Token logo URL" }, "name": { "type": "string", "description": "Token name", "example": "USD Coin" }, "symbol": { "type": "string", "description": "Token symbol", "example": "USDC" } }, "required": [ "decimals", "logo", "name", "symbol" ], "additionalProperties": false }, "tokenPrices": { "type": "array", "items": { "type": "object", "properties": { "currency": { "type": "string", "description": "Price currency", "example": "usd" }, "value": { "type": "string", "description": "Price value", "example": "1.00" }, "lastUpdatedAt": { "type": "string", "description": "Last price update timestamp", "example": "2024-01-01T00:00:00Z" } }, "required": [ "currency", "value", "lastUpdatedAt" ], "additionalProperties": false } }, "error": { "type": "string", "nullable": true, "description": "Error message if applicable" } }, "required": [ "address", "network", "tokenAddress", "tokenBalance" ], "additionalProperties": false }, "description": "List of tokens held by the agent" }, "pageKey": { "type": "string", "description": "Pagination key for fetching more results" } }, "required": [ "agentAddress", "tokens" ], "additionalProperties": false }, "RequestWithdrawRequest": { "type": "object", "properties": { "userControllerAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "EOA address that controls the user smart wallet, used to derive the agent smart account", "example": "0x123456789012345678901234567890123456abcd" }, "assets": { "type": "array", "items": { "type": "object", "properties": { "network": { "type": "string", "description": "Network identifier (e.g., \"ethereum\", \"base-mainnet\")", "example": "base-mainnet" }, "tokenAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "ERC-20 contract address. Use zero address (0x0000000000000000000000000000000000000000) for native tokens", "example": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" }, "amount": { "type": "number", "minimum": 0, "exclusiveMinimum": true, "description": "Amount to withdraw, naturalized by the token decimal value", "example": 100 } }, "required": [ "network", "tokenAddress", "amount" ], "additionalProperties": false }, "minItems": 1, "description": "Array of assets to withdraw. Assets on the same network will be batched into a single UserOperation" } }, "required": [ "userControllerAddress", "assets" ], "additionalProperties": false }, "RequestWithdrawResponse": { "type": "object", "properties": { "withdrawals": { "type": "array", "items": { "type": "object", "properties": { "network": { "type": "string", "description": "Network identifier for this withdrawal", "example": "base-mainnet" }, "userOp": { "type": "object", "properties": {}, "description": "The ERC-4337 UserOperation. Pass this back to complete-withdraw along with the signature." }, "userOpHash": { "type": "string", "description": "The hash to sign. Sign this with your EOA wallet using personal_sign or signMessage.", "example": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" } }, "required": [ "network", "userOp", "userOpHash" ], "additionalProperties": false }, "description": "Array of UserOperations, one per unique network. Sign each to authorize withdrawals on that network" }, "errors": { "type": "array", "items": { "type": "object", "properties": { "network": { "type": "string", "description": "Network identifier where the error occurred", "example": "base-mainnet" }, "error": { "type": "string", "description": "Error message describing what went wrong", "example": "Insufficient balance for USDC: requested 100, available 50" } }, "required": [ "network", "error" ], "additionalProperties": false }, "description": "Array of errors for networks that failed to prepare" } }, "required": [ "withdrawals" ], "additionalProperties": false }, "CompleteWithdrawRequest": { "type": "object", "properties": { "withdrawals": { "type": "array", "items": { "type": "object", "properties": { "network": { "type": "string", "description": "Network identifier for this signed withdrawal", "example": "base-mainnet" }, "userOp": { "type": "object", "properties": {}, "description": "The userOp object returned from request-withdraw" }, "signature": { "type": "string", "description": "The signature of the UserOperation hash from the user EOA wallet", "example": "0x1234567890abcdef..." } }, "required": [ "network", "userOp", "signature" ], "additionalProperties": false }, "minItems": 1, "description": "Array of signed UserOperations to submit to the ZeroDev bundler" } }, "required": [ "withdrawals" ], "additionalProperties": false }, "CompleteWithdrawResponse": { "type": "object", "properties": { "transactions": { "type": "array", "items": { "type": "object", "properties": { "network": { "type": "string", "description": "Network identifier for this transaction", "example": "base-mainnet" }, "transactionHash": { "type": "string", "description": "The transaction hash of the completed withdrawal", "example": "0x9d260d1bbe075be0cda52a3271df062748f3182ede91b3aae5cd115f7b26552b" }, "userOpHash": { "type": "string", "description": "The UserOperation hash", "example": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" } }, "required": [ "network", "transactionHash" ], "additionalProperties": false }, "description": "Array of completed transactions, one per network" }, "errors": { "type": "array", "items": { "type": "object", "properties": { "network": { "type": "string", "description": "Network identifier where the error occurred", "example": "base-mainnet" }, "error": { "type": "string", "description": "Error message describing what went wrong", "example": "Insufficient balance for USDC: requested 100, available 50" } }, "required": [ "network", "error" ], "additionalProperties": false }, "description": "Array of errors for networks that failed to complete" } }, "required": [ "transactions" ], "additionalProperties": false }, "AppList": { "type": "array", "items": { "$ref": "#/components/schemas/App" } }, "AppVersionList": { "type": "array", "items": { "$ref": "#/components/schemas/AppVersion" } }, "AppVersionAbilityList": { "type": "array", "items": { "$ref": "#/components/schemas/AppVersionAbility" } }, "AbilityList": { "type": "array", "items": { "$ref": "#/components/schemas/Ability" } }, "AbilityVersionList": { "type": "array", "items": { "$ref": "#/components/schemas/AbilityVersion" } }, "PolicyList": { "type": "array", "items": { "$ref": "#/components/schemas/Policy" } }, "PolicyVersionList": { "type": "array", "items": { "$ref": "#/components/schemas/PolicyVersion" } } }, "parameters": {} }, "paths": { "/apps": { "get": { "tags": [ "App" ], "summary": "Lists all applications", "operationId": "listApps", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppList" } } } }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app": { "post": { "tags": [ "App", "AppVersion" ], "summary": "Creates a new application", "operationId": "createApp", "security": [ { "siweAuth": [] } ], "requestBody": { "description": "Developer-defined application information", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppCreate" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/App" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{appId}": { "get": { "tags": [ "App" ], "summary": "Fetches an application", "operationId": "getApp", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/App" } } } }, "404": { "description": "Application not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "put": { "tags": [ "App" ], "summary": "Edits an application", "operationId": "editApp", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "description": "Developer-defined updated application details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppEdit" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/App" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "tags": [ "App", "AppVersion", "AppVersionAbility" ], "summary": "Deletes an application", "operationId": "deleteApp", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "responses": { "200": { "description": "OK - Resource successfully deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{appId}/undelete": { "post": { "tags": [ "App", "AppVersion", "AppVersionAbility" ], "summary": "Undeletes an application", "operationId": "undeleteApp", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "responses": { "200": { "description": "OK - Resource successfully undeleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{appId}/versions": { "get": { "tags": [ "AppVersion" ], "summary": "Fetches all versions of an application", "operationId": "getAppVersions", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppVersionList" } } } }, "404": { "description": "Application not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{appId}/version/{version}": { "get": { "tags": [ "AppVersion" ], "summary": "Fetches an application version", "operationId": "getAppVersion", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" }, { "schema": { "type": "number" }, "required": true, "description": "Version # of the target application version", "example": 3, "name": "version", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppVersion" } } } }, "404": { "description": "Application not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{appId}/version": { "post": { "tags": [ "AppVersion" ], "summary": "Creates an application version", "operationId": "createAppVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "responses": { "201": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppVersion" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{appId}/version/{version}/abilities": { "get": { "tags": [ "AppVersionAbility" ], "summary": "Lists all abilities for an application version", "operationId": "listAppVersionAbilities", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" }, { "schema": { "type": "number" }, "required": true, "description": "Version # of the target application version", "example": 3, "name": "version", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppVersionAbilityList" } } } }, "404": { "description": "Application or version not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{appId}/version/{appVersion}/ability/{abilityPackageName}": { "post": { "tags": [ "AppVersionAbility" ], "summary": "Creates an ability for an application version", "operationId": "createAppVersionAbility", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" }, { "schema": { "type": "number" }, "required": true, "description": "Version # of the target application version", "example": 3, "name": "appVersion", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "abilityPackageName", "in": "path" } ], "requestBody": { "description": "Ability configuration for the application version", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppVersionAbilityCreate" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppVersionAbility" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "put": { "tags": [ "AppVersionAbility" ], "summary": "Edits an ability for an application version", "operationId": "editAppVersionAbility", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" }, { "schema": { "type": "number" }, "required": true, "description": "Version # of the target application version", "example": 3, "name": "appVersion", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "abilityPackageName", "in": "path" } ], "requestBody": { "description": "Updated ability configuration for the application version", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppVersionAbilityEdit" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppVersionAbility" } } } }, "400": { "description": "Invalid input" }, "404": { "description": "Application, version, or ability not found" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "tags": [ "AppVersionAbility" ], "summary": "Deletes an ability for an application version", "operationId": "deleteAppVersionAbility", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" }, { "schema": { "type": "number" }, "required": true, "description": "Version # of the target application version", "example": 3, "name": "appVersion", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "abilityPackageName", "in": "path" } ], "responses": { "200": { "description": "OK - Resource successfully deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "400": { "description": "Invalid input" }, "404": { "description": "Application, version, or ability not found" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{appId}/version/{appVersion}/ability/{abilityPackageName}/undelete": { "post": { "tags": [ "AppVersionAbility" ], "summary": "Undeletes an ability for an application version", "operationId": "undeleteAppVersionAbility", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" }, { "schema": { "type": "number" }, "required": true, "description": "Version # of the target application version", "example": 3, "name": "appVersion", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "abilityPackageName", "in": "path" } ], "responses": { "200": { "description": "OK - Resource successfully undeleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "400": { "description": "Invalid input" }, "404": { "description": "Application, version, or ability not found" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{appId}/setActiveVersion": { "post": { "tags": [ "App" ], "summary": "Sets the active version of an application", "operationId": "setAppActiveVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "description": "The version to set as active", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppSetActiveVersion" } } } }, "responses": { "200": { "description": "OK - Active version successfully set", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "400": { "description": "Invalid input" }, "404": { "description": "Application or version not found" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/app/{abilityName}/execute": { "post": { "tags": [ "App", "Ability" ], "summary": "Executes an ability for multiple delegators in batch", "description": "Executes a Vincent ability for multiple delegators using a shared delegatee private key. Each delegator can have custom parameters that override the defaults. The delegatee app ID is automatically looked up from the private key.", "operationId": "executeBatchAbility", "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "URL-friendly ability name (e.g., \"relay-link\")", "example": "relay-link", "name": "abilityName", "in": "path" } ], "requestBody": { "description": "Batch execution request with delegatee credentials and delegator parameters", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecuteBatchAbilityRequest" } } } }, "responses": { "200": { "description": "Batch execution completed (some delegators may have failed, check individual results)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecuteBatchAbilityResponse" } } } }, "400": { "description": "Invalid input (missing required fields or invalid delegators array)" }, "500": { "description": "Server error (ability not supported, app not found, etc.)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/abilities": { "get": { "tags": [ "Ability" ], "summary": "Lists all abilities", "operationId": "listAllAbilities", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityList" } } } }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/ability/{packageName}": { "post": { "tags": [ "Ability", "AbilityVersion" ], "summary": "Creates a new ability", "operationId": "createAbility", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "requestBody": { "description": "Developer-defined ability details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityCreate" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ability" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "get": { "tags": [ "Ability" ], "summary": "Fetches an ability", "operationId": "getAbility", "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ability" } } } }, "404": { "description": "Ability not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "put": { "tags": [ "Ability" ], "summary": "Edits an ability", "operationId": "editAbility", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "requestBody": { "description": "Developer-defined updated ability details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityEdit" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ability" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "tags": [ "Ability", "AbilityVersion" ], "summary": "Deletes an ability and all its versions", "operationId": "deleteAbility", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "404": { "description": "Ability not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/ability/{packageName}/versions": { "get": { "tags": [ "AbilityVersion" ], "summary": "Fetches all versions of an ability", "operationId": "getAbilityVersions", "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityVersionList" } } } }, "404": { "description": "Ability not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/ability/{packageName}/owner": { "put": { "tags": [ "Ability" ], "summary": "Changes an ability's owner", "operationId": "changeAbilityOwner", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "requestBody": { "description": "Developer-defined updated ability details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangeOwner" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ability" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/ability/{packageName}/version/{version}": { "post": { "tags": [ "AbilityVersion" ], "summary": "Creates an ability version", "operationId": "createAbilityVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target ability version", "example": "2.1.0", "name": "version", "in": "path" } ], "requestBody": { "description": "Developer-defined version details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityVersionCreate" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityVersion" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "get": { "tags": [ "AbilityVersion" ], "summary": "Fetches an ability version", "operationId": "getAbilityVersion", "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target ability version", "example": "2.1.0", "name": "version", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityVersion" } } } }, "404": { "description": "Ability version not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "put": { "tags": [ "AbilityVersion" ], "summary": "Edits an ability version", "operationId": "editAbilityVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target ability version", "example": "2.1.0", "name": "version", "in": "path" } ], "requestBody": { "description": "Update version changes field", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityVersionEdit" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityVersion" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "tags": [ "AbilityVersion" ], "summary": "Deletes an ability version", "operationId": "deleteAbilityVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target ability version", "example": "2.1.0", "name": "version", "in": "path" } ], "responses": { "200": { "description": "OK - Resource successfully deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "400": { "description": "Invalid input" }, "404": { "description": "Ability or version not found" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/ability/{packageName}/undelete": { "post": { "tags": [ "Ability", "AbilityVersion" ], "summary": "Undeletes an ability and all its versions", "operationId": "undeleteAbility", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "404": { "description": "Ability not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/ability/{packageName}/version/{version}/undelete": { "post": { "tags": [ "AbilityVersion" ], "summary": "Undeletes an ability version", "operationId": "undeleteAbilityVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target ability version", "example": "2.1.0", "name": "version", "in": "path" } ], "responses": { "200": { "description": "OK - Resource successfully undeleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "400": { "description": "Invalid input" }, "404": { "description": "Ability or version not found" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/ability/{packageName}/version/{version}/refresh-policies": { "post": { "tags": [ "AbilityVersion" ], "summary": "Refreshes supported policies for an ability version", "operationId": "refreshAbilityVersionPolicies", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target ability version", "example": "2.1.0", "name": "version", "in": "path" } ], "responses": { "200": { "description": "OK - Policies successfully refreshed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbilityVersion" } } } }, "400": { "description": "Invalid input" }, "404": { "description": "Ability or version not found" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/policies": { "get": { "tags": [ "Policy" ], "summary": "Lists all policies", "operationId": "listAllPolicies", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyList" } } } }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/policy/{packageName}": { "post": { "tags": [ "Policy", "PolicyVersion" ], "summary": "Creates a new policy", "operationId": "createPolicy", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "requestBody": { "description": "Developer-defined policy details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyCreate" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "get": { "tags": [ "Policy" ], "summary": "Fetches a policy", "operationId": "getPolicy", "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "404": { "description": "Policy not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "put": { "tags": [ "Policy" ], "summary": "Edits a policy", "operationId": "editPolicy", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "requestBody": { "description": "Developer-defined updated policy details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyEdit" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "tags": [ "Policy", "PolicyVersion" ], "summary": "Deletes a policy and all its versions", "operationId": "deletePolicy", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "404": { "description": "Policy not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/policy/{packageName}/version/{version}": { "post": { "tags": [ "PolicyVersion" ], "summary": "Creates a new policy version", "operationId": "createPolicyVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target policy version", "example": "2.1.0", "name": "version", "in": "path" } ], "requestBody": { "description": "Developer-defined version details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyVersionCreate" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyVersion" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "get": { "tags": [ "PolicyVersion" ], "summary": "Fetches a policy version", "operationId": "getPolicyVersion", "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target policy version", "example": "2.1.0", "name": "version", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyVersion" } } } }, "404": { "description": "Policy version not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "put": { "tags": [ "PolicyVersion" ], "summary": "Edits a policy version", "operationId": "editPolicyVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target policy version", "example": "2.1.0", "name": "version", "in": "path" } ], "requestBody": { "description": "Update version changes field", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyVersionEdit" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyVersion" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "tags": [ "PolicyVersion" ], "summary": "Deletes a policy version", "operationId": "deletePolicyVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target policy version", "example": "2.1.0", "name": "version", "in": "path" } ], "responses": { "200": { "description": "OK - Resource successfully deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "400": { "description": "Invalid input" }, "404": { "description": "Policy or version not found" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/policy/{packageName}/versions": { "get": { "tags": [ "PolicyVersion" ], "summary": "Fetches all versions of a policy", "operationId": "getPolicyVersions", "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyVersionList" } } } }, "404": { "description": "Policy not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/policy/{packageName}/owner": { "put": { "tags": [ "Policy" ], "summary": "Changes a policy's owner", "operationId": "changePolicyOwner", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "requestBody": { "description": "Developer-defined updated policy details", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangeOwner" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Policy" } } } }, "400": { "description": "Invalid input" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/policy/{packageName}/undelete": { "post": { "tags": [ "Policy", "PolicyVersion" ], "summary": "Undeletes a policy and all its versions", "operationId": "undeletePolicy", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "404": { "description": "Policy not found" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/policy/{packageName}/version/{version}/undelete": { "post": { "tags": [ "PolicyVersion" ], "summary": "Undeletes a policy version", "operationId": "undeletePolicyVersion", "security": [ { "siweAuth": [] } ], "parameters": [ { "schema": { "type": "string" }, "required": true, "description": "The NPM package name", "example": "@vincent/foo-bar", "name": "packageName", "in": "path" }, { "schema": { "type": "string" }, "required": true, "description": "NPM semver of the target policy version", "example": "2.1.0", "name": "version", "in": "path" } ], "responses": { "200": { "description": "OK - Resource successfully undeleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericResultMessage" } } } }, "400": { "description": "Invalid input" }, "404": { "description": "Policy or version not found" }, "422": { "description": "Validation exception" }, "default": { "description": "Unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/{appId}/install-app": { "post": { "tags": [ "User" ], "summary": "Install an application for a user", "description": "Installs an app for a user. If the user has never installed the app, mints a PKP and permits the app. If the user previously uninstalled the app, re-enables it.", "operationId": "installApp", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallAppRequest" } } } }, "responses": { "200": { "description": "App installation data returned successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallAppResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "App not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/{appId}/complete-installation": { "post": { "tags": [ "User" ], "summary": "Complete app installation", "description": "Submits the signed EIP2771 data to Gelato relay to complete the installation", "operationId": "completeInstallation", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteInstallationRequest" } } } }, "responses": { "200": { "description": "Installation completed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteInstallationResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "App not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/{appId}/agent-account": { "post": { "tags": [ "User" ], "summary": "Get agent account address", "description": "Derives and verifies the agent smart account address for a user and app combination", "operationId": "getAgentAccount", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAgentAccountRequest" } } } }, "responses": { "200": { "description": "Agent account address returned successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAgentAccountResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "App not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/{appId}/uninstall-app": { "post": { "tags": [ "User" ], "summary": "Uninstall an application for a user", "description": "Generates EIP2771 data to sign for revoking permission for an agent to use a specific app version", "operationId": "uninstallApp", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UninstallAppRequest" } } } }, "responses": { "200": { "description": "Uninstall data returned successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UninstallAppResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "App not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/{appId}/complete-uninstall": { "post": { "tags": [ "User" ], "summary": "Complete app uninstall", "description": "Submits the signed EIP2771 data to Gelato relay to complete the uninstall", "operationId": "completeUninstall", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteUninstallRequest" } } } }, "responses": { "200": { "description": "Uninstall completed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteUninstallResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "App not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/{appId}/agent-funds": { "post": { "tags": [ "User" ], "summary": "Get agent funds", "description": "Returns the token balances held by the agent smart account for a user and app combination", "operationId": "getAgentFunds", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAgentFundsRequest" } } } }, "responses": { "200": { "description": "Agent funds returned successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAgentFundsResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "App not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/{appId}/request-withdraw": { "post": { "tags": [ "User" ], "summary": "Request withdrawal", "description": "Generates an ERC-4337 UserOperation for withdrawing tokens from the agent smart account back to the user. The user must sign the UserOperation to authorize the withdrawal.", "operationId": "requestWithdraw", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestWithdrawRequest" } } } }, "responses": { "200": { "description": "Withdrawal UserOperation returned successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestWithdrawResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "App not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/{appId}/complete-withdraw": { "post": { "tags": [ "User" ], "summary": "Complete withdrawal", "description": "Submits the signed UserOperation to the ZeroDev bundler to complete the withdrawal. The paymaster sponsors the gas.", "operationId": "completeWithdraw", "parameters": [ { "schema": { "type": "number" }, "required": true, "description": "ID of the target application", "example": 132, "name": "appId", "in": "path" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteWithdrawRequest" } } } }, "responses": { "200": { "description": "Withdrawal completed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteWithdrawResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "App not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "default": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } } } }