Registry API
REST API for the AgentDNS registry. Base URL: https://agent-dns.dev.
Authentication. Public endpoints (discover, services, validate, reports) require no auth. Endpoints under /api/users/me/* and /api/users/payment-method require a Bearer JWT obtained from the gateway sign-in flow (or an active browser session if you call them from a logged-in tab).
Set the header Authorization: Bearer <registry_token> on every authenticated request.
Search for services by intent. Returns matching services ranked by relevance, with capability matches highlighted.
Query Parameters
| q | string | Required. Natural language search query. |
GET /api/discover?q=send+email{
"success": true,
"query": "send email",
"result_count": 2,
"data": [
{
"service": {
"name": "MailForge",
"domain": "api.mailforge.dev",
"description": "Transactional email API",
"base_url": "https://api.mailforge.dev",
"auth_type": "api_key",
"pricing_type": "freemium",
"verified": true
},
"matching_capabilities": [
{
"name": "send_email",
"description": "Send a transactional email",
"detail_url": "https://api.mailforge.dev/api/capabilities/send_email"
}
]
}
]
}List all registered services with pagination, filtering, and sorting.
Query Parameters
| category | string? | Filter by category slug |
| search | string? | Text search in name/description |
| sort | string? | "newest" | "name" | "capabilities" |
| limit | number? | Max 100, default 50 |
| offset | number? | Pagination offset, default 0 |
Submit a new service. Two modes: auto-discover by domain, or manual manifest paste.
Mode 1: auto-discover
POST /api/services
Content-Type: application/json
{
"domain": "api.example.com"
}The registry crawls https://api.example.com/.well-known/agent, validates, and registers the service as verified.
Mode 2: manual manifest
POST /api/services
Content-Type: application/json
{
"manifest": {
"spec_version": "1.0",
"name": "My API",
"description": "...",
"base_url": "https://api.example.com",
"auth": { "type": "none" },
"capabilities": [ ... ]
}
}Registers as unverified until the live /.well-known/agent endpoint becomes reachable.
Get detailed information about a specific registered service, including all capabilities.
GET /api/services/api.mailforge.devReturns the full capability detail JSON: endpoint, method, parameters, request/response examples, auth scopes, rate limits. Used as a fallback when the service does not implement its own capability detail endpoints.
GET /api/services/gmail.googleapis.com/capabilities/users_messagesValidate a manifest without registering it. Useful for testing before submission.
{
"valid": true,
"errors": []
}Report a service for abuse, policy violation, or suspected impersonation. Reviewed by the AgentDNS team.
POST /api/reports
Content-Type: application/json
{
"domain": "suspicious-service.com",
"reason": "Phishing — impersonating a legitimate service"
}Returns the Stripe publishable key the local agent-gateway config page needs to mount Stripe Elements. Returns publishable_key: null if Stripe is not configured server-side, so the page can render gracefully.
{
"success": true,
"data": { "publishable_key": "pk_live_..." }
}List all services the signed-in user has toggled. Each entry includes enabled state, monthly spending cap, and whether a BYO credential blob is present.
{
"success": true,
"data": [
{
"user_id": 42,
"service_id": 7,
"domain": "api.openai.com",
"name": "OpenAI",
"enabled": true,
"monthly_cap_cents": 1000,
"has_byo_credentials": false,
"enabled_at": "2026-04-01T10:30:00Z"
}
]
}Upsert a per-service enablement row for the signed-in user. Either service_id or domain identifies the service. byo_credential_blob is a base64-encoded blob (set to null to clear it; omit to leave untouched).
POST /api/users/me/enablement
Content-Type: application/json
Authorization: Bearer <registry_token>
{
"domain": "api.openai.com",
"enabled": true,
"monthly_cap_cents": 2000
}Soft-delete the enablement (sets enabled=false). The row is kept so monthly cap and BYO credentials persist if the user re-enables later.
Returns a Stripe Customer Portal session URL. The signed-in user opens this URL to manage payment methods, view invoices, and download receipts. Requires the user has already added a card (i.e. stripe_customer_id is set).
{
"success": true,
"data": { "url": "https://billing.stripe.com/p/session/..." }
}Response format
All API responses follow a consistent format:
// Success
{ "success": true, "data": { ... } }
// Error
{ "success": false, "error": "Description of what went wrong" }
// Validation error
{ "success": false, "errors": ["error1", "error2"] }
// HTTP status codes:
// 200 — Success
// 201 — Created
// 400 — Bad request
// 401 — Not authenticated
// 403 — Blocked / forbidden
// 404 — Not found
// 409 — Conflict (already exists)
// 422 — Validation failed
// 429 — Rate limited
// 500 — Server error