Enigma
Chain: Synced
DocsAPI Reference
Back to Docs

API Reference

All endpoints follow a standard response envelope with data, error, and optional meta fields. Base URL: https://enigma.app

Standard Response Format

{
  "data":  { … } | null,
  "error": null   | { "message": "…", "code": "…", "fields": { … } },
  "meta":  { "page": 1, "limit": 20, "total": 1693, "totalPages": 85 }
}

Agents

List, search, and retrieve agent profiles from the on-chain registry.

GET/api/v1/agents

List all agents with optional filters, sorting, and pagination.

Parameters

NameTypeRequiredDescription
typestringNoFilter by agent type (e.g. MCP, A2A, WEB)
statusstringNoFilter by status: VERIFIED | PENDING | FLAGGED | SUSPENDED
minTrustScorenumberNoMinimum trust score (0–100)
searchstringNoFull-text search on name and description
sortBystringNoSort field: trust_score | created_at | updated_at
sortOrderstringNoasc | desc (default: desc)
pagenumberNoPage number (default: 1)
limitnumberNoItems per page (default: 20, max: 100)

Response

{
  "data": [
    {
      "address": "0x1a2b3c…",
      "name": "AlphaBot",
      "type": "MCP",
      "status": "VERIFIED",
      "trust_score": 87,
      "services": ["mcp"],
      "created_at": "2025-01-10T12:00:00Z",
      "updated_at": "2025-06-01T08:30:00Z"
    }
  ],
  "error": null,
  "meta": { "page": 1, "limit": 20, "total": 1693, "totalPages": 85 }
}
GET/api/v1/agents/:address

Get full details for a single agent including services, capabilities, and registrations.

Response

{
  "data": {
    "address": "0x1a2b3c…",
    "name": "AlphaBot",
    "type": "MCP",
    "status": "VERIFIED",
    "trust_score": 87,
    "description": "Autonomous MCP agent for DeFi analytics",
    "owner_address": "0xabc…",
    "services": ["mcp"],
    "capabilities": ["swap", "bridge"],
    "registrations": ["avalanche-c-chain"],
    "created_at": "2025-01-10T12:00:00Z",
    "updated_at": "2025-06-01T08:30:00Z"
  },
  "error": null
}
GET/api/v1/agents/stats

Aggregated platform statistics: total agents, verified count, active in last 24 h, breakdown by type and status.

Response

{
  "data": {
    "total": 1693,
    "verified": 412,
    "active24h": 38,
    "byStatus": { "VERIFIED": 412, "PENDING": 1201, "FLAGGED": 47, "SUSPENDED": 33 },
    "byType":   { "MCP": 540, "A2A": 320, "WEB": 610, "CUSTOM": 223 }
  },
  "error": null
}
GET/api/v1/agents/sparklines

Batch fetch the last 10 trust score snapshots for up to 50 agents (for sparkline charts).

Parameters

NameTypeRequiredDescription
addressesstringYesComma-separated list of agent addresses (max 50)

Response

{
  "data": {
    "0x1a2b3c…": [{ "v": 72 }, { "v": 75 }, { "v": 80 }, { "v": 87 }],
    "0x4d5e6f…": [{ "v": 55 }, { "v": 60 }]
  },
  "error": null
}

Trust Score

Retrieve the weighted trust score breakdown for any agent.

GET/api/v1/agents/:address/trust-score

Full trust score breakdown with individual component scores, weights, and details.

Response

{
  "data": {
    "address": "0x1a2b3c…",
    "score": 87,
    "breakdown": {
      "volume":  { "score": 90, "weight": 0.25, "weighted": 22.5, "details": { … } },
      "proxy":   { "score": 85, "weight": 0.20, "weighted": 17.0, "details": { … } },
      "uptime":  { "score": 92, "weight": 0.25, "weighted": 23.0, "details": { … } },
      "ozMatch": { "score": 78, "weight": 0.15, "weighted": 11.7, "details": { … } },
      "ratings": { "score": 82, "weight": 0.15, "weighted": 12.3, "details": { … } }
    },
    "lastUpdated": "2025-06-01T08:30:00Z"
  },
  "error": null
}

Ratings

Community ratings for agents. Submit and retrieve 1–5 star ratings.

GET/api/v1/agents/:address/ratings

Retrieve paginated community ratings for an agent.

Parameters

NameTypeRequiredDescription
pagenumberNoPage number (default: 1)
limitnumberNoItems per page (default: 10)

Response

{
  "data": [
    { "id": "…", "score": 5, "comment": "Great agent!", "rater_address": "0x…", "created_at": "…" }
  ],
  "error": null,
  "meta": { "page": 1, "limit": 10, "total": 42, "totalPages": 5 }
}
POST/api/v1/agents/:address/ratings🔒 Wallet signature required

Submit a community rating (1–5) for an agent. Requires a connected wallet.

Parameters

NameTypeRequiredDescription
scorenumberYesRating from 1 to 5
commentstringNoOptional text comment (max 500 chars)
walletstringYesConnected wallet address

Response

{
  "data": { "id": "…", "score": 5, "comment": "Great agent!", "created_at": "…" },
  "error": null
}

Reports

Submit reports for agents that violate platform policies.

POST/api/v1/agents/:address/reports🔒 Wallet signature required

Report an agent with a reason and optional description. Requires a connected wallet.

Parameters

NameTypeRequiredDescription
reasonstringYesReport category: SPAM | SCAM | MALICIOUS | OTHER
descriptionstringNoAdditional details (max 1000 chars)
walletstringYesConnected wallet address

Response

{
  "data": { "id": "…", "reason": "SCAM", "created_at": "…" },
  "error": null
}

Registration

Register a new autonomous agent on the Enigma registry.

POST/api/v1/agents/register🔒 Wallet signature required

Register a new agent on-chain. Triggers ERC-8004 tokenURI resolution and initial trust score calculation.

Parameters

NameTypeRequiredDescription
addressstringYesAgent contract address on Avalanche C-Chain
namestringYesHuman-readable agent name (max 100 chars)
descriptionstringNoAgent description (max 500 chars)
typestringYesAgent type: MCP | A2A | WEB | CUSTOM
walletstringYesOwner wallet address

Response

{
  "data": {
    "address": "0x1a2b3c…",
    "name": "MyAgent",
    "status": "PENDING",
    "trust_score": 0
  },
  "error": null
}

System

Platform health and activity data.

GET/api/v1/health

Health check endpoint. Returns service status and database connectivity.

Response

{
  "data": {
    "status": "ok",
    "database": "connected",
    "timestamp": "2025-06-01T08:30:00Z"
  },
  "error": null
}
GET/api/v1/agents/activity

Agent registration and verification activity over time (used by the Activity Chart).

Parameters

NameTypeRequiredDescription
daysnumberNoNumber of past days to return (default: 30)

Response

{
  "data": [
    { "date": "2025-05-31", "registrations": 12, "verifications": 4 },
    { "date": "2025-06-01", "registrations": 7,  "verifications": 2 }
  ],
  "error": null
}