curl --request POST \
--url https://api.example.com/api/v1/wallet/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ark_server": "<string>",
"ark_server_access_token": "<string>",
"birthday_height": 1,
"chain_source": {
"bitcoind": {
"bitcoind": "<string>",
"bitcoind_auth": {
"cookie": {
"cookie": "<string>"
}
}
}
},
"force": true,
"mnemonic": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/wallet/create"
payload = {
"ark_server": "<string>",
"ark_server_access_token": "<string>",
"birthday_height": 1,
"chain_source": { "bitcoind": {
"bitcoind": "<string>",
"bitcoind_auth": { "cookie": { "cookie": "<string>" } }
} },
"force": True,
"mnemonic": "<string>"
}
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({
ark_server: '<string>',
ark_server_access_token: '<string>',
birthday_height: 1,
chain_source: {
bitcoind: {bitcoind: '<string>', bitcoind_auth: {cookie: {cookie: '<string>'}}}
},
force: true,
mnemonic: '<string>'
})
};
fetch('https://api.example.com/api/v1/wallet/create', 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://api.example.com/api/v1/wallet/create",
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([
'ark_server' => '<string>',
'ark_server_access_token' => '<string>',
'birthday_height' => 1,
'chain_source' => [
'bitcoind' => [
'bitcoind' => '<string>',
'bitcoind_auth' => [
'cookie' => [
'cookie' => '<string>'
]
]
]
],
'force' => true,
'mnemonic' => '<string>'
]),
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://api.example.com/api/v1/wallet/create"
payload := strings.NewReader("{\n \"ark_server\": \"<string>\",\n \"ark_server_access_token\": \"<string>\",\n \"birthday_height\": 1,\n \"chain_source\": {\n \"bitcoind\": {\n \"bitcoind\": \"<string>\",\n \"bitcoind_auth\": {\n \"cookie\": {\n \"cookie\": \"<string>\"\n }\n }\n }\n },\n \"force\": true,\n \"mnemonic\": \"<string>\"\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://api.example.com/api/v1/wallet/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ark_server\": \"<string>\",\n \"ark_server_access_token\": \"<string>\",\n \"birthday_height\": 1,\n \"chain_source\": {\n \"bitcoind\": {\n \"bitcoind\": \"<string>\",\n \"bitcoind_auth\": {\n \"cookie\": {\n \"cookie\": \"<string>\"\n }\n }\n }\n },\n \"force\": true,\n \"mnemonic\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/wallet/create")
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 \"ark_server\": \"<string>\",\n \"ark_server_access_token\": \"<string>\",\n \"birthday_height\": 1,\n \"chain_source\": {\n \"bitcoind\": {\n \"bitcoind\": \"<string>\",\n \"bitcoind_auth\": {\n \"cookie\": {\n \"cookie\": \"<string>\"\n }\n }\n }\n },\n \"force\": true,\n \"mnemonic\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"fingerprint": "<string>"
}{
"message": "<string>"
}Create a wallet
Creates a new wallet with the specified Ark server and chain source configuration. Fails if a wallet already exists. Returns the wallet fingerprint on success.
curl --request POST \
--url https://api.example.com/api/v1/wallet/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ark_server": "<string>",
"ark_server_access_token": "<string>",
"birthday_height": 1,
"chain_source": {
"bitcoind": {
"bitcoind": "<string>",
"bitcoind_auth": {
"cookie": {
"cookie": "<string>"
}
}
}
},
"force": true,
"mnemonic": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/wallet/create"
payload = {
"ark_server": "<string>",
"ark_server_access_token": "<string>",
"birthday_height": 1,
"chain_source": { "bitcoind": {
"bitcoind": "<string>",
"bitcoind_auth": { "cookie": { "cookie": "<string>" } }
} },
"force": True,
"mnemonic": "<string>"
}
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({
ark_server: '<string>',
ark_server_access_token: '<string>',
birthday_height: 1,
chain_source: {
bitcoind: {bitcoind: '<string>', bitcoind_auth: {cookie: {cookie: '<string>'}}}
},
force: true,
mnemonic: '<string>'
})
};
fetch('https://api.example.com/api/v1/wallet/create', 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://api.example.com/api/v1/wallet/create",
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([
'ark_server' => '<string>',
'ark_server_access_token' => '<string>',
'birthday_height' => 1,
'chain_source' => [
'bitcoind' => [
'bitcoind' => '<string>',
'bitcoind_auth' => [
'cookie' => [
'cookie' => '<string>'
]
]
]
],
'force' => true,
'mnemonic' => '<string>'
]),
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://api.example.com/api/v1/wallet/create"
payload := strings.NewReader("{\n \"ark_server\": \"<string>\",\n \"ark_server_access_token\": \"<string>\",\n \"birthday_height\": 1,\n \"chain_source\": {\n \"bitcoind\": {\n \"bitcoind\": \"<string>\",\n \"bitcoind_auth\": {\n \"cookie\": {\n \"cookie\": \"<string>\"\n }\n }\n }\n },\n \"force\": true,\n \"mnemonic\": \"<string>\"\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://api.example.com/api/v1/wallet/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ark_server\": \"<string>\",\n \"ark_server_access_token\": \"<string>\",\n \"birthday_height\": 1,\n \"chain_source\": {\n \"bitcoind\": {\n \"bitcoind\": \"<string>\",\n \"bitcoind_auth\": {\n \"cookie\": {\n \"cookie\": \"<string>\"\n }\n }\n }\n },\n \"force\": true,\n \"mnemonic\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/wallet/create")
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 \"ark_server\": \"<string>\",\n \"ark_server_access_token\": \"<string>\",\n \"birthday_height\": 1,\n \"chain_source\": {\n \"bitcoind\": {\n \"bitcoind\": \"<string>\",\n \"bitcoind_auth\": {\n \"cookie\": {\n \"cookie\": \"<string>\"\n }\n }\n }\n },\n \"force\": true,\n \"mnemonic\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"fingerprint": "<string>"
}{
"message": "<string>"
}Authorizations
Base64url-encoded auth token
Body
The network to use for the wallet
mainnet, signet, mutinynet, regtest The Ark server to use for the wallet. Optional when a config.toml already exists in the datadir.
An access token for a private Ark server.
Deprecated: access tokens are no longer enforced by the server; this field will be removed in a future release.
An optional birthday height to start syncing the wallet from
x >= 0The chain source to use for the wallet. Optional when a config.toml already exists in the datadir.
- Option 1
- Option 2
Show child attributes
Show child attributes
Proceed even if the datadir contains unexpected files
The optional mnemonic to use for the wallet
Response
Wallet created successfully
Was this page helpful?