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

# Recover the client's wallet

> Recovers signing shares for the wallet using backup shares. After storing
the recovered MPC shares, confirm storage with the Client API's update
signing share pairs statuses endpoint before attempting to sign.




## OpenAPI

````yaml /openapi/enclave-mpc-api.yaml post /v1/recover
openapi: 3.1.0
info:
  title: Portal Enclave MPC API
  version: '1.0'
  description: |
    The Enclave MPC API provides endpoints for MPC wallet generation, signing,
    backup, and recovery. All endpoints require a Client API Key or Client
    Session Token as a Bearer token.

    ## Base URL
    `https://mpc-client.portalhq.io`
servers:
  - url: https://mpc-client.portalhq.io
security:
  - bearerAuth: []
tags:
  - name: MPC Operations
    description: MPC wallet generation, signing, asset transfers, backup, and recovery
paths:
  /v1/recover:
    post:
      tags:
        - MPC Operations
      summary: Recover the client's wallet
      description: >
        Recovers signing shares for the wallet using backup shares. After
        storing

        the recovered MPC shares, confirm storage with the Client API's update

        signing share pairs statuses endpoint before attempting to sign.
      operationId: recover
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecoverRequest'
            example:
              backupResponse: >-
                {"SECP256K1":{"share":"share","id":"shareId"},"ED25519":{"share":"share","id":"shareId"}}
      responses:
        '200':
          description: Wallet recovered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MpcShareResponse'
              example:
                SECP256K1:
                  share: eyJjbGl...
                  id: clu32l6c8008wuvz52jokyo3r
                ED25519:
                  share: eyJjbGl...
                  id: clu32l9310087evz5u5v9k1ao
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MpcErrorResponse'
              example:
                id: BAD_REQUEST
                message: Can't parse the request body
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
              example: Authorization header is missing
components:
  schemas:
    RecoverRequest:
      type: object
      description: Request body for recovering a wallet.
      properties:
        backupResponse:
          type: string
          description: |
            JSON-stringified response body from the backup endpoint.
      required:
        - backupResponse
    MpcShareResponse:
      type: object
      description: MPC shares for both supported curves.
      properties:
        SECP256K1:
          $ref: '#/components/schemas/MpcShare'
        ED25519:
          $ref: '#/components/schemas/MpcShare'
      required:
        - SECP256K1
        - ED25519
    MpcErrorResponse:
      type: object
      description: Standard error response from the Enclave MPC API.
      properties:
        id:
          type: string
          description: >-
            Short error identifier (e.g. `DKG_FAILED`, `BAD_REQUEST`,
            `RPC_OP_FAILED`).
        message:
          type: string
          description: Human-readable error details.
      required:
        - id
    MpcShare:
      type: object
      description: An MPC share for a single curve.
      properties:
        share:
          type: string
          description: The MPC share data (base64-encoded).
        id:
          type: string
          description: Unique identifier for this share.
      required:
        - share
        - id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Client API Key or Client Session Token

````