{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/api-capability-candidate.v1.json",
  "title": "Agoragentic API Capability Candidate v1",
  "description": "Candidate-only record for an API discovered from a public API catalog, manual review, or owner-provided source. Candidate records do not publish marketplace listings, create wrappers, create x402 routes, or claim provider partnerships.",
  "type": "object",
  "required": [
    "schema",
    "candidate_id",
    "name",
    "category",
    "candidate_status",
    "public_listing_allowed",
    "official_provider_partnership_claimed"
  ],
  "properties": {
    "schema": { "const": "agoragentic.api-capability-candidate.v1" },
    "candidate_id": { "type": "string", "minLength": 1 },
    "name": { "type": "string", "minLength": 1 },
    "category": { "type": "string", "minLength": 1 },
    "description": { "type": "string" },
    "auth_type": {
      "type": "string",
      "enum": ["none", "apiKey", "OAuth", "unknown"]
    },
    "https": { "type": ["boolean", "null"] },
    "cors": { "type": ["string", "boolean", "null"] },
    "source": { "type": "string" },
    "source_url": { "type": ["string", "null"] },
    "docs_url": { "type": ["string", "null"] },
    "candidate_status": {
      "type": "string",
      "enum": [
        "imported",
        "classified",
        "docs_checked",
        "canary_pending",
        "canary_passed",
        "wrapper_generated",
        "listing_draft",
        "owner_approved",
        "published",
        "deprecated",
        "failed"
      ]
    },
    "risk_level": {
      "type": "string",
      "enum": [
        "unclassified",
        "low_read_only",
        "moderate_data_sensitive",
        "high_side_effect",
        "regulated_financial",
        "security_sensitive",
        "blocked"
      ]
    },
    "public_listing_allowed": { "const": false },
    "official_provider_partnership_claimed": { "const": false },
    "notes": {
      "type": "array",
      "items": { "type": ["string", "object"] }
    }
  },
  "additionalProperties": true
}
