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

# Get ejectable backup shares

> Fetches a client's encrypted backup share (if previously sent to Portal) and their
custodian backup share. Used when running eject while using the Enclave MPC API
with a Portal-Managed Backup configuration.

**Your custodian must be using Portal-Managed Backups to use this endpoint.**




## OpenAPI

````yaml /openapi/custodian-api.yaml get /custodians/me/clients/{clientId}/wallets/{walletId}/ejectable-backup-shares
openapi: 3.1.0
info:
  title: Portal Custodian API
  version: '3.0'
  description: >
    The Portal Custodian API provides endpoints for managing clients, building
    transactions,

    retrieving wallet data, managing delegations, alert webhooks, and gas
    sponsorship.

    All endpoints require authentication via a Portal API Key (also known as a
    Custodian API Key)

    passed as a Bearer token.


    ## Base URL

    `https://api.portalhq.io/api/v3`


    ## Authentication

    Include your Portal API Key as a Bearer token in the `Authorization` header
    of every request.


    ## Chain ID Format

    Chain parameters use either friendly names (e.g. `ethereum`, `solana`) or
    CAIP-2 format

    (e.g. `eip155:1`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). When using
    CAIP-2 format

    in URLs, ensure the colon is URI-encoded (`%3A`).
servers:
  - url: https://api.portalhq.io/api/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Clients
    description: Create and manage Portal clients
  - name: Transactions
    description: Build and evaluate blockchain transactions
  - name: Wallet Metadata
    description: Retrieve wallet balances and NFTs
  - name: Wallet Shares
    description: Manage backup shares and wallet ejection
  - name: Delegations
    description: Manage token delegations and delegated transfers
  - name: Session Keys
    description: Build and send EIP-7702 session key user operations
  - name: Alert Webhooks
    description: Manage alert webhooks, external addresses, and replay failed events
  - name: Gas Sponsorship
    description: View and manage gas sponsorship across chains
paths:
  /custodians/me/clients/{clientId}/wallets/{walletId}/ejectable-backup-shares:
    get:
      tags:
        - Wallet Shares
      summary: Get ejectable backup shares
      description: >
        Fetches a client's encrypted backup share (if previously sent to Portal)
        and their

        custodian backup share. Used when running eject while using the Enclave
        MPC API

        with a Portal-Managed Backup configuration.


        **Your custodian must be using Portal-Managed Backups to use this
        endpoint.**
      operationId: getEjectableBackupShares
      parameters:
        - $ref: '#/components/parameters/clientId'
        - $ref: '#/components/parameters/walletId'
      responses:
        '200':
          description: Backup shares retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EjectableBackupSharesResponse'
              example:
                encryptedClientBackupShare: 0351cf2baa54748662a6c89bb032...
                custodianBackupShare: '{"backupSharePairId":"...","share":"...","ssid":"..."}'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    clientId:
      name: clientId
      in: path
      required: true
      description: The unique identifier of the client.
      schema:
        type: string
    walletId:
      name: walletId
      in: path
      required: true
      description: The unique identifier of the wallet.
      schema:
        type: string
  schemas:
    EjectableBackupSharesResponse:
      type: object
      properties:
        encryptedClientBackupShare:
          type: string
          nullable: true
          description: The encrypted client backup share, or null if not available.
        custodianBackupShare:
          type: string
          description: JSON-stringified custodian backup share data.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Portal API Key (Custodian API Key). Pass as a Bearer token in the
        Authorization header.

````