curl --request POST \
--url https://api.sandbox.brickken.com/x402/agent/register \
--header 'Content-Type: application/json' \
--header 'X-Payment: <api-key>' \
--data '
{
"chainId": "8453",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"services": [
{
"name": "<string>",
"endpoint": "<string>",
"version": "<string>"
}
],
"executionMode": "client-signed",
"signerAddress": "<string>",
"gasLimit": "<string>",
"nonce": 123,
"privateRpcUrl": "<string>",
"ownerEmail": "jsmith@example.com",
"email": "jsmith@example.com",
"metadata": {},
"aiModelName": "<string>",
"aiModelProvider": "<string>",
"tags": [
"<string>"
],
"version": "<string>",
"documentation": "<string>",
"sourceCode": "<string>",
"license": "<string>",
"agentType": "<string>",
"supportedTrust": [
"<string>"
],
"x402Support": true,
"active": true,
"registrations": [
{}
]
}
'import requests
url = "https://api.sandbox.brickken.com/x402/agent/register"
payload = {
"chainId": "8453",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"services": [
{
"name": "<string>",
"endpoint": "<string>",
"version": "<string>"
}
],
"executionMode": "client-signed",
"signerAddress": "<string>",
"gasLimit": "<string>",
"nonce": 123,
"privateRpcUrl": "<string>",
"ownerEmail": "jsmith@example.com",
"email": "jsmith@example.com",
"metadata": {},
"aiModelName": "<string>",
"aiModelProvider": "<string>",
"tags": ["<string>"],
"version": "<string>",
"documentation": "<string>",
"sourceCode": "<string>",
"license": "<string>",
"agentType": "<string>",
"supportedTrust": ["<string>"],
"x402Support": True,
"active": True,
"registrations": [{}]
}
headers = {
"X-Payment": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Payment': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chainId: '8453',
name: '<string>',
description: '<string>',
image: '<string>',
services: [{name: '<string>', endpoint: '<string>', version: '<string>'}],
executionMode: 'client-signed',
signerAddress: '<string>',
gasLimit: '<string>',
nonce: 123,
privateRpcUrl: '<string>',
ownerEmail: 'jsmith@example.com',
email: 'jsmith@example.com',
metadata: {},
aiModelName: '<string>',
aiModelProvider: '<string>',
tags: ['<string>'],
version: '<string>',
documentation: '<string>',
sourceCode: '<string>',
license: '<string>',
agentType: '<string>',
supportedTrust: ['<string>'],
x402Support: true,
active: true,
registrations: [{}]
})
};
fetch('https://api.sandbox.brickken.com/x402/agent/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.sandbox.brickken.com/x402/agent/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([
'chainId' => '8453',
'name' => '<string>',
'description' => '<string>',
'image' => '<string>',
'services' => [
[
'name' => '<string>',
'endpoint' => '<string>',
'version' => '<string>'
]
],
'executionMode' => 'client-signed',
'signerAddress' => '<string>',
'gasLimit' => '<string>',
'nonce' => 123,
'privateRpcUrl' => '<string>',
'ownerEmail' => 'jsmith@example.com',
'email' => 'jsmith@example.com',
'metadata' => [
],
'aiModelName' => '<string>',
'aiModelProvider' => '<string>',
'tags' => [
'<string>'
],
'version' => '<string>',
'documentation' => '<string>',
'sourceCode' => '<string>',
'license' => '<string>',
'agentType' => '<string>',
'supportedTrust' => [
'<string>'
],
'x402Support' => true,
'active' => true,
'registrations' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Payment: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.brickken.com/x402/agent/register"
payload := strings.NewReader("{\n \"chainId\": \"8453\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"executionMode\": \"client-signed\",\n \"signerAddress\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"nonce\": 123,\n \"privateRpcUrl\": \"<string>\",\n \"ownerEmail\": \"jsmith@example.com\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"aiModelName\": \"<string>\",\n \"aiModelProvider\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\",\n \"documentation\": \"<string>\",\n \"sourceCode\": \"<string>\",\n \"license\": \"<string>\",\n \"agentType\": \"<string>\",\n \"supportedTrust\": [\n \"<string>\"\n ],\n \"x402Support\": true,\n \"active\": true,\n \"registrations\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Payment", "<api-key>")
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.sandbox.brickken.com/x402/agent/register")
.header("X-Payment", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chainId\": \"8453\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"executionMode\": \"client-signed\",\n \"signerAddress\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"nonce\": 123,\n \"privateRpcUrl\": \"<string>\",\n \"ownerEmail\": \"jsmith@example.com\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"aiModelName\": \"<string>\",\n \"aiModelProvider\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\",\n \"documentation\": \"<string>\",\n \"sourceCode\": \"<string>\",\n \"license\": \"<string>\",\n \"agentType\": \"<string>\",\n \"supportedTrust\": [\n \"<string>\"\n ],\n \"x402Support\": true,\n \"active\": true,\n \"registrations\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.brickken.com/x402/agent/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Payment"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chainId\": \"8453\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"executionMode\": \"client-signed\",\n \"signerAddress\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"nonce\": 123,\n \"privateRpcUrl\": \"<string>\",\n \"ownerEmail\": \"jsmith@example.com\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"aiModelName\": \"<string>\",\n \"aiModelProvider\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\",\n \"documentation\": \"<string>\",\n \"sourceCode\": \"<string>\",\n \"license\": \"<string>\",\n \"agentType\": \"<string>\",\n \"supportedTrust\": [\n \"<string>\"\n ],\n \"x402Support\": true,\n \"active\": true,\n \"registrations\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"transactions": {},
"txId": "<string>",
"info": {}
}Register Agent
Prepare an ERC-8004 agent registration through x402.
curl --request POST \
--url https://api.sandbox.brickken.com/x402/agent/register \
--header 'Content-Type: application/json' \
--header 'X-Payment: <api-key>' \
--data '
{
"chainId": "8453",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"services": [
{
"name": "<string>",
"endpoint": "<string>",
"version": "<string>"
}
],
"executionMode": "client-signed",
"signerAddress": "<string>",
"gasLimit": "<string>",
"nonce": 123,
"privateRpcUrl": "<string>",
"ownerEmail": "jsmith@example.com",
"email": "jsmith@example.com",
"metadata": {},
"aiModelName": "<string>",
"aiModelProvider": "<string>",
"tags": [
"<string>"
],
"version": "<string>",
"documentation": "<string>",
"sourceCode": "<string>",
"license": "<string>",
"agentType": "<string>",
"supportedTrust": [
"<string>"
],
"x402Support": true,
"active": true,
"registrations": [
{}
]
}
'import requests
url = "https://api.sandbox.brickken.com/x402/agent/register"
payload = {
"chainId": "8453",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"services": [
{
"name": "<string>",
"endpoint": "<string>",
"version": "<string>"
}
],
"executionMode": "client-signed",
"signerAddress": "<string>",
"gasLimit": "<string>",
"nonce": 123,
"privateRpcUrl": "<string>",
"ownerEmail": "jsmith@example.com",
"email": "jsmith@example.com",
"metadata": {},
"aiModelName": "<string>",
"aiModelProvider": "<string>",
"tags": ["<string>"],
"version": "<string>",
"documentation": "<string>",
"sourceCode": "<string>",
"license": "<string>",
"agentType": "<string>",
"supportedTrust": ["<string>"],
"x402Support": True,
"active": True,
"registrations": [{}]
}
headers = {
"X-Payment": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Payment': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chainId: '8453',
name: '<string>',
description: '<string>',
image: '<string>',
services: [{name: '<string>', endpoint: '<string>', version: '<string>'}],
executionMode: 'client-signed',
signerAddress: '<string>',
gasLimit: '<string>',
nonce: 123,
privateRpcUrl: '<string>',
ownerEmail: 'jsmith@example.com',
email: 'jsmith@example.com',
metadata: {},
aiModelName: '<string>',
aiModelProvider: '<string>',
tags: ['<string>'],
version: '<string>',
documentation: '<string>',
sourceCode: '<string>',
license: '<string>',
agentType: '<string>',
supportedTrust: ['<string>'],
x402Support: true,
active: true,
registrations: [{}]
})
};
fetch('https://api.sandbox.brickken.com/x402/agent/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.sandbox.brickken.com/x402/agent/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([
'chainId' => '8453',
'name' => '<string>',
'description' => '<string>',
'image' => '<string>',
'services' => [
[
'name' => '<string>',
'endpoint' => '<string>',
'version' => '<string>'
]
],
'executionMode' => 'client-signed',
'signerAddress' => '<string>',
'gasLimit' => '<string>',
'nonce' => 123,
'privateRpcUrl' => '<string>',
'ownerEmail' => 'jsmith@example.com',
'email' => 'jsmith@example.com',
'metadata' => [
],
'aiModelName' => '<string>',
'aiModelProvider' => '<string>',
'tags' => [
'<string>'
],
'version' => '<string>',
'documentation' => '<string>',
'sourceCode' => '<string>',
'license' => '<string>',
'agentType' => '<string>',
'supportedTrust' => [
'<string>'
],
'x402Support' => true,
'active' => true,
'registrations' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Payment: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.brickken.com/x402/agent/register"
payload := strings.NewReader("{\n \"chainId\": \"8453\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"executionMode\": \"client-signed\",\n \"signerAddress\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"nonce\": 123,\n \"privateRpcUrl\": \"<string>\",\n \"ownerEmail\": \"jsmith@example.com\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"aiModelName\": \"<string>\",\n \"aiModelProvider\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\",\n \"documentation\": \"<string>\",\n \"sourceCode\": \"<string>\",\n \"license\": \"<string>\",\n \"agentType\": \"<string>\",\n \"supportedTrust\": [\n \"<string>\"\n ],\n \"x402Support\": true,\n \"active\": true,\n \"registrations\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Payment", "<api-key>")
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.sandbox.brickken.com/x402/agent/register")
.header("X-Payment", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chainId\": \"8453\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"executionMode\": \"client-signed\",\n \"signerAddress\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"nonce\": 123,\n \"privateRpcUrl\": \"<string>\",\n \"ownerEmail\": \"jsmith@example.com\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"aiModelName\": \"<string>\",\n \"aiModelProvider\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\",\n \"documentation\": \"<string>\",\n \"sourceCode\": \"<string>\",\n \"license\": \"<string>\",\n \"agentType\": \"<string>\",\n \"supportedTrust\": [\n \"<string>\"\n ],\n \"x402Support\": true,\n \"active\": true,\n \"registrations\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.brickken.com/x402/agent/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Payment"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chainId\": \"8453\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"services\": [\n {\n \"name\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"executionMode\": \"client-signed\",\n \"signerAddress\": \"<string>\",\n \"gasLimit\": \"<string>\",\n \"nonce\": 123,\n \"privateRpcUrl\": \"<string>\",\n \"ownerEmail\": \"jsmith@example.com\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"aiModelName\": \"<string>\",\n \"aiModelProvider\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"version\": \"<string>\",\n \"documentation\": \"<string>\",\n \"sourceCode\": \"<string>\",\n \"license\": \"<string>\",\n \"agentType\": \"<string>\",\n \"supportedTrust\": [\n \"<string>\"\n ],\n \"x402Support\": true,\n \"active\": true,\n \"registrations\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"transactions": {},
"txId": "<string>",
"info": {}
}agentRegister.
Authentication
Preparing charges the first half of the operation price, andPOST /send-transactions charges the rest. Each paid call answers 402 Payment Required with a PAYMENT-REQUIRED header describing the chain, asset, transfer method, amount, recipient, and timeout. Sign each payment locally and retry with X-PAYMENT.
A valid x-api-key is accepted instead of paying, on both steps.
See Authentication for the full credential matrix.
Key Fields
| Parameter | Required | Description |
|---|---|---|
chainId | Yes | Target chain ID. Use 8453 for Base mainnet or 84532 for Base Sepolia tests. Decimal and hex values are accepted. |
executionMode | No | client-signed (default) or client-broadcast. |
signerAddress | Yes | Wallet that signs the prepared transaction. |
name | Yes | Human-readable agent name. |
description | Yes | Agent description. |
image | Yes | Publicly reachable HTTPS URL for the agent logo. Local paths and omitted values are rejected. |
services | Yes | Non-empty service descriptors such as A2A endpoints. Every entry needs a non-empty name and endpoint. |
aiModelName, aiModelProvider | No | AI model metadata published with the agent profile. |
x402Support, active | No | Agent capability and status flags. |
image is mandatory. Provide the final public logo URL, or an explicitly authorized test fixture; requests without it fail with image is required.400 before the prepare response is a request-validation failure, not an x402-payment failure. Confirm the Base chain ID and all required fields (name, description, image, and valid services) before attempting payment.Response
Returns prepared unsigned transactions andtxId. Save info.agentUuid from the response for future URI, metadata, wallet, and ownership-transfer updates.
Next step
Preparing does not touch the chain. The response gives youtxId, the unsigned transactions, and an x402Requirements quote.
Choose who broadcasts
client-signed (the default) — you sign the transaction and Brickken broadcasts it. client-broadcast — you sign and broadcast it yourself, then confirm with txHash. Either way the operation price is split evenly: half at prepare, half at send.Submit it and settle the payment
POST to /send-transactions. The first attempt answers 402 Payment Required; read PAYMENT-REQUIRED, sign the payment locally, and retry with X-PAYMENT. An x-api-key is accepted here instead of paying.Poll until it confirms
GET /get-transaction-status with the txId. Your payment settles only after the operation confirms, and is released if it reverts.Authorizations
Base64-encoded x402 payment payload. Supported for x402-eligible agentic methods on /x402/... facades, /prepare-transactions, and eligible /send-transactions retries.
Body
Target operation chain ID. Use 8453 on Base mainnet or 84532 on Base Sepolia.
"8453"
"84532"
Show child attributes
Show child attributes
Execution mode. Use brickken-relayed to let Brickken's relayer sign, pay gas, and broadcast (omit signerAddress). Use client-signed to sign the prepared transaction yourself.
brickken-relayed, client-signed Wallet that signs the prepared blockchain transaction. Required only in client-signed mode; omit in brickken-relayed mode.
^0x[a-fA-F0-9]{40}$Optional explicit gas limit.
Optional explicit nonce when managing nonces manually.
Optional private RPC URL override.
Optional owner attribution email.
Alias for ownerEmail where supported.