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

# List clients

> Fetches all clients for the authorized custodian with cursor-based pagination.




## OpenAPI

````yaml /openapi/custodian-api.yaml get /custodians/me/clients
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:
    get:
      tags:
        - Clients
      summary: List clients
      description: >
        Fetches all clients for the authorized custodian with cursor-based
        pagination.
      operationId: listClients
      parameters:
        - name: cursor
          in: query
          required: false
          description: >-
            The ID of the last client in the list. Used for cursor-based
            pagination.
          schema:
            type: string
        - name: take
          in: query
          required: false
          description: The number of records to retrieve. Maximum is 100. Default is 100.
          schema:
            type: integer
            default: 100
            maximum: 100
      responses:
        '200':
          description: Clients retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientListResponse'
              example:
                results:
                  - createdAt: '2024-04-16T21:15:06.443Z'
                    custodian:
                      id: custodianId
                      name: Custodian Name
                    ejectedAt: null
                    environment:
                      id: environmentId
                      name: Development
                    id: clientId
                    isAccountAbstracted: false
                    metadata:
                      namespaces:
                        eip155:
                          address: '0x6e818d8f9b6c53c59a2d957d36c2146e28906195'
                          curve: SECP256K1
                    wallets:
                      - createdAt: '2024-04-16T21:15:45.144Z'
                        curve: SECP256K1
                        id: wallet1Id
                        backupSharePairs:
                          - backupMethod: PASSWORD
                            createdAt: '2024-04-16T21:16:48.723Z'
                            id: backupSharePairId1
                            status: completed
                        signingSharePairs:
                          - createdAt: '2024-04-16T21:15:45.151Z'
                            id: signingSharePairId1
                            status: completed
                        publicKey: stringifiedJSON
                metadata:
                  cursor: nextCursorToUse
                  take: 100
                  total: 1000
        '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:
  schemas:
    ClientListResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/ClientDetails'
        metadata:
          type: object
          properties:
            cursor:
              type: string
              nullable: true
              description: Cursor for the next page
            take:
              type: integer
              description: Number of records requested
            total:
              type: integer
              description: Total number of clients
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
    ClientDetails:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
          description: When the client was created
        custodian:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        ejectedAt:
          type: string
          format: date-time
          nullable: true
          description: When the client was ejected, or null
        environment:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
              description: Environment name (e.g. "Development", "Production")
        id:
          type: string
          description: Client ID
        isAccountAbstracted:
          type: boolean
          description: Whether the client uses account abstraction
        metadata:
          type: object
          properties:
            namespaces:
              type: object
              description: Chain-keyed map of wallet addresses and metadata.
              additionalProperties:
                type: object
                properties:
                  address:
                    type: string
                  curve:
                    type: string
                    enum:
                      - SECP256K1
                      - ED25519
        wallets:
          type: array
          items:
            $ref: '#/components/schemas/Wallet'
    Wallet:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        curve:
          type: string
          enum:
            - SECP256K1
            - ED25519
        id:
          type: string
        ejectableUntil:
          type: string
          format: date-time
          nullable: true
        publicKey:
          type: string
          nullable: true
          description: JSON-stringified public key
        backupSharePairs:
          type: array
          items:
            $ref: '#/components/schemas/BackupSharePair'
        signingSharePairs:
          type: array
          items:
            $ref: '#/components/schemas/SigningSharePair'
    BackupSharePair:
      type: object
      properties:
        backupMethod:
          type: string
          enum:
            - PASSWORD
            - GDRIVE
            - ICLOUD
        createdAt:
          type: string
          format: date-time
        id:
          type: string
        status:
          type: string
          enum:
            - completed
            - incomplete
    SigningSharePair:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        id:
          type: string
        status:
          type: string
          enum:
            - completed
            - incomplete
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Portal API Key (Custodian API Key). Pass as a Bearer token in the
        Authorization header.

````