cURL
curl --request POST \
--url https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets \
--header 'Content-Type: application/json' \
--header 'partner-api-key: <api-key>' \
--data '
{
"vmType": "EVM",
"walletAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"alias": "<string>"
}
'import requests
url = "https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets"
payload = {
"vmType": "EVM",
"walletAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"alias": "<string>"
}
headers = {
"partner-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'partner-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vmType: 'EVM',
walletAddress: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F',
alias: '<string>'
})
};
fetch('https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets', 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-api.capa.fi/api/partner/v2/users/{userId}/wallets",
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([
'vmType' => 'EVM',
'walletAddress' => '0x71C7656EC7ab88b098defB751B7401B5f6d8976F',
'alias' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"partner-api-key: <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-api.capa.fi/api/partner/v2/users/{userId}/wallets"
payload := strings.NewReader("{\n \"vmType\": \"EVM\",\n \"walletAddress\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\",\n \"alias\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("partner-api-key", "<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-api.capa.fi/api/partner/v2/users/{userId}/wallets")
.header("partner-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vmType\": \"EVM\",\n \"walletAddress\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\",\n \"alias\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["partner-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vmType\": \"EVM\",\n \"walletAddress\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\",\n \"alias\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"userId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"walletAddress": "0x4d2f3d8f83b6f2f8e0f3f4f3f3f3f3f3f3f3f3f3",
"alias": "My Polygon Wallet",
"vmType": "EVM",
"enabled": true,
"createdAt": "2025-05-08T18:00:00Z"
}
}Wallets
Create Wallet
POST
/
api
/
partner
/
v2
/
users
/
{userId}
/
wallets
cURL
curl --request POST \
--url https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets \
--header 'Content-Type: application/json' \
--header 'partner-api-key: <api-key>' \
--data '
{
"vmType": "EVM",
"walletAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"alias": "<string>"
}
'import requests
url = "https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets"
payload = {
"vmType": "EVM",
"walletAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"alias": "<string>"
}
headers = {
"partner-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'partner-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vmType: 'EVM',
walletAddress: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F',
alias: '<string>'
})
};
fetch('https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets', 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-api.capa.fi/api/partner/v2/users/{userId}/wallets",
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([
'vmType' => 'EVM',
'walletAddress' => '0x71C7656EC7ab88b098defB751B7401B5f6d8976F',
'alias' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"partner-api-key: <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-api.capa.fi/api/partner/v2/users/{userId}/wallets"
payload := strings.NewReader("{\n \"vmType\": \"EVM\",\n \"walletAddress\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\",\n \"alias\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("partner-api-key", "<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-api.capa.fi/api/partner/v2/users/{userId}/wallets")
.header("partner-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vmType\": \"EVM\",\n \"walletAddress\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\",\n \"alias\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["partner-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vmType\": \"EVM\",\n \"walletAddress\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\",\n \"alias\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"userId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"walletAddress": "0x4d2f3d8f83b6f2f8e0f3f4f3f3f3f3f3f3f3f3f3",
"alias": "My Polygon Wallet",
"vmType": "EVM",
"enabled": true,
"createdAt": "2025-05-08T18:00:00Z"
}
}Creates a new wallet for a user. The wallet address must be valid for the specified virtual machine type (
EVM or SVM).
Important Notes
- Wallet address validation is performed based on the
vmType. An EVM address cannot be used withSVM, and vice versa.
Error Codes
Common Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”API Key is missing” |
| 401 | UNAUTHORIZED | ”Invalid API Key format” |
| 401 | UNAUTHORIZED | ”Invalid API Key” |
| 403 | INVALID_PARTNER_FLOW | ”The partner has an invalid flow.” |
User Ownership Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”Partner information is required for this operation” |
| 401 | UNAUTHORIZED | ”User is not associated with the partner” |
Endpoint-Specific Errors
| HTTP Status | Code | Message |
|---|---|---|
| 400 | INVALID_USER_INPUT_ERROR | ”Invalid User Input” |
| 400 | UserOnRampWalletDuplicateError | ”A wallet with this address and VM type already exists.” |
Authorizations
API key for the affiliated partner performing the request.
Path Parameters
The userId of the user
Example:
"8374f327-38bd-4b0b-b8a7-2524599eb903"
Body
application/json
⌘I