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

# Get the Recovery Agent for a particular World ID given its leaf index.

> If no recovery agent is set, the zero address is returned.



## OpenAPI

````yaml https://indexer.us.id-infra.worldcoin.dev/openapi.json post /recovery-agent
openapi: 3.1.0
info:
  title: world-id-indexer
  description: ''
  license:
    name: MIT
    identifier: MIT
  version: 0.1.5
servers: []
security: []
tags:
  - name: indexer
    description: >-
      World ID Indexer. Provides Merkle inclusion proofs and account information
      from the on-chain registry.
paths:
  /recovery-agent:
    post:
      tags:
        - indexer
      summary: Get the Recovery Agent for a particular World ID given its leaf index.
      description: If no recovery agent is set, the zero address is returned.
      operationId: handler
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IndexerQueryRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexerRecoveryAgentResponse'
components:
  schemas:
    IndexerQueryRequest:
      type: object
      description: |-
        Query for the indexer based on a leaf index.

        Used for getting inclusion proofs and signature nonces.
      required:
        - leaf_index
      properties:
        leaf_index:
          type: string
          format: hex
          description: |-
            The leaf index to query (from the `WorldIDRegistry`).

            Accepts decimal or `0x`/`0X`-prefixed hex input.
          example: '0x1'
    IndexerRecoveryAgentResponse:
      type: object
      description: Response containing the recovery agent from the indexer.
      required:
        - recovery_agent
      properties:
        recovery_agent:
          type: string
          format: hex
          description: >-
            The recovery agent for the World ID.


            Please note this may be the zero address if no recovery agent is set
            for the account.


            Serialized as a canonical `0x`-prefixed hex string.
          example: '0x0'

````