---
title: "Get the Recovery Agent for a particular World ID given its leaf index."
method: POST
path: "/recovery-agent"
tags: ["indexer"]
---

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

`POST /recovery-agent`

## Request

- Base URL: `https://indexer.us.id-infra.worldcoin.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://indexer.us.id-infra.worldcoin.dev/recovery-agent`
- Auth: none declared
- TypeScript: <https://skmtc.dev/worldcoin/apis/world-id-indexer/docs/recovery-agent/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Request body

- IndexerQueryRequest: Query for the indexer based on a leaf index. Used for getting inclusion proofs and signature nonces.
  - `leaf_index` string, hex, required: The leaf index to query (from the `WorldIDRegistry`). Accepts decimal or `0x`/`0X`-prefixed hex input.

## Response `200`

- IndexerRecoveryAgentResponse: Response containing the recovery agent from the indexer.
  - `recovery_agent` string, hex, required: 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.

---

[API](https://skmtc.dev/worldcoin/apis/world-id-indexer.md) - [All operations](https://skmtc.dev/worldcoin/apis/world-id-indexer/llms.txt) - [OpenAPI document](https://skmtc.dev/worldcoin/apis/world-id-indexer/revisions/8d47e835f678?raw)
