Custody
Create External Wallet
Registers an external (user-owned) wallet, such as a personal MetaMask address, on behalf of one of your users. The wallet is created with status PENDING and moves to APPROVED or REJECTED after an automatic compliance screening.
Request
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | Header | Yes | Bearer <access_token> obtained from POST /api/v1/client/token. |
| user_id | Path | Yes | User who will own the wallet, from GET /admin/users. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Label for the wallet. |
| address | string | Yes | On-chain address. |
| network | string | Yes | Network name, e.g. stellar, polygon. It must match your custody network to transfer to this wallet. |
| token | string | Yes | Token, e.g. USDC. |
The address format is checked and the address is screened; if it passes and the user is approved, the wallet is created as APPROVED. The older body with networkId, tokenId and custodianId is still accepted but leaves the wallet PENDING.
POST
/
api
/
v1
/
admin
/
wallets
/
external
/
{user_id}
Create External Wallet
curl --request POST \
--url https://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Stellar wallet",
"address": "GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556",
"network": "stellar",
"token": "USDC"
}
'import requests
url = "https://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}"
payload = {
"name": "My Stellar wallet",
"address": "GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556",
"network": "stellar",
"token": "USDC"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Stellar wallet',
address: 'GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556',
network: 'stellar',
token: 'USDC'
})
};
fetch('https://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}', 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://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}",
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([
'name' => 'My Stellar wallet',
'address' => 'GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556',
'network' => 'stellar',
'token' => 'USDC'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}"
payload := strings.NewReader("{\n \"name\": \"My Stellar wallet\",\n \"address\": \"GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556\",\n \"network\": \"stellar\",\n \"token\": \"USDC\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Stellar wallet\",\n \"address\": \"GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556\",\n \"network\": \"stellar\",\n \"token\": \"USDC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Stellar wallet\",\n \"address\": \"GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556\",\n \"network\": \"stellar\",\n \"token\": \"USDC\"\n}"
response = http.request(request)
puts response.read_bodyCreate External Wallet
curl --request POST \
--url https://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Stellar wallet",
"address": "GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556",
"network": "stellar",
"token": "USDC"
}
'import requests
url = "https://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}"
payload = {
"name": "My Stellar wallet",
"address": "GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556",
"network": "stellar",
"token": "USDC"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Stellar wallet',
address: 'GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556',
network: 'stellar',
token: 'USDC'
})
};
fetch('https://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}', 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://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}",
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([
'name' => 'My Stellar wallet',
'address' => 'GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556',
'network' => 'stellar',
'token' => 'USDC'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}"
payload := strings.NewReader("{\n \"name\": \"My Stellar wallet\",\n \"address\": \"GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556\",\n \"network\": \"stellar\",\n \"token\": \"USDC\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Stellar wallet\",\n \"address\": \"GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556\",\n \"network\": \"stellar\",\n \"token\": \"USDC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api-kore.kravata.co/api/v1/admin/wallets/external/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Stellar wallet\",\n \"address\": \"GBV4DCFC3R5SLGVWJXE3EG2NCMCYWMIBOF5UZIICIBLFW4DSJGEWQ556\",\n \"network\": \"stellar\",\n \"token\": \"USDC\"\n}"
response = http.request(request)
puts response.read_body
