Accounts
Get Prime Account
Returns information about the authenticated Prime Account
GET
/
prime_account
Get Prime Account
curl --request GET \
--url https://api.example.com/prime_accountimport requests
url = "https://api.example.com/prime_account"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/prime_account', 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/prime_account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/prime_account"
req, _ := http.NewRequest("GET", url, nil)
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/prime_account")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/prime_account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyGet Prime Account
Returns the Prime Account associated with the query key used to authenticate the request.Request
GET /prime_account
Response
curl https://prime-api.legend.xyz/prime_account \
-H "Authorization: Bearer $LEGEND_QUERY_KEY"
const info = await client.primeAccount();
info = await client.prime_account()
let info = client.prime_account().await?;
Response
{
"id": "lgd_a1b2c3d4e5f6",
"name": "Acme Corp",
"email": "[email protected]",
"created_at": "2025-06-01T00:00:00Z"
}
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the Prime Account (lgd_ prefix) |
name | string | Display name of the Prime Account |
email | string | Admin email associated with the account |
created_at | string | ISO 8601 timestamp of when the account was created |
⌘I
Get Prime Account
curl --request GET \
--url https://api.example.com/prime_accountimport requests
url = "https://api.example.com/prime_account"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/prime_account', 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/prime_account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/prime_account"
req, _ := http.NewRequest("GET", url, nil)
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/prime_account")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/prime_account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body