curl --request POST \
--url https://api.citadel.example/api/v1/wallets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "user-4211",
"chain": "tron",
"network": "mainnet",
"end_user_ref": "user-4211",
"tags": [
"vip"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference: 'user-4211',
chain: 'tron',
network: 'mainnet',
end_user_ref: 'user-4211',
tags: ['vip']
})
};
fetch('https://api.citadel.example/api/v1/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.citadel.example/api/v1/wallets"
payload = {
"reference": "user-4211",
"chain": "tron",
"network": "mainnet",
"end_user_ref": "user-4211",
"tags": ["vip"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.citadel.example/api/v1/wallets"
payload := strings.NewReader("{\n \"reference\": \"user-4211\",\n \"chain\": \"tron\",\n \"network\": \"mainnet\",\n \"end_user_ref\": \"user-4211\",\n \"tags\": [\n \"vip\"\n ]\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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"chain": "tron",
"network": "mainnet",
"status": "creating",
"created_at": "2023-11-07T05:31:56Z",
"address": "<string>",
"label": "<string>",
"tags": [
"<string>"
],
"end_user_ref": "<string>",
"vault": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_implementation": "<string>"
}Issue a deposit wallet
Issues a wallet for one of your users on one chain and network. network is required:
there is no default network. end_user_ref names the user and is required too. Idempotent
on (reference, network): the same reference returns the existing wallet with 200.
Issuance is asynchronous — your own signer derives the key — so a fresh wallet answers
202 with status: creating and no address. The address arrives with the
wallet.active webhook or a later GET /wallets/{reference}.
Needs the wallets.write scope. A key limited to vaults issues only into them.
curl --request POST \
--url https://api.citadel.example/api/v1/wallets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "user-4211",
"chain": "tron",
"network": "mainnet",
"end_user_ref": "user-4211",
"tags": [
"vip"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference: 'user-4211',
chain: 'tron',
network: 'mainnet',
end_user_ref: 'user-4211',
tags: ['vip']
})
};
fetch('https://api.citadel.example/api/v1/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.citadel.example/api/v1/wallets"
payload = {
"reference": "user-4211",
"chain": "tron",
"network": "mainnet",
"end_user_ref": "user-4211",
"tags": ["vip"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.citadel.example/api/v1/wallets"
payload := strings.NewReader("{\n \"reference\": \"user-4211\",\n \"chain\": \"tron\",\n \"network\": \"mainnet\",\n \"end_user_ref\": \"user-4211\",\n \"tags\": [\n \"vip\"\n ]\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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"chain": "tron",
"network": "mainnet",
"status": "creating",
"created_at": "2023-11-07T05:31:56Z",
"address": "<string>",
"label": "<string>",
"tags": [
"<string>"
],
"end_user_ref": "<string>",
"vault": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_implementation": "<string>"
}Authorizations
An API key minted in the console (ctd_…). Authenticates; never authorizes funds. A key
carries scopes (read, wallets.write, transactions.write, events.write,
webhooks.write, policy.write) and may be limited to vaults, to IP addresses, and in
lifetime — see Authentication.
Body
Your id for the wallet; unique per network.
tron, evm, solana, ton The network the data lives on. Required wherever it appears in a request — there is no
default network. One your installation does not serve: 422 network_not_served.
mainnet, testnet Your user the wallet belongs to. Missing or empty: 422.
1Which vault; absent — the oldest vault the key reaches. Outside the key's vaults: 422.
EVM smart-account implementation id.
Response
A wallet with this reference already exists on this network.
tron, evm, solana, ton The network the data lives on. Required wherever it appears in a request — there is no
default network. One your installation does not serve: 422 network_not_served.
mainnet, testnet creating — issued, your signer has not derived it yet; active — in circulation;
retired — out of circulation (POST /wallets/{reference}/retire): still watched,
credited, and able to send; failed — your signer could not derive it, it has no address.
creating, active, retired, failed Absent while creating, and on a failed wallet.
The vault the wallet is in.