Skip to content

api.agentdao.com · Next.js port

The AgentDAO
HTTP reference

A Next.js drop-in for the legacy Yii api.agentdao.com — token, marketplace, and TLD-asset backend. Routes mirror the original exactly: /<controller>/<action>[/<id>].

20

controllers

~142

endpoints

13

DB pools

27/31

read paths QA-sampled

Byte-parity verified19/143

Auth & response envelope

Authentication

Every endpoint checks an api_key (query or body) against the user_key table. Member-scoped actions (my*, create, watchlist/*) also require a Token header.

api_key
query or body, all endpoints
Token
member-scoped · api_key+token

Response shapes

Two envelopes, inherited from Yii — the port preserves both exactly.

{ s: 1, data }
renderJSON success
{ s: 0, … }
renderJSON failure
{ success, data }
renderRequest
text/plain
renderText

DB columns come back as strings (PDO parity) — numeric-looking fields like "count": "67" are intentional.

Primary endpoints

Ten endpoints the AgentDAO frontend and Postman collection actually exercise. Samples are live captures where marked; write endpoints show the documented shape only.

GET/category/getall

All TLD marketplace categories, ordered by name.

readapi_key

Paramsapi_key

cURL
curl "https://api.agentdao.com/category/getall?api_key=$API_KEY"

Verified byte-parity vs live.

GET/marketplace/getall

Tokenized domain listings (dna_class_id=2), with paging, search, tag and sort.

readapi_key

Paramsapi_key · limit (10) · offset (0) · q · tag · sort (field::DIR)

cURL
curl "https://api.agentdao.com/marketplace/getall?api_key=$API_KEY"
GET/dna/getall

Paged TLD/domain listing — the main asset explorer feed.

readapi_key

Paramsapi_key · filter · sort · limit (12) · page · chain_id (56) · tlddnafilter · tag

cURL
curl "https://api.agentdao.com/dna/getall?api_key=$API_KEY&page=1&limit=10"

⚠ Live Yii 500s ("A non-numeric value encountered") whenever page is omitted — PHP 8 rejects '' - 1 in the offset math. Always send page. Flagged in ADA-K1.

GET/dna/details

Full detail record for one tokenized domain, by tld string.

readapi_key

Paramsapi_key · domain · member_id · network

cURL
curl "https://api.agentdao.com/dna/details?api_key=$API_KEY&domain=profilebot.com"

No matching row → { success: false, data: null } (tried livebot.com — not yet tokenized, got exactly this).

GET/dna/geteshgraph

Historical ESH value series for one TLD (for a sparkline/chart).

readapi_key

Paramsapi_key · tld_id

cURL
curl "https://api.agentdao.com/dna/geteshgraph?api_key=$API_KEY&tld_id=1992"
GET/user/portfolio

A member's total agent contribution + USD value, from ETH transactions.

readapi_key

Paramsapi_key · member_id

cURL
curl "https://api.agentdao.com/user/portfolio?api_key=$API_KEY&member_id=8"
GET/user/checkemail

Whether an email is already registered. CORS-open.

readapi_key

Paramsapi_key · email

cURL
curl "https://api.agentdao.com/user/checkemail?api_key=$API_KEY&email=someone@example.com"
POST/user/login

Email + password login, issues a session token on success.

writeapi_key

Paramsapi_key · body: email, password

cURL
curl -X POST "https://api.agentdao.com/user/login?api_key=$API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"••••••••"}'

Write endpoint — documented shape, not executed against live in this pass. bcrypt wiring is a tracked TODO.

POST/watchlist/exist

Whether a tld_id is already on the caller's watchlist.

readapi_key+token

Paramsapi_key · Token header · body: tld_id

cURL
curl -X POST "https://api.agentdao.com/watchlist/exist?api_key=$API_KEY" \
  -H "Token: {your-session-token}" \
  -d '{"tld_id":1992}'

success is always false by Yii convention here — read exist, not success. Auth failure returns message: "Invalid access token" | "Invalid api key".

Full endpoint reference

All 143 routes across 20 controllers. A green mark means byte-for-byte verified against live Yii (19 so far).

/apiApiController.php66

Legacy grab-bag: members, buyouts, stakes, claims, topics/comments, RDAO price + graph data. DataTables lists return TAB-prefixed JSON.

  • /api/test
  • /api/getmembers
  • /api/getbuyers
  • /api/mailwinners
  • /api/approvebuyout
  • /api/buytokens
  • /api/dnamarketplacehome
  • /api/dnamarketplacehomenew
  • /api/checkwellet
  • /api/savewallet
  • /api/getethaddress
  • /api/geteshval
  • /api/geteshvalgroup
  • /api/geteshsold
  • /api/deletepayment
  • /api/deletebuyout
  • /api/deletemember
  • /api/stakelist
  • /api/claimlist
  • /api/paypallist
  • /api/adaolist
  • /api/list
  • /api/listbydna
  • /api/buyout
  • /api/exchange
  • /api/updatestake
  • /api/memberslist
  • /api/getpaypalpayments
  • /api/s
  • /api/getpayments
  • /api/gettopiccategory
  • /api/savetopiccategory
  • /api/deletetopiccategory
  • /api/tldmemberscount
  • /api/gettopics
  • /api/getnumberofcomments
  • /api/gettopiccategories
  • /api/gettopicdetails
  • /api/getliquiditylist
  • /api/updatetopic
  • /api/deletetopics
  • /api/gettopiccomments
  • /api/getcommentdetails
  • /api/editcomment
  • /api/editbuyout
  • /api/deletecomments
  • /api/gettokeneshavailable
  • /api/getrdaographvalues
  • /api/geteshgraphvalues
  • /api/getmemberemail
  • /api/getapybytld
  • /api/sendnotiftorealtydao
  • /api/sendnotiftortydaomembers
  • /api/getrdaoprice
  • /api/userloglist
  • /api/getrtydaomembers
  • /api/getrdaoblockchaindata
  • /api/geteshvalbydomain
  • /api/withdrawlist
  • /api/withdrawlistsent
  • /api/sponsorlistpending
  • /api/sponsorlistpushed
  • /api/getrdaotranslist
  • /api/getothertransinfo
  • /api/updaterdaotranslist
  • /api/savebuyrdao
/assetAssetController.php1

Single-domain marketplace card.

1 verified

  • /asset/details
/barBarController.php4

Dead/test controller — HMAC gate not reproduced. Candidate for removal.

  • /bar/index
  • /bar/create
  • /bar/update
  • /bar/delete
/buyBuyController.php4

Crypto/ADAO purchase writes — none executed live.

  • /buy/save
  • /buy/saveadao
  • /buy/saveadaoother
  • /buy/savepublic
/categoryCategoryController.php1

1 verified

  • /category/getall
/claimClaimController.php2

1 verified

  • /claim/save
  • /claim/total
/cronCronController.php2

Sync + price cron jobs — write/sync, not executed live.

  • /cron/synctlds
  • /cron/updateadaoprice
/crudCrudController.php0

No actions registered.

No actions registered.

/dnaDnaController.php18

The core asset explorer: listings, a member's own portfolio/watchlist/transactions, tags, history, socials, referrals.

10 verified

  • /dna/getall
  • /dna/getalllist
  • /dna/portfoliostats
  • /dna/getclasses
  • /dna/create
  • /dna/myportfolio
  • /dna/mytransactions
  • /dna/myeshtransactions
  • /dna/mydna
  • /dna/mywatchlist
  • /dna/mybuytransactions
  • /dna/gettags
  • /dna/history
  • /dna/details
  • /dna/related
  • /dna/geteshgraph
  • /dna/socials
  • /dna/referrals
/fooFooController.php4

Dead/test controller alongside bar — candidate for removal.

  • /foo/s
  • /foo/index
  • /foo/update
  • /foo/delete
/homeHomeController.php1
  • /home/index
/marketplaceMarketplaceController.php1

1 verified

  • /marketplace/getall
/paypalPaypalController.php1

Write — not run live; outbound PayPal capture still a TODO.

  • /paypal/save
/safeSafeController.php1

Live currently 500s (server include failure — environment, not logic).

  • /safe/index
/settingsSettingsController.php3
  • /settings/get
  • /settings/geteth
  • /settings/getadaoprice
/siteSiteController.php9

No DB, no auth — HTML/utility actions. login/logout are 404 (commented out in Yii, left unregistered).

  • /site/s
  • /site/index
  • /site/error
  • /site/contact
  • /site/login
  • /site/logout
  • /site/info
  • /site/test
  • /site/email
/stakeStakeController.php3
  • /stake/save
  • /stake/getapy
  • /stake/transactions
/tokenTokenController.php3

REST token-header auth (Authorization: token <id>:<secret>) — filter not yet ported.

  • /token/index
  • /token/update
  • /token/delete
/userUserController.php17

Needs bcrypt (password verify/hash) and AWS SES (emails) wired before write/auth paths are production-trusted.

4 verified

  • /user/checkvalidkey
  • /user/logoutuser
  • /user/login
  • /user/getuserinfo
  • /user/checkexist
  • /user/deletetoken
  • /user/savetoken
  • /user/update
  • /user/get
  • /user/checkemail
  • /user/checkaccount
  • /user/create
  • /user/verify
  • /user/loginemail
  • /user/createemail
  • /user/sendpassword
  • /user/portfolio
/watchlistWatchlistController.php2

1 verified

  • /watchlist/create
  • /watchlist/exist

Port status

All 20 controllers ported, full typecheck clean. Read-only endpoints are verified byte-for-byte vs live Yii; write endpoints are ported but not executed against live.

Still wiring

  • bcryptpassword verify/hash — stubs in user login/update/create/checkaccount/sendpassword
  • AWS SESemail sends — user, site, dna/create, several api writes
  • PayPaloutbound capture call — paypal/save
  • Twitter APIdna/socials tweets — placeholder empty array
  • REST token filterAuthorization: token <id>:<secret> gate — token/*

Blockchain RPC reads (dna/my*, api/gettokeneshavailable, getliquiditylist) are dead in live Yii (return 0; exit;) and ported to match exactly — this is not a gap.

DB pools

  • db
  • dbread
  • dbrdao
  • dbvnoc
  • dbvnocwrite
  • dbvnocread
  • dbvnocread2
  • dbcontrib
  • dbreferrals
  • dbtldframework
  • dbcrypto
  • dbleads
  • dbdevelopers