---
title: "POST /execute-recovery-agent-update"
method: POST
path: "/execute-recovery-agent-update"
tags: ["Gateway"]
---

# POST /execute-recovery-agent-update

`POST /execute-recovery-agent-update`

## Request body

- ExecuteRecoveryAgentUpdateRequest — The request to execute a pending recovery agent update. No signature is required — `executeRecoveryAgentUpdate` is permissionless. The contract enforces the 14-day cooldown and will revert with `RecoveryAgentUpdateStillInCooldown` if called too early. Numeric string fields in this request accept decimal or `0x`/`0X`-prefixed hex.
  - `leaf_index` string, hex, required — The account index.

## Response `200`

Request accepted

- GatewayStatusResponse — Response returned by the registry gateway for state-changing requests.
  - `kind` 'create_account' | 'update_authenticator' | 'insert_authenticator' | 'remove_authenticator' | 'update_recovery_agent' | 'cancel_recovery_agent_update' | 'execute_recovery_agent_update' | 'recover_account', required — Kind of request tracked by the registry gateway.
  - `request_id` string, required — Strongly-typed identifier for a gateway request. Returned by gateway mutation endpoints (create-account, insert/update/remove authenticator, etc.) and used to poll the status of the request.
  - `status` union, required — Tracking state for a registry gateway request.
    - object — Request queued but not yet batched.
      - `state` 'queued', required
    - object — Request currently being batched.
      - `state` 'batching', required
    - object — Request submitted on-chain, hash available.
      - `state` 'submitted', required
      - `tx_hash` string, required — Transaction hash emitted when the request was submitted.
    - object — Request finalized on-chain.
      - `state` 'finalized', required
      - `tx_hash` string, required — Transaction hash emitted when the request was finalized.
    - object — Request failed during processing.
      - `error` string, required — Error message returned by the gateway.
      - `error_code` 'internal_server_error' | 'not_found' | 'bad_request' | 'batcher_unavailable' | 'authenticator_already_exists' | 'authenticator_does_not_exist' | 'mismatched_signature_nonce' | 'pubkey_id_in_use' | 'pubkey_id_out_of_bounds' | 'authenticator_does_not_belong_to_account' | 'transaction_reverted' | 'confirmation_error' | 'duplicate_request_in_flight' | 'rate_limit_exceeded' | 'request_timeout' | 'method_not_available' — Gateway error codes.
      - `state` 'failed', required

## Other responses

- `400` — Bad request (leaf_index zero or no pending update)
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/worldcoin/apis/world-id-gateway.md) · [All operations](https://skmtc.net/worldcoin/apis/world-id-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/worldcoin/world-id-gateway/versions/64f5c213771f/schema)
