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

# Refresh all VTXOs

> Registers all spendable VTXOs for refresh in the next Ark round. The input VTXOs are locked immediately and will be forfeited once the round completes, yielding new VTXOs with a fresh expiry. The background daemon automatically participates in the round and progresses it to completion. Use the `rounds` endpoint to track progress.



## OpenAPI

````yaml https://gitlab.com/ark-bitcoin/bark/-/raw/master/bark-rest/openapi.json post /api/v1/wallet/refresh/all
openapi: 3.1.0
info:
  title: barkd REST API
  description: >-
    A simple REST API for barkd, a wallet daemon for integrating bitcoin
    payments into your app over HTTP. Supports self-custodial Lightning, Ark,
    and on-chain out of the box.


    barkd is a long-running daemon best suited for always-on or
    high-connectivity environments like nodes, servers, desktops, and
    point-of-sale terminals.


    All endpoints return JSON. Amounts are denominated in satoshis.
  contact:
    name: Second Team
    email: hello@second.tech
  license:
    name: MIT
    identifier: MIT
  version: 0.1.4
servers: []
security:
  - bearer: []
tags:
  - name: boards
    description: Move on-chain bitcoin onto the Ark protocol.
  - name: exits
    description: Move bitcoin back on-chain without server cooperation.
  - name: fees
    description: Estimate fees for wallet operations before executing them.
  - name: lightning
    description: Create Lightning invoices and track receives.
  - name: onchain
    description: Manage barkd's on-chain bitcoin wallet.
  - name: wallet
    description: Manage Ark balances and VTXOs, send payments via Ark, LN, and on-chain.
  - name: bitcoin
    description: Query bitcoin network data.
  - name: notifications
    description: Receive real-time notifications from barkd.
paths:
  /api/v1/wallet/refresh/all:
    post:
      tags:
        - wallet
      summary: Refresh all VTXOs
      description: >-
        Registers all spendable VTXOs for refresh in the next Ark round. The
        input VTXOs are locked immediately and will be forfeited once the round
        completes, yielding new VTXOs with a fresh expiry. The background daemon
        automatically participates in the round and progresses it to completion.
        Use the `rounds` endpoint to track progress.
      operationId: refresh_all
      responses:
        '200':
          description: Returns the refresh result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingRoundInfo'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    PendingRoundInfo:
      type: object
      required:
        - id
        - status
        - participation
        - unlock_hash
        - funding_txid
      properties:
        funding_tx_hex:
          type:
            - string
            - 'null'
        funding_txid:
          type:
            - string
            - 'null'
          description: The round transaction id, if already assigned
        id:
          type: integer
          format: int32
          description: Unique identifier for the round
          minimum: 0
        participation:
          $ref: '#/components/schemas/RoundParticipationInfo'
          description: the round participation details
        status:
          $ref: '#/components/schemas/RoundStatus'
          description: the current status of the round
        unlock_hash:
          type:
            - string
            - 'null'
    InternalServerError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    RoundParticipationInfo:
      type: object
      required:
        - inputs
        - outputs
      properties:
        inputs:
          type: array
          items:
            type: string
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/VtxoRequestInfo'
    RoundStatus:
      oneOf:
        - type: object
          description: Failed to sync round
          required:
            - error
            - status
          properties:
            error:
              type: string
            status:
              type: string
              enum:
                - sync-error
        - type: object
          description: The round was successful and is fully confirmed
          required:
            - funding_txid
            - status
          properties:
            funding_txid:
              type: string
            status:
              type: string
              enum:
                - confirmed
        - type: object
          description: Round successful but not fully confirmed
          required:
            - funding_txid
            - status
          properties:
            funding_txid:
              type: string
            status:
              type: string
              enum:
                - unconfirmed
        - type: object
          description: We have unsigned funding transactions that might confirm
          required:
            - status
          properties:
            status:
              type: string
              enum:
                - pending
        - type: object
          description: The round failed
          required:
            - error
            - status
          properties:
            error:
              type: string
            status:
              type: string
              enum:
                - failed
        - type: object
          description: The round canceled
          required:
            - status
          properties:
            status:
              type: string
              enum:
                - canceled
    VtxoRequestInfo:
      type: object
      required:
        - amount_sat
        - policy_type
        - user_pubkey
      properties:
        amount_sat:
          type: integer
          format: int64
          minimum: 0
        policy_type:
          type: string
        user_pubkey:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: AuthToken
      description: Base64url-encoded auth token

````