Documentation

Coral API reference

Create agent wallets, resolve handles, send mock USDT, and inspect transaction state through server-side API keys.

Test mode: no live transaction is broadcast.
shell
curl -s https://coral.buildinpublic.fun/api/v1/agents \
  -H 'Authorization: Bearer coral_sk_test_...'

Quickstart

1

Create an API key

Use the Developer Portal. The raw key is shown once.

2

Create an agent

Assign a handle, wallet, and daily/per-transaction limits.

3

Send by handle

Existing handles receive a transaction; missing handles produce a claim link.

Authentication

API v1 endpoints use a server-side bearer token. Create keys from `/developer`, store the raw key in your server environment, and send it on every request.

Authorization: Bearer coral_sk_test_...

Runnable Examples

shell
curl -s https://coral.buildinpublic.fun/api/v1/agents \
  -H 'Authorization: Bearer coral_sk_test_...' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Research Agent",
    "handle": "research_agent",
    "dailySpendLimit": "100",
    "perTransactionLimit": "25"
  }'
shell
curl -s https://coral.buildinpublic.fun/api/v1/agents/agent_123/send \
  -H 'Authorization: Bearer coral_sk_test_...' \
  -H 'Content-Type: application/json' \
  -d '{
    "to": "alex",
    "amount": "5.00",
    "token": "USDT"
  }'
shell
curl -s https://coral.buildinpublic.fun/api/v1/handles/alex \
  -H 'Authorization: Bearer coral_sk_test_...'
shell
curl -s https://coral.buildinpublic.fun/api/v1/transactions \
  -H 'Authorization: Bearer coral_sk_test_...'

Endpoints

GET/api/v1/agents

List agents

Returns the agent wallets owned by the API key account.

Response
{
  "agents": [
    {
      "id": "agent_123",
      "name": "Research Agent",
      "handle": "@research_agent",
      "walletAddress": "0x...",
      "solanaAddress": "7Y...",
      "dailySpendLimit": "100",
      "perTransactionLimit": "25",
      "status": "ACTIVE"
    }
  ]
}
POST/api/v1/agents

Create agent

Creates an encrypted wallet, handle reservation, and spend policy for an agent.

{
  "name": "Research Agent",
  "handle": "research_agent",
  "dailySpendLimit": "100",
  "perTransactionLimit": "25"
}
Response
{
  "agent": {
    "id": "agent_123",
    "handle": "@research_agent",
    "walletAddress": "0x...",
    "solanaAddress": "7Y...",
    "status": "ACTIVE"
  }
}
POST/api/v1/agents/:agentId/send

Send from agent

Sends mock USDT from an agent wallet to a Coral handle after checking spend limits.

{
  "to": "alex",
  "amount": "5.00",
  "token": "USDT"
}
Response
{
  "status": "success",
  "txHash": "0x...",
  "toHandle": "@alex",
  "toWallet": "0x..."
}
GET/api/v1/handles/:handle

Resolve handle

Resolves a user or agent handle to Base and Solana receive addresses.

Response
{
  "handle": "@alex",
  "walletAddress": "0x...",
  "solanaAddress": "7Y...",
  "ownerType": "USER"
}
GET/api/v1/transactions

List transactions

Returns the latest user and agent-originated payment records for the API key owner.

Response
{
  "transactions": [
    {
      "id": "txn_123",
      "type": "AGENT_SEND",
      "status": "CLAIM_CREATED",
      "claimId": "claim_123"
    }
  ]
}

Errors

401Invalid or missing API key
403Agent inactive, spend limit exceeded, or onboarding required
404Agent, handle, or claim was not found
409Duplicate handle or already redeemed claim
422Request body failed validation
501Live Base Sepolia transfers are not enabled