Reference: REST API
Base URL: https://api.datapoint.market. Machine-readable OpenAPI at
GET /openapi.json. A self-describing index is at GET /.
Auth: provider routes accept a session cookie, an OAuth token, or an
empk_ automation key (Authorization: Bearer …), unless noted. Buyer routes
take no auth — they use x402.
| Method | Path | Auth | Purpose |
|---|
| GET | / | none | self-describing index (links, how to buy/sell) |
| GET | /health | none | liveness |
| GET | /discover.json | none | marketplace listings (published + public) |
| GET | /u/{provider}.json | none | one provider’s public endpoints |
| GET | /e/{provider}/{endpoint} | none | listing page (includes the data sample + state axes) |
| GET | /e/{provider}/{endpoint}/schema.json | none | the data sample: output_schema + a (synthetic-by-default) example + sample axes (protection/provenance/freshness) |
Buy (x402, no account)
| Method | Path | Purpose |
|---|
| GET/POST | /r/{provider}/{endpoint} | API relay — 402 then pay via X-PAYMENT |
| POST | /m/{provider}/{server} | MCP wrapper — per-tool x402 over JSON-RPC |
The 402 body carries an endpoint block (the sample “what you get”:
outputSchema, example, sample axes, verified) and, when offered, a
freeTrial block ({available, remaining, total}). If a free trial is available,
the unpaid call returns the real response (not a 402) with X-Datapoint-Trial: true and X-Datapoint-Trial-Remaining: <n>. See Buying.
Provider auth / onboarding
| Method | Path | Purpose |
|---|
| POST | /auth/magic-link/request | email a sign-in link ({email, return_to?}) |
| POST | /auth/verify | exchange token → session cookie (auto-creates account) |
| POST | /auth/wallet/challenge | {address, network} → SIWE-style message to sign |
| POST | /auth/wallet/verify | {message, signature} → provider + automation key |
| GET | /auth/me | current provider |
| POST | /auth/logout | clear session |
Provider dashboard (manage)
| Method | Path | Purpose |
|---|
| GET | /dashboard/profile | your public profile + completeness meter |
| PATCH | /dashboard/profile | edit profile (slug/handle, name, profile_type, bio, avatar_url, website_url, social_links) |
| GET | /dashboard/handle/check?slug=… | is a handle claimable by you? → {available, reason} |
| GET | /dashboard/endpoints | list your endpoints |
| POST | /dashboard/endpoints/api | create an API relay (free:true for a free listing — no price/pay_to) |
| POST | /dashboard/endpoints/mcp | create an MCP wrapper |
| PATCH | /dashboard/endpoints/{id} | edit (price/origin/method/networks/auth/desc + sample/trust fields; free to toggle) |
| POST | /dashboard/endpoints/{id}/publish | publish (→ active) |
| POST | /dashboard/endpoints/{id}/probe | re-run the origin probe → rebuild the sample (API, trial_safe); returns the generated sample |
| POST | /dashboard/endpoints/{id}/introspect | MCP wrappers: fill per-tool input schemas from upstream tools/list |
| POST | /dashboard/endpoints/{id}/pause | pause (→ disabled) |
| POST | /dashboard/endpoints/{id}/resume | resume (→ active) |
| DELETE | /dashboard/endpoints/{id} | soft-delete |
| GET | /dashboard/stats | usage/revenue totals |
| GET | /dashboard/payments | recent payments |
| GET/POST | /dashboard/wallets, /dashboard/wallets/external | payout wallets |
| GET/POST/DELETE | /dashboard/automation-keys[/{id}] | manage automation keys |
OAuth (connect in Claude)
| Method | Path | Purpose |
|---|
| GET | /.well-known/oauth-protected-resource | resource metadata (RFC 9728) |
| GET | /.well-known/oauth-authorization-server | AS metadata (RFC 8414) |
| POST | /oauth/register | dynamic client registration (RFC 7591) |
| GET | /oauth/authorize | start auth-code + PKCE flow (uses your session) |
| POST | /oauth/consent | approve/deny → issues a code |
| POST | /oauth/token | exchange code + PKCE verifier → access token |
Facilitator (x402 verify/settle)
| Method | Path | Purpose |
|---|
| GET | /x402/{base,stellar}/supported | advertised (scheme, network) kinds |
| POST | /x402/{base,stellar}/verify | verify a presented payment |
| POST | /x402/{base,stellar}/settle | settle on-chain |
A network is only settleable if its splitter/asset/relayer are configured —
otherwise verify/settle return 503 “network not configured” even though
/supported lists it.