> ## 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 gVault webhook

Register an HTTPS endpoint for gVault and fee-wrapper lifecycle events. Store
the returned signing secret securely; Ground returns it only once.


## OpenAPI

````yaml swagger/swagger-combined.yaml POST /v2/gvaults/webhooks
openapi: 3.0.0
info:
  title: Ground API
  description: Core API for portfolio wallets, deposits, withdrawals, 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: App-specific Ground vaults with customer access and fee sharing.
  - name: Webhook Endpoints
    description: Webhook endpoint management for portfolio wallet notifications.
paths:
  /v2/gvaults/webhooks:
    post:
      tags:
        - gVault Webhooks
      summary: Create a gVault webhook
      operationId: createGVaultWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GVaultWebhookCreateRequest'
      responses:
        '200':
          description: Webhook created; secret is returned once.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GVaultWebhookEndpoint'
              example:
                id: 6b6a0502-9d38-4f94-83fe-06706adbdc51
                url: https://ops.acme.com/webhooks/ground-gvaults
                events:
                  - fee_wrapper.status_changed
                  - fee_wrapper.fees.status_changed
                secret: >-
                  4cfd6f64a0b5f9d6fd82f953db57f1c0f530f76513f93d41b495a321d797a6c0
                createdAt: '2026-09-03T17:32:08.000Z'
        '400':
          description: Invalid callback or event type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: Duplicate URL for this product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GVaultWebhookCreateRequest:
      type: object
      required:
        - url
        - events
      additionalProperties: false
      properties:
        url:
          type: string
          format: uri
        events:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            $ref: '#/components/schemas/GVaultWebhookEventType'
        description:
          type: string
          nullable: true
    GVaultWebhookEndpoint:
      type: object
      required:
        - id
        - url
        - events
        - createdAt
      additionalProperties: false
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
          format: uri
        events:
          type: array
          items:
            $ref: '#/components/schemas/GVaultWebhookEventType'
        secret:
          type: string
          description: Returned only when the webhook is created.
        createdAt:
          type: string
          format: date-time
      example:
        id: 6b6a0502-9d38-4f94-83fe-06706adbdc51
        url: https://ops.acme.com/webhooks/ground-gvaults
        events:
          - fee_wrapper.status_changed
          - fee_wrapper.fees.status_changed
        createdAt: '2026-09-03T17:32:08.000Z'
    ErrorResponse:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: >-
            Human-readable error message. May change without notice; do not
            parse programmatically.
        code:
          type: string
          description: >-
            Machine-readable error code. Stable across API versions — safe to
            switch on in client code.
          enum:
            - validation_error
            - unknown_parameters
            - unsupported_chain
            - unsupported_token
            - invalid_destination_address
            - precision_overflow
            - invalid_cursor
            - unauthenticated
            - forbidden
            - wallet_not_found
            - wallet_limit_reached
            - withdrawal_not_found
            - deposit_not_found
            - yield_source_not_found
            - wallet_projection_unavailable
            - insufficient_funds
            - duplicate_request_id
            - request_id_conflict
            - invalid_position_weight
            - invalid_withdrawal_plan
            - payout_not_found
            - webhook_not_found
            - webhook_duplicate_url
            - withdrawal_not_cancellable
            - withdrawal_already_cancelled
            - withdrawal_payout_in_progress
            - withdrawal_policy_required
            - workflow_conflict
            - payout_already_terminal
            - payout_in_progress
            - payout_not_retryable
            - address_book_entry_not_found
            - address_book_duplicate_entry
            - address_book_whitelist_violation
            - rate_limited
            - rate_limit_exceeded
            - internal_error
            - wallet_creation_failed
            - service_temporarily_unavailable
    GVaultWebhookEventType:
      type: string
      enum:
        - gvault.allowlist.status_changed
        - fee_wrapper.status_changed
        - fee_wrapper.fees.status_changed
        - fee_wrapper.allowlist.status_changed
    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.
  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

````