> ## Documentation Index
> Fetch the complete documentation index at: https://docs.groundtech.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a MicroVault

> Deploys a MicroVault and ERC-20 share token with the selected base asset, token metadata, and fee policy. Returns a task while provisioning.

Create a vault and its ERC-20 share token. The response contains a task that tracks deployment.


## OpenAPI

````yaml swagger/swagger-combined.yaml POST /v2/microvaults/vaults
openapi: 3.0.0
info:
  title: Ground API
  description: Core API for Portfolio Wallets, gtokens, MicroVaults, and webhooks.
  version: 2.0.0
servers:
  - url: https://sandbox.groundtech.co
  - url: https://production.groundtech.co
security:
  - bearerAuth: []
tags:
  - name: System
    description: System health and utility endpoints.
  - name: Sandbox Faucets
    description: Sandbox-only test token faucets.
  - name: Portfolio Wallets
    description: >-
      Portfolio wallets with strategy allocation, deposits, withdrawals, and
      yield positions.
  - name: gVaults
    description: >-
      Direct access to gtokens with deposit access controls and optional fee
      wrappers.
  - name: MicroVaults
    description: >-
      Customer-owned onchain vaults with externally held ERC-20 shares. Private
      preview in sandbox on Ethereum Sepolia.
  - name: Webhook Endpoints
    description: Webhook endpoint management for portfolio wallet notifications.
paths:
  /v2/microvaults/vaults:
    post:
      tags:
        - MicroVaults
      summary: Create a MicroVault
      description: >-
        Deploys a MicroVault and ERC-20 share token with the selected base
        asset, token metadata, and fee policy. Returns a task while
        provisioning.
      operationId: createMicrovault
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
          description: >-
            Unique key for this intended change. Reuse it only when retrying the
            identical request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMicroVaultRequest'
      responses:
        '202':
          description: The operation was accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicroVaultTaskResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicroVaultError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: Conflicting request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicroVaultError'
components:
  schemas:
    CreateMicroVaultRequest:
      type: object
      additionalProperties: false
      required:
        - baseAsset
        - name
        - symbol
        - feeRecipient
        - managementFeeBps
        - performanceFeeBps
      properties:
        baseAsset:
          allOf:
            - $ref: '#/components/schemas/NonzeroEvmAddress'
          description: >-
            Token accepted for subscriptions and paid out on redemptions. Use
            the base-asset address from an available yield source on the vault's
            chain.
        name:
          type: string
          minLength: 1
          maxLength: 64
          description: Full ERC-20 share-token name shown in wallets and block explorers.
        symbol:
          type: string
          minLength: 1
          maxLength: 16
          description: Short ERC-20 ticker for the MicroVault shares, such as `acmeUSDC`.
        feeRecipient:
          allOf:
            - $ref: '#/components/schemas/NonzeroEvmAddress'
          description: >-
            Wallet or contract that receives newly minted shares when management
            or performance fees accrue.
        managementFeeBps:
          type: integer
          minimum: 0
          maximum: 9999
          description: >-
            Annual management fee in basis points. `100` means 1%; use `0` for
            no management fee.
        performanceFeeBps:
          type: integer
          minimum: 0
          maximum: 9999
          description: >-
            Fee on gains above the vault's high-water NAV in basis points.
            `1000` means 10%; use `0` for no performance fee.
      example:
        baseAsset: '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238'
        name: Acme Treasury MicroVault
        symbol: acmeUSDC
        feeRecipient: '0x76f8fc6667e239f83a547d4e16225d6a34f6fa22'
        managementFeeBps: 0
        performanceFeeBps: 0
    MicroVaultTaskResponse:
      type: object
      required:
        - task
      properties:
        task:
          allOf:
            - $ref: '#/components/schemas/MicroVaultTask'
          description: >-
            Asynchronous change accepted for submission and onchain
            confirmation.
      example:
        task:
          id: 924c9b2d-3a9c-4b1a-b470-c73fc9b97c06
          kind: update_strategy
          status: submitted
          vaultId: d9902b20-6499-4465-a4c3-5d2208182f79
          txHashes:
            - '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
          error: null
          createdAt: '2026-09-10T18:42:10.000Z'
          updatedAt: '2026-09-10T18:42:12.000Z'
    MicroVaultError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: invalid_request
          description: Stable machine-readable error code.
        message:
          type: string
          nullable: true
          example: allocation targets and idleTargetBps must total 10000
          description: >-
            Human-readable explanation of why the request failed, when
            available.
        details:
          nullable: true
          description: Structured context for the error, when available.
      example:
        error: invalid_request
        message: allocation targets and idleTargetBps must total 10000
    NonzeroEvmAddress:
      type: string
      description: >-
        Valid nonzero EVM EOA or contract address. Mixed-case values must use a
        valid EIP-55 checksum.
      minLength: 42
      maxLength: 42
      pattern: ^0x(?!0{40}$)[0-9a-fA-F]{40}$
      example: '0x3bf25a73a1f1033c2d50ac65f3c9d6a44123db81'
    MicroVaultTask:
      type: object
      additionalProperties: false
      required:
        - id
        - kind
        - status
        - vaultId
        - txHashes
        - error
        - createdAt
        - updatedAt
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/UuidV4'
          description: Identifier for tracking this requested MicroVault change.
        kind:
          type: string
          enum:
            - provision_vault
            - update_strategy
            - update_source_mode
            - update_fees
            - update_pause
            - add_shareholder
            - remove_shareholder
            - rebalance
          description: Change being performed by this public API task.
        status:
          type: string
          enum:
            - queued
            - submitting
            - submitted
            - confirmed
            - failed
          description: Current submission and onchain-confirmation state of the change.
        vaultId:
          allOf:
            - $ref: '#/components/schemas/UuidV4'
          nullable: true
          description: >-
            Ground MicroVault identifier affected by the task, or `null` until a
            new vault record exists.
        txHashes:
          type: array
          items:
            type: string
            pattern: ^0x[0-9a-fA-F]{64}$
          description: Onchain transaction hashes submitted for this task.
        error:
          type: string
          nullable: true
          description: Failure reason when `status` is `failed`; otherwise `null`.
        createdAt:
          type: string
          format: date-time
          description: Time when Ground accepted the change.
        updatedAt:
          type: string
          format: date-time
          description: Time when the task status last changed.
      example:
        id: 924c9b2d-3a9c-4b1a-b470-c73fc9b97c06
        kind: update_strategy
        status: submitted
        vaultId: d9902b20-6499-4465-a4c3-5d2208182f79
        txHashes:
          - '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
        error: null
        createdAt: '2026-09-10T18:42:10.000Z'
        updatedAt: '2026-09-10T18:42:12.000Z'
    AuthErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Authentication or authorization error message.
        message:
          type: string
          nullable: true
          description: Additional auth middleware detail, when present.
        code:
          type: string
          nullable: true
          enum:
            - unauthenticated
            - forbidden
          description: >-
            Some auth and scope failures include a stable code; middleware
            errors may omit it.
    UuidV4:
      type: string
      format: uuid
      pattern: >-
        ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
      example: 8f4c52d7-62ab-4db9-a964-92f481f6b851
  responses:
    Unauthorized:
      description: >-
        The request is missing a valid bearer token, or the token is invalid or
        expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthErrorResponse'
          example:
            error: Unauthenticated request
            message: Missing or invalid bearer token
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````