Skip to main content
POST
/
agents
/
register
Register agent (x402 + AgentRegistry)
curl --request POST \
  --url https://alphagrid-api.artiffine-delivery.workers.dev/agents/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "vault": "0x0000000000000000000000000000000000000001",
  "name": "Alpha Bot",
  "metadataURI": "ipfs://alpha-bot",
  "signer": "<string>",
  "deadline": "<string>",
  "signature": "<string>",
  "linkERC8004": false,
  "erc8004AgentId": "0"
}
'
{
  "agentId": "<string>",
  "transactionHash": "<string>",
  "transaction": {
    "to": "<string>",
    "data": "<string>",
    "chainId": 123,
    "description": "<string>"
  },
  "message": "<string>"
}

Body

application/json
vault
string
required
Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x0000000000000000000000000000000000000001"

name
string
required
Required string length: 1 - 128
Example:

"Alpha Bot"

metadataURI
string
required
Required string length: 1 - 2048
Example:

"ipfs://alpha-bot"

signer
string
required
Pattern: ^0x[a-fA-F0-9]{40}$
deadline
string
required

Unix timestamp; EIP-712 SelfRegister deadline

Pattern: ^\d+$
signature
string
required

EIP-712 signature from signer

Pattern: ^0x[a-fA-F0-9]*$
erc8004AgentId
string
default:0

ERC-8004 identity token id when linking

Pattern: ^\d+$

Response

Registration accepted

agentId
string | null
required
transactionHash
string | null
required
Pattern: ^0x[a-fA-F0-9]*$
transaction
object
required
message
string
required