> ## 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.

# List events for a webhook

> Returns a cursor-paginated delivery event feed for one webhook.



## OpenAPI

````yaml swagger/v3.yaml GET /v3/webhooks/{id}/events
openapi: 3.0.0
info:
  title: Ground API
  description: API for Portfolio Wallets, gtokens, MicroVaults, and webhooks.
  version: 3.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.
  - name: Webhook Endpoints
    description: Webhook endpoint management for portfolio wallet notifications.
paths:
  /v3/webhooks/{id}/events:
    get:
      tags:
        - Webhooks
      summary: List events for a webhook
      description: Returns a cursor-paginated delivery event feed for one webhook.
      operationId: listWebhookEventsByWebhook
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
          description: Webhook ID.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: Opaque cursor from the previous page.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
            minimum: 1
            maximum: 100
          description: Maximum number of events to return.
      responses:
        '200':
          description: Webhook event feed
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookEventFeedItem'
                  nextCursor:
                    type: string
                    nullable: true
              example:
                data:
                  - id: 73a8e0c9-c20d-4b10-b9a4-0f0ff6b5cb9c
                    registrationId: 6b6a0502-9d38-4f94-83fe-06706adbdc51
                    eventType: portfolio_wallet.withdrawal.status_changed
                    payload:
                      event: portfolio_wallet.withdrawal.status_changed
                      observedAt: '2026-05-01T17:35:39.000Z'
                      withdrawal:
                        id: a1f9e803-12a1-4f7c-8bb1-30277d1f6574
                        amountRequestedUsd: '65000.000000'
                        amountPaidUsd: '65000.000000'
                        amountPaidToPartnerUsd: '0.000000'
                        feeUsd: '0.000000'
                        destinationChain: ethereum
                        destinationAddress: '0x76F8fc6667E239f83a547d4e16225d6a34f6FA22'
                        destinationToken: usdc
                        status: completed
                        failureReason: null
                        createdAt: '2026-05-01T17:30:00.000Z'
                        completedAt: '2026-05-01T17:35:39.000Z'
                        legsCompleted: 1
                        legsTotal: 1
                        payoutLegs: []
                      walletId: 9d1a1c83-3a1c-4c14-9c5a-0c9a57a4a7db
                    status: completed
                    attemptCount: 1
                    deliveredAt: '2026-05-01T17:35:41.000Z'
                    lastError: null
                    createdAt: '2026-05-01T17:35:39.000Z'
                    updatedAt: '2026-05-01T17:35:41.000Z'
                    registration:
                      id: 6b6a0502-9d38-4f94-83fe-06706adbdc51
                      callbackUrl: https://ops.acme-treasury.com/webhooks/ground
                    latestEmission:
                      id: c177e6a4-2ee3-4ce0-b795-f092cb0e572d
                      eventId: 73a8e0c9-c20d-4b10-b9a4-0f0ff6b5cb9c
                      attemptNumber: 1
                      requestedAt: '2026-05-01T17:35:39.000Z'
                      completedAt: '2026-05-01T17:35:41.000Z'
                      responseStatus: 200
                      responseMs: 184
                      errorMessage: null
                nextCursor: null
        '400':
          description: Invalid ID format, cursor, or limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_id:
                  value:
                    error: id must be a valid UUID
                    code: validation_error
                invalid_cursor:
                  value:
                    error: cursor is invalid
                    code: invalid_cursor
                invalid_limit:
                  value:
                    error: limit must be a positive integer no greater than 100
                    code: validation_error
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    WebhookEventFeedItem:
      type: object
      description: A webhook delivery event and its latest delivery attempt.
      additionalProperties: false
      required:
        - id
        - registrationId
        - eventType
        - payload
        - status
        - attemptCount
        - deliveredAt
        - lastError
        - createdAt
        - updatedAt
        - registration
        - latestEmission
      properties:
        id:
          type: string
          format: uuid
        registrationId:
          type: string
          format: uuid
          description: ID of the webhook registration this event belongs to.
        eventType:
          type: string
          description: Event type that was delivered.
        payload:
          description: Delivered webhook body for this event; shape depends on `eventType`.
          oneOf:
            - $ref: '#/components/schemas/WebhookWalletStatusChangedPayload'
            - $ref: '#/components/schemas/WebhookDepositStatusChangedPayload'
            - $ref: '#/components/schemas/WebhookWithdrawalStatusChangedPayload'
            - $ref: '#/components/schemas/WebhookWithdrawalPayoutStatusChangedPayload'
            - $ref: '#/components/schemas/WebhookApprovalStatusChangedPayload'
            - $ref: '#/components/schemas/WebhookStrategyStatusChangedPayload'
            - $ref: '#/components/schemas/WebhookRebalanceStatusChangedPayload'
            - $ref: '#/components/schemas/WebhookRiskAlertTriggeredPayload'
            - $ref: '#/components/schemas/WebhookRiskAlertResolvedPayload'
            - $ref: '#/components/schemas/WebhookRiskActionStatusChangedPayload'
            - $ref: '#/components/schemas/WebhookRiskUnwindCompletedPayload'
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
        attemptCount:
          type: integer
        deliveredAt:
          type: string
          format: date-time
          nullable: true
        lastError:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        registration:
          type: object
          nullable: true
          additionalProperties: false
          required:
            - id
            - callbackUrl
          properties:
            id:
              type: string
              format: uuid
            callbackUrl:
              type: string
              format: uri
        latestEmission:
          type: object
          nullable: true
          additionalProperties: false
          required:
            - id
            - eventId
            - attemptNumber
            - requestedAt
            - completedAt
            - responseStatus
            - responseMs
            - errorMessage
          properties:
            id:
              type: string
              format: uuid
            eventId:
              type: string
              format: uuid
            attemptNumber:
              type: integer
            requestedAt:
              type: string
              format: date-time
            completedAt:
              type: string
              format: date-time
              nullable: true
            responseStatus:
              type: integer
              nullable: true
            responseMs:
              type: integer
              nullable: true
            errorMessage:
              type: string
              nullable: true
    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. Use it for programmatic handling rather
            than parsing the error message.
          enum:
            - validation_error
            - unknown_parameters
            - payload_too_large
            - unsupported_media_type
            - submission_id_conflict
            - feedback_unavailable
            - unsupported_chain
            - unsupported_token
            - invalid_destination_address
            - stellar_destination_account_not_active
            - stellar_destination_usdc_not_enabled
            - 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
            - stale_rebalance_plan
            - stale_wallet_strategy
            - 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
            - operation_not_supported
            - wallet_withdrawal_active
            - stellar_customer_approval_unavailable
            - withdrawal_signing_required
            - wallet_performance_unavailable
            - tempo_beta_transfer_limit_exceeded
            - product_not_enabled
            - gvault_not_found
            - allowlist_update_pending
            - fee_wrapper_not_found
            - fee_wrapper_fee_update_pending
            - statement_too_large
            - no_reportable_wallets
            - report_timeout
            - read_only_api_key
    WebhookWalletStatusChangedPayload:
      type: object
      description: Delivered for `portfolio_wallet.status_changed`.
      required:
        - event
        - organizationId
        - walletId
        - previousStatus
        - status
        - occurredAt
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.status_changed
        organizationId:
          type: string
          format: uuid
        walletId:
          type: string
          format: uuid
        previousStatus:
          type: string
          nullable: true
          description: >-
            Previous wallet status when known; null when not tracked for this
            transition.
        status:
          type: string
          enum:
            - creating
            - idle
            - withdrawal_active
            - rebalance_active
            - withdrawal_and_rebalance_active
            - failed
        occurredAt:
          type: string
          format: date-time
    WebhookDepositStatusChangedPayload:
      type: object
      description: Delivered for `portfolio_wallet.deposit.status_changed`.
      required:
        - event
        - walletId
        - observedAt
        - deposit
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.deposit.status_changed
        walletId:
          type: string
          format: uuid
        observedAt:
          type: string
          format: date-time
        deposit:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Deposit'
    WebhookWithdrawalStatusChangedPayload:
      type: object
      description: Delivered for `portfolio_wallet.withdrawal.status_changed`.
      required:
        - event
        - walletId
        - observedAt
        - withdrawal
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.withdrawal.status_changed
        walletId:
          type: string
          format: uuid
        observedAt:
          type: string
          format: date-time
        withdrawal:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Withdrawal'
    WebhookWithdrawalPayoutStatusChangedPayload:
      type: object
      description: Delivered for `portfolio_wallet.withdrawal.payout.status_changed`.
      required:
        - event
        - walletId
        - observedAt
        - payout
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.withdrawal.payout.status_changed
        walletId:
          type: string
          format: uuid
        observedAt:
          type: string
          format: date-time
        payout:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/WithdrawalWorkflowLeg'
          description: The payout workflow leg, matching an entry in withdrawal.payoutLegs.
    WebhookApprovalStatusChangedPayload:
      type: object
      description: Delivered for `portfolio_wallet.approval.status_changed`.
      additionalProperties: false
      required:
        - event
        - walletId
        - observedAt
        - approval
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.approval.status_changed
        walletId:
          type: string
          format: uuid
        observedAt:
          type: string
          format: date-time
        approval:
          type: object
          additionalProperties: false
          required:
            - activityId
            - activityKind
            - chain
            - status
            - requestedAt
            - validBefore
            - resolvedAt
          properties:
            activityId:
              type: string
            activityKind:
              type: string
              description: Approval purpose, such as external_payout.
            chain:
              type: string
            status:
              type: string
              enum:
                - pending
                - approved
                - rejected
                - expired
                - failed
            requestedAt:
              type: string
              format: date-time
            validBefore:
              type: string
              format: date-time
              nullable: true
            resolvedAt:
              type: string
              format: date-time
              nullable: true
    WebhookStrategyStatusChangedPayload:
      type: object
      description: Delivered for `portfolio_wallet.strategy.status_changed`.
      required:
        - event
        - walletId
        - observedAt
        - strategy
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.strategy.status_changed
        walletId:
          type: string
          format: uuid
        observedAt:
          type: string
          format: date-time
        strategy:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/StrategySnapshot'
    WebhookRebalanceStatusChangedPayload:
      type: object
      description: Delivered for `portfolio_wallet.rebalance.status_changed`.
      required:
        - event
        - walletId
        - observedAt
        - rebalance
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.rebalance.status_changed
        walletId:
          type: string
          format: uuid
        observedAt:
          type: string
          format: date-time
        rebalance:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/WalletRebalanceWorkflowActivity'
    WebhookRiskAlertTriggeredPayload:
      type: object
      description: Delivered for `portfolio_wallet.risk.alert.triggered`.
      required:
        - event
        - organizationId
        - portfolioWalletId
        - riskAlertId
        - riskRuleId
        - assetId
        - metric
        - ruleKind
        - comparator
        - thresholdValue
        - observedValue
        - baselineValue
        - observedChangePct
        - windowSeconds
        - status
        - metricsObservationId
        - explanation
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.risk.alert.triggered
        organizationId:
          type: string
          format: uuid
        portfolioWalletId:
          type: string
          format: uuid
        riskAlertId:
          type: string
          format: uuid
        riskRuleId:
          type: string
          format: uuid
        assetId:
          type: string
          nullable: true
          description: Catalog asset UUID the rule targets; null for wallet-level metrics.
        metric:
          type: string
          description: Metric the rule evaluates (e.g. `apy_pct`, `tvl_usd`).
        ruleKind:
          type: string
          description: Rule kind (e.g. `threshold`, `relative_change`).
        comparator:
          type: string
          description: Comparison operator (e.g. `lt`, `gt`).
        thresholdValue:
          type: number
          nullable: true
        observedValue:
          type: number
          nullable: true
        baselineValue:
          type: number
          nullable: true
        observedChangePct:
          type: number
          nullable: true
        windowSeconds:
          type: number
          nullable: true
        status:
          type: string
          description: Alert status at emission time (`triggered`).
        metricsObservationId:
          type: string
          format: uuid
          nullable: true
        triggeredAt:
          type: string
          format: date-time
          description: Present when the trigger timestamp is known.
        explanation:
          type: object
          additionalProperties: true
          description: Free-form human-readable context for the alert.
    WebhookRiskAlertResolvedPayload:
      type: object
      description: Delivered for `portfolio_wallet.risk.alert.resolved`.
      required:
        - event
        - organizationId
        - portfolioWalletId
        - riskAlertId
        - riskRuleId
        - assetId
        - metric
        - ruleKind
        - comparator
        - thresholdValue
        - observedValue
        - baselineValue
        - observedChangePct
        - windowSeconds
        - status
        - metricsObservationId
        - explanation
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.risk.alert.resolved
        organizationId:
          type: string
          format: uuid
        portfolioWalletId:
          type: string
          format: uuid
        riskAlertId:
          type: string
          format: uuid
        riskRuleId:
          type: string
          format: uuid
        assetId:
          type: string
          nullable: true
          description: Catalog asset UUID the rule targets; null for wallet-level metrics.
        metric:
          type: string
          description: Metric the rule evaluates (e.g. `apy_pct`, `tvl_usd`).
        ruleKind:
          type: string
          description: Rule kind (e.g. `threshold`, `relative_change`).
        comparator:
          type: string
          description: Comparison operator (e.g. `lt`, `gt`).
        thresholdValue:
          type: number
          nullable: true
        observedValue:
          type: number
          nullable: true
        baselineValue:
          type: number
          nullable: true
        observedChangePct:
          type: number
          nullable: true
        windowSeconds:
          type: number
          nullable: true
        status:
          type: string
          description: Alert status at emission time (`resolved`).
        metricsObservationId:
          type: string
          format: uuid
          nullable: true
        triggeredAt:
          type: string
          format: date-time
          description: Present when the trigger timestamp is known.
        resolvedAt:
          type: string
          format: date-time
          description: Present when the resolution timestamp is known.
        resolutionSource:
          type: string
          description: >-
            What resolved the alert (e.g. `metric_recovered`, `manual`). Present
            when known.
        resolutionNote:
          type: string
          description: Optional human-entered note. Present when set.
        explanation:
          type: object
          additionalProperties: true
          description: Free-form human-readable context for the alert.
    WebhookRiskActionStatusChangedPayload:
      type: object
      description: Delivered for `portfolio_wallet.risk.action.status_changed`.
      required:
        - event
        - organizationId
        - portfolioWalletId
        - riskActionId
        - riskAlertId
        - riskRuleId
        - assetId
        - outcome
        - approvalMode
        - previousStatus
        - status
        - attemptCount
        - executionVersion
        - rebalanceId
        - changedAt
        - executionError
        - explanation
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.risk.action.status_changed
        organizationId:
          type: string
          format: uuid
        portfolioWalletId:
          type: string
          format: uuid
        riskActionId:
          type: string
          format: uuid
        riskAlertId:
          type: string
          format: uuid
        riskRuleId:
          type: string
          format: uuid
        assetId:
          type: string
          nullable: true
          description: >-
            Catalog asset UUID the action targets; null for wallet-level
            actions.
        outcome:
          type: string
          description: >-
            Configured action outcome (e.g. `exit_position`,
            `prevent_additional_allocation`).
        approvalMode:
          type: string
          description: How execution is approved (e.g. `automatic`, `manual`).
        previousStatus:
          type: string
          nullable: true
        status:
          type: string
        attemptCount:
          type: number
          nullable: true
        executionVersion:
          nullable: true
          oneOf:
            - type: number
            - type: string
          description: Monotonic execution version used for idempotent status transitions.
        rebalanceId:
          type: string
          format: uuid
          nullable: true
          description: Rebalance workflow executing this action, when one exists.
        changedAt:
          type: string
          format: date-time
        executionError:
          type: object
          nullable: true
          additionalProperties: true
          description: Structured execution error when the action failed; null otherwise.
        explanation:
          type: object
          additionalProperties: true
          description: Free-form human-readable context for the action.
    WebhookRiskUnwindCompletedPayload:
      type: object
      description: >-
        Delivered for `portfolio_wallet.risk.unwind.completed` when a
        risk-triggered unwind finishes moving value to cash.
      required:
        - event
        - organizationId
        - portfolioWalletId
        - riskActionId
        - riskAlertId
        - riskRuleId
        - rebalanceId
        - assetId
        - assetLabel
        - completedRebalanceLegId
        - completedSourceAccountId
        - cashDestinationAssetId
        - cashDestinationChain
        - cashDestinationToken
        - completedAmountNativeUnits
        - completedAt
        - occurredAt
        - explanation
      properties:
        event:
          type: string
          enum:
            - portfolio_wallet.risk.unwind.completed
        organizationId:
          type: string
          format: uuid
        portfolioWalletId:
          type: string
          format: uuid
        riskActionId:
          type: string
          format: uuid
        riskAlertId:
          type: string
          format: uuid
        riskRuleId:
          type: string
          format: uuid
        rebalanceId:
          type: string
          format: uuid
        assetId:
          type: string
          nullable: true
          description: Catalog asset UUID that was unwound.
        assetLabel:
          type: string
          nullable: true
        completedRebalanceLegId:
          type: string
          nullable: true
        completedSourceAccountId:
          type: string
          nullable: true
        cashDestinationChain:
          type: string
          nullable: true
        cashDestinationToken:
          type: string
          nullable: true
        completedAmountNativeUnits:
          nullable: true
          oneOf:
            - type: string
            - type: number
          description: Amount moved to cash in the source account's native base units.
        completedAt:
          type: string
          format: date-time
          nullable: true
        eventId:
          type: string
          format: uuid
          description: >-
            Risk event id backing this notification. Present when the event row
            was recorded.
        occurredAt:
          type: string
          format: date-time
        explanation:
          type: object
          additionalProperties: true
          description: Free-form human-readable context for the unwind.
        cashDestinationAssetId:
          type: string
          format: uuid
          nullable: true
          description: Catalog UUID of the destination cash asset.
    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
          description: >-
            Some auth and scope failures include a stable code; middleware
            errors may omit it.
    Deposit:
      type: object
      required:
        - id
        - walletId
        - amount
        - token
        - chain
        - fromAddress
        - txHash
        - status
        - assetId
        - createdAt
        - completedAt
      properties:
        id:
          type: string
          format: uuid
        walletId:
          type: string
          format: uuid
          description: Portfolio wallet credited by this deposit.
        amount:
          type: string
          description: >-
            Deposit amount as a fixed six-decimal USD string (e.g.
            "100.500000").
          nullable: true
        token:
          type: string
          description: Deposited stablecoin.
          enum:
            - usdc
            - usdt
            - ousd
          nullable: true
        chain:
          type: string
          description: Chain where the deposit was detected.
          enum:
            - arbitrum
            - base
            - ethereum
            - ethereum_sepolia
            - polygon
            - solana
            - solana_devnet
            - stellar
            - stellar_testnet
            - tempo
            - tempo_moderato
            - tron
            - tron_shasta
        fromAddress:
          type: string
          nullable: true
        txHash:
          type: string
          nullable: true
          description: On-chain transaction hash.
        status:
          type: string
          nullable: true
          enum:
            - processing
            - completed
            - failed
          description: >-
            Deposit status. `processing` can mean the deposit was detected
            before finality for a workflow-idle wallet and is not yet credited
            to balances.
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            Populated after the deposit finalizes and posts; null while
            processing.
        assetId:
          $ref: '#/components/schemas/AssetId'
    Withdrawal:
      type: object
      required:
        - id
        - amountRequestedUsd
        - amountPaidUsd
        - amountPaidToPartnerUsd
        - feeUsd
        - destinationChain
        - destinationAddress
        - destinationToken
        - status
        - legsCompleted
        - legsTotal
        - payoutLegs
        - failureReason
        - createdAt
        - completedAt
      properties:
        id:
          type: string
          format: uuid
        amountRequestedUsd:
          type: string
          nullable: true
          description: Requested withdrawal amount in USD as a formatted string.
        amountPaidUsd:
          type: string
          nullable: true
          description: >-
            Completed payout amount in USD as a formatted string. Null until at
            least one payout completes.
        amountPaidToPartnerUsd:
          type: string
          nullable: true
          description: >-
            Confirmed amount paid to the partner in USD as a formatted string.
            Null until at least one partner payout completes.
        feeUsd:
          type: string
          nullable: true
          description: >-
            Execution and protocol fees charged for the withdrawal, as a
            formatted string.
        destinationChain:
          type: string
          description: Destination chain for the withdrawal.
          enum:
            - arbitrum
            - base
            - ethereum
            - ethereum_sepolia
            - polygon
            - solana
            - solana_devnet
            - stellar
            - stellar_testnet
            - tempo
            - tempo_moderato
            - tron
            - tron_shasta
        destinationAddress:
          type: string
        destinationToken:
          type: string
          enum:
            - usdc
            - usdt
            - ousd
          nullable: true
        memo:
          $ref: '#/components/schemas/StellarMemo'
        status:
          type: string
          enum:
            - processing
            - completed
            - partially_completed
            - failed
            - cancelled
          description: >-
            Simplified withdrawal status. `partially_completed` means at least
            one payout leg delivered value and at least one leg failed or was
            cancelled.
        failureReason:
          type: string
          nullable: true
          description: >-
            Human-readable reason for failure (only present when status is
            `failed` or `partially_completed`).
            `insufficient_proceeds_after_partner_fee` means realized proceeds
            could not cover the committed partner fee while leaving a positive
            customer payout, so no payout or partner fee was sent.
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
        legsCompleted:
          type: integer
        legsTotal:
          type: integer
        payoutLegs:
          type: array
          items:
            $ref: '#/components/schemas/WithdrawalWorkflowLeg'
          description: Source-to-destination payout workflow legs.
    WithdrawalWorkflowLeg:
      allOf:
        - $ref: '#/components/schemas/WalletWorkflowLeg'
        - type: object
          properties:
            processingEstimate:
              $ref: '#/components/schemas/WithdrawalProcessingTimeRange'
    StrategySnapshot:
      type: object
      description: >-
        Applied strategy update, as delivered on
        `portfolio_wallet.strategy.status_changed` webhooks.
      required:
        - walletId
        - requestId
        - status
        - allocations
        - createdAt
      properties:
        walletId:
          type: string
          format: uuid
        requestId:
          type: string
          format: uuid
          description: The `requestId` of the strategy update request that was applied.
        status:
          type: string
          enum:
            - completed
        allocations:
          $ref: '#/components/schemas/StrategyUpdateAllocationGroups'
          description: >-
            Targets applied by this update, grouped by allocation group. Each
            included group totals 100%; omitted groups are unchanged.
        createdAt:
          type: string
          format: date-time
    WalletRebalanceWorkflowActivity:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - created
            - processing
            - completed
            - failed
            - cancelled
        reason:
          type: string
          nullable: true
        amountUsd:
          type: string
          nullable: true
        failureReason:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
          nullable: true
        startedAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        legsCompleted:
          type: integer
        legsTotal:
          type: integer
        rebalanceLegs:
          type: array
          items:
            $ref: '#/components/schemas/WalletWorkflowLeg'
    AssetId:
      type: string
      format: uuid
      description: >-
        Immutable catalog asset UUID, shared by every wallet in this
        environment. Cash, funds, and stocks use the same identity. Read IDs
        from GET /v3/assets; do not derive them from names, symbols, or wallet
        account IDs.
    StellarMemo:
      type: object
      additionalProperties: false
      required:
        - type
        - value
      description: >-
        Optional recipient memo for Stellar withdrawals. Text is 1–28 UTF-8
        bytes without null characters. ID is an unsigned 64-bit integer string
        (0–18446744073709551615); leading zeros are normalized. Omit for no
        memo.
      properties:
        type:
          type: string
          enum:
            - id
            - text
        value:
          type: string
          minLength: 1
          maxLength: 28
      example:
        type: id
        value: '123456'
    WalletWorkflowLeg:
      type: object
      properties:
        assetTrades:
          type: array
          description: >-
            Completed stock conversions on this leg, derived from finalized
            ledger postings. No signed quote or purchaser credential is exposed.
          items:
            type: object
            required:
              - side
              - kind
              - assetId
              - assetSymbol
              - stockNativeUnits
              - cashNativeUnits
              - chain
              - token
              - txHash
            properties:
              side:
                type: string
                enum:
                  - buy
                  - sell
              kind:
                type: string
                enum:
                  - stock
              assetId:
                $ref: '#/components/schemas/PortfolioWalletYieldSourceId'
              assetSymbol:
                type: string
              stockNativeUnits:
                type: string
                pattern: ^[1-9]\d*$
              cashNativeUnits:
                type: string
                pattern: ^[1-9]\d*$
              chain:
                type: string
                enum:
                  - ethereum
                  - ethereum_sepolia
              token:
                type: string
                enum:
                  - usdc
              txHash:
                type: string
        status:
          type: string
          enum:
            - created
            - processing
            - pending_customer_approval
            - completed
            - failed
            - cancelled
        from:
          $ref: '#/components/schemas/WalletAccount'
        to:
          $ref: '#/components/schemas/WalletAccount'
        amountUsd:
          type: string
          nullable: true
          description: >-
            USD amount for this workflow leg. Null when no USD value is
            available.
        startedAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        stepsCompleted:
          type: integer
        stepsTotal:
          type: integer
        steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowStep'
        processingEstimate:
          $ref: '#/components/schemas/ProcessingTimeRange'
    WithdrawalProcessingTimeRange:
      type: object
      nullable: true
      additionalProperties: false
      description: >-
        Estimated elapsed seconds for the selected withdrawal route after
        applying provider calendars, holidays, and cutoffs. Bounds preserve
        day-level uncertainty when only settlement dates are known. A preview is
        anchored at the preview time; a workflow range is measured from request
        acceptance, not a countdown. Null means no reliable estimate is
        available. The upper bound is typical, not a guaranteed deadline.
      required:
        - min
        - max
        - unit
      properties:
        min:
          type: integer
          minimum: 0
          description: Lower end of the typical elapsed processing range in seconds.
        max:
          type: integer
          minimum: 0
          description: Upper end of the typical elapsed range in seconds, at least min.
        unit:
          type: string
          enum:
            - seconds
    StrategyUpdateAllocationGroups:
      type: object
      properties:
        usdc:crosschain:
          type: array
          items:
            $ref: '#/components/schemas/StrategyUpdateAllocation'
        usdt:ethereum:
          type: array
          items:
            $ref: '#/components/schemas/StrategyUpdateAllocation'
        usdt:tron:
          type: array
          items:
            $ref: '#/components/schemas/StrategyUpdateAllocation'
          description: >-
            Native TRON USDT allocations, independently weighted from Ethereum
            USDT. Each group totals 100 percent.
      description: >-
        Desired strategy targets grouped by compatible settlement stablecoin and
        network.
    PortfolioWalletYieldSourceId:
      $ref: '#/components/schemas/AssetId'
    WalletAccount:
      oneOf:
        - type: object
          properties:
            assetId:
              $ref: '#/components/schemas/AssetId'
            kind:
              type: string
              enum:
                - yield_source
            label:
              type: string
          required:
            - kind
            - label
            - assetId
        - type: object
          properties:
            assetId:
              $ref: '#/components/schemas/AssetId'
            kind:
              type: string
              enum:
                - cash
            label:
              type: string
          required:
            - kind
            - label
            - assetId
        - type: object
          properties:
            kind:
              type: string
              enum:
                - external_payout
            id:
              type: string
            label:
              type: string
        - type: object
          properties:
            kind:
              type: string
              enum:
                - bridge
            id:
              type: string
            label:
              type: string
        - type: object
          properties:
            kind:
              type: string
              enum:
                - unknown
            id:
              type: string
            label:
              type: string
        - type: object
          properties:
            assetId:
              $ref: '#/components/schemas/AssetId'
            kind:
              type: string
              enum:
                - stock
            label:
              type: string
          required:
            - kind
            - label
            - assetId
    WorkflowStep:
      type: object
      properties:
        name:
          type: string
        stepKind:
          type: string
          nullable: true
        sequenceRole:
          type: string
          nullable: true
        protocolType:
          type: string
          nullable: true
        stepOrdinal:
          type: integer
        chain:
          type: string
          nullable: true
        txKind:
          type: string
          nullable: true
        txHash:
          type: string
          nullable: true
          description: Transaction hash when available; null before a hash is known.
        state:
          type: string
          enum:
            - created
            - processing
            - pending_customer_approval
            - completed
            - failed
            - cancelled
        startedAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        cancelledAt:
          type: string
          format: date-time
          nullable: true
    ProcessingTimeRange:
      type: object
      nullable: true
      additionalProperties: false
      description: >-
        Estimated processing range, not a guaranteed deadline. min and max are
        nonnegative integers, max is at least min, and unit is seconds or
        banking_days. Null means no reliable range is available.
      required:
        - min
        - max
        - unit
      properties:
        min:
          type: integer
          minimum: 0
          description: Lower end of the typical processing range.
        max:
          type: integer
          minimum: 0
          description: >-
            Upper end of the typical range, at least min; not a guaranteed
            maximum.
        unit:
          type: string
          enum:
            - seconds
            - banking_days
          description: >-
            Unit for both bounds. Banking days use the applicable provider
            calendar and cutoff.
      title: Processing time range
    StrategyUpdateAllocation:
      oneOf:
        - $ref: '#/components/schemas/StrategyUpdateAllocationAssetTarget'
        - $ref: '#/components/schemas/StrategyUpdateAllocationCashTarget'
    StrategyUpdateAllocationAssetTarget:
      title: Investment target
      type: object
      additionalProperties: false
      required:
        - assetId
        - targetWeightPct
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        targetWeightPct:
          type: number
          multipleOf: 0.1
          minimum: 0
          maximum: 100
          description: >-
            Target percentage within this allocation group, in 0.1% increments.
            Each group totals 100%.
    StrategyUpdateAllocationCashTarget:
      title: Uninvested cash target
      type: object
      additionalProperties: false
      required:
        - kind
        - targetWeightPct
      properties:
        kind:
          type: string
          enum:
            - cash
          description: >-
            Keep this share of the group uninvested, without selecting a
            particular network cash asset.
        targetWeightPct:
          type: number
          multipleOf: 0.1
          minimum: 0
          maximum: 100
          description: >-
            Target percentage within this allocation group, in 0.1% increments.
            Each group totals 100%.
  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
    TooManyRequests:
      description: >-
        Rate limit exceeded. Limits are enforced by API key/customer identity
        and by endpoint class. Wait for the number of seconds in Retry-After,
        add a small random delay, then retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded
            code: rate_limited
    InternalServerError:
      description: >-
        An unexpected error occurred. Reconcile the original operation before
        retrying a write; preserve its required idempotency key and payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
            code: internal_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.