Register a new API account
curl --request POST \
--url https://api.trydocent.com/v1/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-trading-bot"
}
'import requests
url = "https://api.trydocent.com/v1/auth/register"
payload = { "name": "my-trading-bot" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: 'my-trading-bot'})
};
fetch('https://api.trydocent.com/v1/auth/register', 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.trydocent.com/v1/auth/register",
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-trading-bot'
]),
CURLOPT_HTTPHEADER => [
"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.trydocent.com/v1/auth/register"
payload := strings.NewReader("{\n \"name\": \"my-trading-bot\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.trydocent.com/v1/auth/register")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"my-trading-bot\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trydocent.com/v1/auth/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"my-trading-bot\"\n}"
response = http.request(request)
puts response.read_body{
"agentId": "<string>",
"apiKey": "dk_live_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}{
"error": "<string>",
"retryAfter": 123
}Auth
Register
Creates a new API agent with a dedicated Privy server wallet, queues background onboarding, and returns a one-time API key. Use GET /v1/auth/status to fetch the wallet address after registration.
POST
/
v1
/
auth
/
register
Register a new API account
curl --request POST \
--url https://api.trydocent.com/v1/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-trading-bot"
}
'import requests
url = "https://api.trydocent.com/v1/auth/register"
payload = { "name": "my-trading-bot" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: 'my-trading-bot'})
};
fetch('https://api.trydocent.com/v1/auth/register', 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.trydocent.com/v1/auth/register",
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-trading-bot'
]),
CURLOPT_HTTPHEADER => [
"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.trydocent.com/v1/auth/register"
payload := strings.NewReader("{\n \"name\": \"my-trading-bot\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.trydocent.com/v1/auth/register")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"my-trading-bot\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trydocent.com/v1/auth/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"my-trading-bot\"\n}"
response = http.request(request)
puts response.read_body{
"agentId": "<string>",
"apiKey": "dk_live_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
}{
"error": "<string>",
"retryAfter": 123
}Body
application/json
Human-readable name for this API agent
Required string length:
1 - 64Example:
"my-trading-bot"
⌘I