Base URL
All endpoints are versioned under /api/v1. The API uses JSON for request and response bodies, and returns standard HTTP status codes.
Authentication
Pass your API key or session token in the Authorization header:
Authorization: Bearer asn_live_k1a2b3c4d5e6f7...
Public endpoints (verification, agent profiles) do not require authentication. See Authentication for which endpoints are public.
Rate Limits
Rate limit headers are included in every response:
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1710763260
When rate limited, you receive a 429 with a Retry-After header in seconds.
Error Format
All errors return a consistent JSON envelope:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid ASN format",
"status": 400
}
}400 VALIDATION_ERROR — Invalid input or parameters401 UNAUTHORIZED — Missing or invalid authentication402 AGENT_LIMIT_REACHED — Tier agent limit exceeded403 FORBIDDEN — Insufficient permissions404 NOT_FOUND — Resource not found410 AGENT_DEACTIVATED — Agent is deactivated429 RATE_LIMITED — Too many requests500 INTERNAL_ERROR — Server errorcurl Examples
Verify an agent (public):
curl https://asn.earth/api/v1/verify/ASN-2026-0384-7721-A
Register an agent:
curl -X POST https://asn.earth/api/v1/agents \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Agent",
"class": "A",
"description": "Autonomous task runner"
}'Report activity:
curl -X POST https://asn.earth/api/v1/activity/report \
-H "Authorization: Bearer asn_live_k1a2b3c4..." \
-H "Content-Type: application/json" \
-d '{
"asn": "ASN-2026-0384-0001-7",
"event_type": "task_completed",
"metadata": { "task_id": "task-1" }
}'Get trust score:
curl https://asn.earth/api/v1/agents/ASN-2026-0384-7721-A/trust-score
Full verification (authenticated):
curl https://asn.earth/api/v1/verify/ASN-2026-0384-7721-A/full \ -H "Authorization: Bearer asn_live_k1a2b3c4..."
Content Type
All request bodies must be JSON with Content-Type: application/json. All responses are JSON.
Pagination
List endpoints support cursor-based pagination:
page — Page number (1-indexed, default: 1)per_page — Items per page (default: 20, max: 50)Paginated responses include a pagination object with page, per_page, total, and total_pages.