curl --request POST \ --url '/v1/portfolios/create-from-template' \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: your_api_key_here' \ --data '{ "templateId": "tmpl_xyz789", "userAddress": "0xYourWalletAddress", "chainIds": [8453], "name": "My Custom Template Portfolio", "description": "Created from a template with custom name", "accountIndex": 0 }'
{ "success": true, "data": { "portfolioId": "port_def456", "message": "Portfolio created from template successfully", "vaults": [ { "chainId": "8453", "address": "0xPortfolioVaultAddress" } ], "template": { "blueprintId": "tmpl_xyz789", "editId": "edit_def456", "version": 1, "name": "My Custom Template Portfolio" } }, "correlationId": "corr_abc123", "requestId": "req_xyz789", "timestamp": "2023-05-21T12:34:56.789Z" }
Create a new portfolio from a pre-defined template