Add Recovery Method
curl --request POST \
--url https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"approver": "passkey:cWtP7gmZbd98HbKUuGXx5Q",
"recoveryMethods": "passkey:cWtP7gmZbd98HbKUuGXx5Q"
}
'import requests
url = "https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods"
payload = {
"approver": "passkey:cWtP7gmZbd98HbKUuGXx5Q",
"recoveryMethods": "passkey:cWtP7gmZbd98HbKUuGXx5Q"
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
approver: 'passkey:cWtP7gmZbd98HbKUuGXx5Q',
recoveryMethods: 'passkey:cWtP7gmZbd98HbKUuGXx5Q'
})
};
fetch('https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'approver' => 'passkey:cWtP7gmZbd98HbKUuGXx5Q',
'recoveryMethods' => 'passkey:cWtP7gmZbd98HbKUuGXx5Q'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods"
payload := strings.NewReader("{\n \"approver\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\",\n \"recoveryMethods\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"approver\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\",\n \"recoveryMethods\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"approver\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\",\n \"recoveryMethods\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\"\n}"
response = http.request(request)
puts response.read_body{
"recoveryMethods": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
},
"tx": {
"chainType": "aptos",
"createdAt": 123,
"id": "<string>",
"onChain": {
"call": {
"data": "<unknown>",
"to": "<string>"
},
"explorerLink": "<string>",
"txId": "<string>"
},
"params": {
"call": {
"abi": [
"<unknown>"
],
"address": "<string>",
"args": [
"<unknown>"
],
"functionName": "<string>"
},
"chain": "abstract"
},
"status": "awaiting-approval",
"walletType": "mpc",
"approvals": {
"pending": [
{
"quorumApprovals": {
"pending": [
{
"message": "<string>",
"signer": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
}
}
],
"remaining": 123,
"submitted": [
{
"message": "<string>",
"signature": "<string>",
"signer": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
},
"submittedAt": 123
}
],
"threshold": 123
},
"signer": {
"locator": "<string>",
"type": "quorum"
}
}
],
"submitted": [
{
"quorumApprovals": {
"pending": [
{
"message": "<string>",
"signer": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
}
}
],
"remaining": 123,
"submitted": [
{
"message": "<string>",
"signature": "<string>",
"signer": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
},
"submittedAt": 123
}
],
"threshold": 123
},
"signer": {
"locator": "<string>",
"type": "quorum"
}
}
],
"required": 123
},
"completedAt": 123,
"error": {
"message": "<string>",
"reason": "program_error",
"logs": "<unknown>",
"revertData": {}
},
"fees": {
"mode": "project",
"actual": "<unknown>",
"billed": {
"usd": 123
},
"billing": {
"status": "failed"
},
"estimate": "<unknown>"
},
"sendParams": {
"params": {
"recipient": "<string>",
"recipientAddress": "<string>",
"amount": "<string>"
},
"token": "<string>"
}
}
}REST
Add Recovery Method
Add a recovery method to a wallet.
POST
/
2025-06-09
/
wallets
/
{walletLocator}
/
recovery-methods
Add Recovery Method
curl --request POST \
--url https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"approver": "passkey:cWtP7gmZbd98HbKUuGXx5Q",
"recoveryMethods": "passkey:cWtP7gmZbd98HbKUuGXx5Q"
}
'import requests
url = "https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods"
payload = {
"approver": "passkey:cWtP7gmZbd98HbKUuGXx5Q",
"recoveryMethods": "passkey:cWtP7gmZbd98HbKUuGXx5Q"
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
approver: 'passkey:cWtP7gmZbd98HbKUuGXx5Q',
recoveryMethods: 'passkey:cWtP7gmZbd98HbKUuGXx5Q'
})
};
fetch('https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'approver' => 'passkey:cWtP7gmZbd98HbKUuGXx5Q',
'recoveryMethods' => 'passkey:cWtP7gmZbd98HbKUuGXx5Q'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods"
payload := strings.NewReader("{\n \"approver\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\",\n \"recoveryMethods\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"approver\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\",\n \"recoveryMethods\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2025-06-09/wallets/{walletLocator}/recovery-methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"approver\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\",\n \"recoveryMethods\": \"passkey:cWtP7gmZbd98HbKUuGXx5Q\"\n}"
response = http.request(request)
puts response.read_body{
"recoveryMethods": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
},
"tx": {
"chainType": "aptos",
"createdAt": 123,
"id": "<string>",
"onChain": {
"call": {
"data": "<unknown>",
"to": "<string>"
},
"explorerLink": "<string>",
"txId": "<string>"
},
"params": {
"call": {
"abi": [
"<unknown>"
],
"address": "<string>",
"args": [
"<unknown>"
],
"functionName": "<string>"
},
"chain": "abstract"
},
"status": "awaiting-approval",
"walletType": "mpc",
"approvals": {
"pending": [
{
"quorumApprovals": {
"pending": [
{
"message": "<string>",
"signer": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
}
}
],
"remaining": 123,
"submitted": [
{
"message": "<string>",
"signature": "<string>",
"signer": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
},
"submittedAt": 123
}
],
"threshold": 123
},
"signer": {
"locator": "<string>",
"type": "quorum"
}
}
],
"submitted": [
{
"quorumApprovals": {
"pending": [
{
"message": "<string>",
"signer": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
}
}
],
"remaining": 123,
"submitted": [
{
"message": "<string>",
"signature": "<string>",
"signer": {
"address": "<string>",
"locator": "<string>",
"type": "api-key"
},
"submittedAt": 123
}
],
"threshold": 123
},
"signer": {
"locator": "<string>",
"type": "quorum"
}
}
],
"required": 123
},
"completedAt": 123,
"error": {
"message": "<string>",
"reason": "program_error",
"logs": "<unknown>",
"revertData": {}
},
"fees": {
"mode": "project",
"actual": "<unknown>",
"billed": {
"usd": 123
},
"billing": {
"status": "failed"
},
"estimate": "<unknown>"
},
"sendParams": {
"params": {
"recipient": "<string>",
"recipientAddress": "<string>",
"amount": "<string>"
},
"token": "<string>"
}
}
}Headers
API key required for authentication
Path Parameters
A wallet locator can be of the format:
<walletAddress>email:<email>:<chainType>[:<walletType>][:alias:<alias>](walletType defaults to 'smart')userId:<userId>:<chainType>[:<walletType>][:alias:<alias>](white label user example)phoneNumber:<phoneNumber>:<chainType>[:<walletType>][:alias:<alias>]twitter:<handle>:<chainType>[:<walletType>][:alias:<alias>]x:<handle>:<chainType>[:<walletType>][:alias:<alias>]me:<chainType>[:<walletType>][:alias:<alias>](Use when calling from the client side with a client API key)chainType[:<walletType>]:alias:<alias>
Body
application/json
- EVM
- Solana
- Stellar
Parameters for adding EVM recovery methods
The recovery method that authorizes this operation.
Example:
"passkey:cWtP7gmZbd98HbKUuGXx5Q"
The chain where the recovery method will be registered. Accepts the smart-wallet-enabled EVM chains.
Available options:
abstract, abstract-testnet, apechain, arbitrum, arbitrum-sepolia, arbitrumnova, arc, arc-testnet, avalanche, avalanche-fuji, base, base-sepolia, bsc, celo, celo-sepolia, curtis, ethereum, ethereum-sepolia, flow, flow-testnet, mantle, mantle-sepolia, optimism, optimism-sepolia, polygon, polygon-amoy, robinhood-chain, robinhood-chain-testnet, scroll, scroll-sepolia, sei-atlantic-2-testnet, sei-pacific-1, shape, story, story-testnet, tempo, tempo-testnet, world-chain, world-chain-sepolia, zora, zora-sepolia recoveryMethods
stringAPI Key Signer · objectDevice Signer · objectServer Signer · objectEmail Signer · objectExternal Wallet Signer · objectPhone Signer · objectPasskey Signer · object
required
The recovery method to add.
Example:
"passkey:cWtP7gmZbd98HbKUuGXx5Q"
Response
201 - application/json
The recovery method transaction has been created.
The recovery method being added, with its resolved locator.
- API Key Signer
- Device Signer
- External Wallet Signer
- Passkey Signer
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Complete transaction response including status, signing requirements, and wallet type specific data
- EVM MPC Wallet
- EVM Smart Wallet
- Stellar Smart Wallet
- Solana Smart Wallet
- Solana MPC Wallet
Show child attributes
Show child attributes
Was this page helpful?

