List Distribution Accounts
Lists the distribution accounts the caller has access to. Owners see every account in the tenant. Archived accounts are included so historical records stay resolvable.
curl --request GET \
--url https://api.example.com/distribution-wallets \
--header 'Authorization: <api-key>'import requests
url = "https://api.example.com/distribution-wallets"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.example.com/distribution-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://api.example.com/distribution-wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/distribution-wallets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/distribution-wallets")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/distribution-wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"distribution_account_address": "<string>",
"distribution_account_type": "DISTRIBUTION_ACCOUNT.STELLAR.ENV",
"distribution_account_status": "ACTIVE",
"status": "ACTIVE",
"is_default": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z"
}
]{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}Authorizations
Authorization header containing an SDP JWT (ES256) or an SDP_ API key.
Response
Distribution accounts retrieved successfully
Unique identifier for the account
Human-readable name for the account
Optional description
The account's Stellar address. Absent until the account has been provisioned on the network.
How the account's secret is stored. Additional accounts are always DISTRIBUTION_ACCOUNT.STELLAR.DB_VAULT.
DISTRIBUTION_ACCOUNT.STELLAR.ENV, DISTRIBUTION_ACCOUNT.STELLAR.DB_VAULT, DISTRIBUTION_ACCOUNT.CIRCLE.DB_VAULT Status of the underlying Stellar account
ACTIVE, PENDING_USER_ACTIVATION Lifecycle status. PENDING accounts have been reserved but not yet funded on the network and cannot send. ARCHIVED accounts accept no new disbursements and are never deleted.
ACTIVE, PENDING, ARCHIVED Whether this is the tenant's default account. Exactly one account is the default, and it cannot be archived.
When the account was archived, if it has been
curl --request GET \
--url https://api.example.com/distribution-wallets \
--header 'Authorization: <api-key>'import requests
url = "https://api.example.com/distribution-wallets"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.example.com/distribution-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://api.example.com/distribution-wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/distribution-wallets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/distribution-wallets")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/distribution-wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"distribution_account_address": "<string>",
"distribution_account_type": "DISTRIBUTION_ACCOUNT.STELLAR.ENV",
"distribution_account_status": "ACTIVE",
"status": "ACTIVE",
"is_default": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z"
}
]{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}