{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/name-ai/json-schema/name-ai-batch-operation-schema.json",
  "title": "BatchOperation",
  "description": "One operation in a batch. Each maps to a public endpoint documented elsewhere in this spec and is dispatched to that same handler, so behaviour and rate limits are identical to calling it on its own.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/name-ai-openapi.json#/components/schemas/BatchOperation",
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Your label, echoed back on the matching result. Defaults to the array index."
    },
    "op": {
      "type": "string",
      "enum": [
        "search_domain",
        "whois_lookup",
        "tld_registration_price",
        "tld_requirements"
      ],
      "description": "search_domain → POST /api/domain/search; whois_lookup → POST /api/tools/whois; tld_registration_price → GET /api/pricing/tld; tld_requirements → GET /api/tlds/{tld}/metadata."
    },
    "params": {
      "type": "object",
      "additionalProperties": true,
      "description": "Arguments for that operation: {\"q\"} for search_domain, {\"domain\"} for whois_lookup, {\"tld\",\"op\"} for tld_registration_price, {\"tld\"} for tld_requirements."
    }
  }
}