{
  "components": {
    "headers": {
      "QuotaLimit": {
        "description": "The monthly call cap for the caller's plan.",
        "schema": {
          "type": "integer"
        }
      },
      "QuotaUsed": {
        "description": "Calls made this month, after this call.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitLimit": {
        "description": "The per-minute call limit for the caller's plan.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Calls left in the current minute window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "Unix time when the current minute window resets.",
        "schema": {
          "type": "integer"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying, on a 429 for the minute window.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "InternalError": {
        "content": {
          "application/json": {
            "example": {
              "code": "internal_error",
              "error": "Could not read the history.",
              "status": 500
            },
            "schema": {
              "$ref": "#/components/schemas/ErrorBody"
            }
          }
        },
        "description": "The server could not answer."
      },
      "InvalidDomain": {
        "content": {
          "application/json": {
            "example": {
              "code": "invalid_domain",
              "detail": {
                "domain": "not a domain"
              },
              "error": "That domain is not valid.",
              "status": 422
            },
            "schema": {
              "$ref": "#/components/schemas/ErrorBody"
            }
          }
        },
        "description": "Bad input, such as a domain that is not valid or a tampered cursor."
      },
      "PlanRequired": {
        "content": {
          "application/json": {
            "example": {
              "code": "plan_required",
              "error": "Class and score filters on the drop feed need Pro, API 100K, or API 1M.",
              "status": 403
            },
            "schema": {
              "$ref": "#/components/schemas/ErrorBody"
            }
          }
        },
        "description": "The call uses a filter the plan does not include. Class and score filters need a plan that includes the filtered drop feed, see the pricing page."
      },
      "RateLimited": {
        "content": {
          "application/json": {
            "example": {
              "code": "rate_limited",
              "detail": {
                "retry_after": "42"
              },
              "error": "Too many requests. Try again soon.",
              "status": 429
            },
            "schema": {
              "$ref": "#/components/schemas/ErrorBody"
            }
          }
        },
        "description": "Past the per-minute rate or the monthly cap. Retry-After is set for the minute window; the reset date is in the error detail for the monthly cap.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "X-Quota-Limit": {
            "$ref": "#/components/headers/QuotaLimit"
          },
          "X-Quota-Used": {
            "$ref": "#/components/headers/QuotaUsed"
          }
        }
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "example": {
              "code": "unauthorized",
              "error": "An API key is required.",
              "status": 401
            },
            "schema": {
              "$ref": "#/components/schemas/ErrorBody"
            }
          }
        },
        "description": "Missing or revoked API key."
      }
    },
    "schemas": {
      "Availability": {
        "description": "One availability answer.",
        "properties": {
          "currency": {
            "description": "The currency of the prices, such as USD.",
            "type": "string"
          },
          "premium": {
            "description": "Whether the name is a premium registration.",
            "type": "boolean"
          },
          "price_cents": {
            "description": "The registration price in the smallest currency unit, when available.",
            "type": "integer"
          },
          "reason": {
            "description": "Why the name is unavailable, or why the availability is unconfirmed.",
            "type": "string"
          },
          "renewal_price_cents": {
            "description": "The renewal price in the smallest currency unit, when available.",
            "type": "integer"
          },
          "status": {
            "description": "Registered when the name is in a zone or registered per RDAP. Available only after a registrar confirmation with a price. Unconfirmed when no registrar could confirm.",
            "enum": [
              "registered",
              "available",
              "unavailable",
              "unconfirmed"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "DomainEvent": {
        "description": "One domain event.",
        "properties": {
          "after": {
            "type": [
              "string",
              "null"
            ]
          },
          "before": {
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "type": "string"
          },
          "event": {
            "description": "The event name, such as added, removed, ns_changed, status_changed, registrar_changed or dropped.",
            "type": "string"
          },
          "seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "source": {
            "description": "Where the event came from: zone, rdap, drop_list or auction.",
            "type": "string"
          },
          "tld": {
            "type": "string"
          }
        },
        "required": [
          "domain",
          "tld",
          "event",
          "seen_at",
          "source"
        ],
        "type": "object"
      },
      "DomainRecord": {
        "description": "One domain record. Every field is present in every lookup, even when the value is null.",
        "properties": {
          "alive": {
            "description": "Whether the name is currently in a zone.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "created": {
            "description": "The registration date from RDAP.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "destination": {
            "description": "A routing table key, or null when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "description": "The domain in its Unicode display form.",
            "type": "string"
          },
          "drop_date": {
            "description": "The expected drop date, when known.",
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "expiry": {
            "description": "The expiry date from RDAP.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "first_seen": {
            "description": "The first date the name appeared in a zone.",
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "flags": {
            "description": "Flags that mean the name will not drop on schedule.",
            "items": {
              "enum": [
                "registry_lock",
                "client_hold",
                "server_hold"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "freshness": {
            "$ref": "#/components/schemas/Freshness"
          },
          "known": {
            "description": "False when nothing is held for this name.",
            "type": "boolean"
          },
          "last_rdap_at": {
            "description": "When RDAP last answered for this name.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "last_seen": {
            "description": "The last date the name appeared in a zone.",
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "ns": {
            "description": "The name servers from the zone.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "phase": {
            "description": "The lifecycle phase, or null when nothing is known.",
            "enum": [
              "active",
              "grace",
              "redemption",
              "pending_delete",
              "dropped",
              "available",
              "reregistered",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "punycode": {
            "description": "The ASCII form, used as the storage key.",
            "type": "string"
          },
          "registrar_iana_id": {
            "description": "The IANA registrar ID from RDAP.",
            "type": [
              "integer",
              "null"
            ]
          },
          "registrar_name": {
            "description": "The registrar name from RDAP.",
            "type": [
              "string",
              "null"
            ]
          },
          "statuses": {
            "description": "The EPP statuses from RDAP.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tld": {
            "description": "The public suffix, such as com.",
            "type": "string"
          },
          "updated": {
            "description": "The last changed date from RDAP.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "domain",
          "tld",
          "punycode",
          "ns",
          "statuses",
          "flags",
          "known",
          "freshness"
        ],
        "type": "object"
      },
      "Drop": {
        "description": "One unresolved drop.",
        "properties": {
          "class": {
            "description": "The name class, such as word, llll or nnnn.",
            "type": [
              "string",
              "null"
            ]
          },
          "destination": {
            "description": "A routing table key, or null when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "type": "string"
          },
          "drop_date": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "phase": {
            "description": "The lifecycle phase of the drop.",
            "type": "string"
          },
          "score": {
            "description": "The drop score, null until scores are filled.",
            "type": [
              "integer",
              "null"
            ]
          },
          "tld": {
            "type": "string"
          }
        },
        "required": [
          "domain",
          "tld",
          "phase"
        ],
        "type": "object"
      },
      "DropAction": {
        "description": "One recommended action in the drop advice.",
        "properties": {
          "action": {
            "description": "What to do at the venue.",
            "type": "string"
          },
          "catch_probability": {
            "description": "The chance the venue catches the name, null when no rate exists.",
            "type": [
              "number",
              "null"
            ]
          },
          "cost": {
            "description": "The cost in cents, null when the venue states no cost.",
            "type": [
              "integer",
              "null"
            ]
          },
          "link": {
            "description": "The link to act at the venue, empty for a wasted action.",
            "type": "string"
          },
          "probability_source": {
            "description": "Where the catch probability came from.",
            "enum": [
              "outcomes",
              "third_party"
            ],
            "type": "string"
          },
          "success_only": {
            "description": "True when the venue charges only on a catch.",
            "type": "boolean"
          },
          "venue": {
            "description": "The venue key.",
            "type": "string"
          },
          "wasted": {
            "description": "True when the venue cannot catch this name.",
            "type": "boolean"
          }
        },
        "required": [
          "venue",
          "action",
          "success_only",
          "probability_source",
          "link",
          "wasted"
        ],
        "type": "object"
      },
      "DropAdvice": {
        "description": "The drop advice for one domain.",
        "properties": {
          "actions": {
            "description": "The recommended actions, in order.",
            "items": {
              "$ref": "#/components/schemas/DropAction"
            },
            "type": "array"
          },
          "destination": {
            "description": "The venue key the name goes to, or null when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "description": "Notes on the advice, including the reason when there is no advice.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "phase": {
            "description": "The lifecycle phase of the name, or null when nothing is known.",
            "type": [
              "string",
              "null"
            ]
          },
          "timing": {
            "description": "When the name moves, as a sentence.",
            "type": "string"
          }
        },
        "required": [
          "phase",
          "destination",
          "timing",
          "actions",
          "notes"
        ],
        "type": "object"
      },
      "ErrorBody": {
        "description": "The shared error body for every API answer.",
        "properties": {
          "code": {
            "description": "A machine-readable code: unauthorized, invalid_domain, rate_limited, quota_exceeded, watch_cap_exceeded, too_many_names, body_too_large or internal_error.",
            "enum": [
              "unauthorized",
              "invalid_domain",
              "rate_limited",
              "quota_exceeded",
              "internal_error",
              "watch_cap_exceeded",
              "body_too_large",
              "too_many_names"
            ],
            "type": "string"
          },
          "detail": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Extra detail, such as the offending domain, a retry_after in seconds, or a reset_date.",
            "type": "object"
          },
          "error": {
            "description": "Plain words for the caller.",
            "type": "string"
          },
          "errors": {
            "description": "A list of errors, when there is more than one.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "status": {
            "description": "The HTTP status code.",
            "type": "integer"
          }
        },
        "required": [
          "status",
          "code",
          "error"
        ],
        "type": "object"
      },
      "Freshness": {
        "description": "Where the data in a lookup came from.",
        "properties": {
          "rdap": {
            "description": "Whether the RDAP data is fresh, cached, stale because RDAP could not be reached, or not found.",
            "enum": [
              "fresh",
              "cached",
              "stale",
              "not_found",
              "rate_limited",
              "unavailable",
              "unsupported"
            ],
            "type": "string"
          },
          "retry_at": {
            "description": "When to retry, when rdap is rate_limited.",
            "format": "date-time",
            "type": "string"
          },
          "zone_date": {
            "description": "The newest zone ingested for the TLD.",
            "format": "date",
            "type": "string"
          },
          "zone_status": {
            "description": "Present when zone coverage is degraded.",
            "type": "string"
          }
        },
        "required": [
          "rdap"
        ],
        "type": "object"
      },
      "Watch": {
        "description": "One watched domain for one user.",
        "properties": {
          "id": {
            "description": "The watch id.",
            "type": "integer"
          },
          "user_id": {
            "description": "The user who watches the domain.",
            "type": "integer"
          },
          "domain": {
            "description": "The watched domain.",
            "type": "string"
          },
          "tld": {
            "description": "The top-level domain.",
            "type": "string"
          },
          "owned": {
            "description": "True when the user owns the domain.",
            "type": "boolean"
          },
          "muted": {
            "description": "Triggers muted for this watch.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "description": "When the watch was added.",
            "format": "date-time",
            "type": "string"
          },
          "rdap_fetched": {
            "description": "True when the domain has RDAP data stored.",
            "type": "boolean"
          },
          "competition": {
            "description": "Competition for the domain, low, medium or high. Only present when the caller's plan holds the competition feature. Raw watch and search counts never appear.",
            "enum": ["low", "medium", "high"],
            "type": "string"
          },
          "check": {
            "$ref": "#/components/schemas/OwnedCheck"
          }
        },
        "required": [
          "id",
          "user_id",
          "domain",
          "tld",
          "owned",
          "muted",
          "created_at",
          "rdap_fetched"
        ],
        "type": "object"
      },
      "OwnedCheck": {
        "description": "The latest owned check for one owned watch. Only present when the watch is owned and has been checked. Absent when the watch has never been checked.",
        "properties": {
          "checked_at": {
            "description": "When the check ran.",
            "format": "date-time",
            "type": "string"
          },
          "dns_ok": {
            "description": "True when the domain resolved.",
            "type": "boolean"
          },
          "ssl_expiry": {
            "description": "When the certificate on port 443 expires. Null when no certificate was read.",
            "format": "date-time",
            "type": ["string", "null"]
          },
          "spf": {
            "description": "True when the domain has a TXT record starting v=spf1.",
            "type": "boolean"
          },
          "dmarc": {
            "description": "True when _dmarc has a TXT record.",
            "type": "boolean"
          },
          "error": {
            "description": "The failure when a lookup or the handshake failed. Absent on a clean check.",
            "type": "string"
          }
        },
        "required": [
          "checked_at",
          "dns_ok",
          "spf",
          "dmarc"
        ],
        "type": "object"
      },
      "DomainCell": {
        "description": "One TLD cell of a name check.",
        "properties": {
          "confirmable": {
            "description": "Whether the cell can be confirmed with a registrar. True on unconfirmed cells.",
            "type": "boolean"
          },
          "currency": {
            "description": "The currency of the prices, such as USD.",
            "type": "string"
          },
          "domain": {
            "description": "The full domain, such as example.com.",
            "type": "string"
          },
          "premium": {
            "description": "Whether the name is a premium registration.",
            "type": "boolean"
          },
          "price_cents": {
            "description": "The price in the smallest currency unit, when confirmed.",
            "type": "integer"
          },
          "provider": {
            "description": "The registrar that confirmed the cell, such as Name.com.",
            "type": "string"
          },
          "reason": {
            "description": "Why the name is unavailable or reserved, or why the cell is unconfirmed.",
            "type": "string"
          },
          "renewal_price_cents": {
            "description": "The renewal price in the smallest currency unit, when confirmed.",
            "type": "integer"
          },
          "status": {
            "description": "Registered when the name is in a zone. Available or premium only after a registrar confirmation with a price. Unconfirmed when no registrar could confirm.",
            "enum": [
              "registered",
              "available",
              "premium",
              "unavailable",
              "reserved",
              "unconfirmed"
            ],
            "type": "string"
          },
          "tld": {
            "description": "The TLD, such as com.",
            "type": "string"
          }
        },
        "required": [
          "tld",
          "domain",
          "status"
        ],
        "type": "object"
      },
      "HandleCell": {
        "description": "One site cell of a name check.",
        "properties": {
          "checked_at": {
            "description": "When the handle was last checked, in RFC 3339.",
            "format": "date-time",
            "type": "string"
          },
          "confidence": {
            "description": "How sure the answer is. High only when the site returned an unambiguous signal.",
            "type": "string"
          },
          "display_name": {
            "description": "The site name, such as GitHub.",
            "type": "string"
          },
          "handle": {
            "description": "The handle as checked, lowercased.",
            "type": "string"
          },
          "method": {
            "description": "How the handle was checked, such as official API or public profile probe.",
            "type": "string"
          },
          "profile_url": {
            "description": "The profile page for the handle, when the site has one.",
            "type": "string"
          },
          "reason": {
            "description": "Why the handle is reserved or invalid, when it is.",
            "type": "string"
          },
          "site": {
            "description": "The site key, such as github.",
            "type": "string"
          },
          "status": {
            "description": "Taken, available, reserved, unknown, checking or invalid.",
            "enum": [
              "taken",
              "available",
              "reserved",
              "unknown",
              "checking",
              "invalid"
            ],
            "type": "string"
          }
        },
        "required": [
          "site",
          "display_name",
          "handle",
          "status"
        ],
        "type": "object"
      },
      "Namecheck": {
        "description": "One name check answer.",
        "properties": {
          "domains": {
            "description": "One cell per configured TLD, in position order.",
            "items": {
              "$ref": "#/components/schemas/DomainCell"
            },
            "type": "array"
          },
          "handles": {
            "description": "One cell per enabled site, in site key order.",
            "items": {
              "$ref": "#/components/schemas/HandleCell"
            },
            "type": "array"
          },
          "name": {
            "description": "The name as checked, in its display form.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "domains",
          "handles"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "description": "A project API key as a Bearer token, or in the X-API-Key header.",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Domain records, history, availability, the drop feed and usage. Every call is authenticated with an API key unless noted. Limits come from the caller's plan.",
    "title": "Domain API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/availability": {
      "get": {
        "description": "Returns registered, available, unavailable or unconfirmed. Available is returned only after a registrar confirmation with a price. A name in a zone or registered per RDAP returns registered without asking a registrar. Without a registrar, or with it failing, the answer is unconfirmed with a reason.",
        "operationId": "domainAvailability",
        "parameters": [
          {
            "in": "query",
            "name": "domain",
            "required": true,
            "schema": {
              "example": "example.com",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Availability"
                }
              }
            },
            "description": "The availability answer.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/QuotaLimit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/QuotaUsed"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/InvalidDomain"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Domain availability",
        "tags": [
          "domains"
        ]
      }
    },
    "/v1/drop": {
      "get": {
        "description": "The drop advice for one domain, with the phase, the destination, the timing, and the recommended actions with catch probabilities. A name with no advice carries the reason in notes.",
        "operationId": "domainDropAdvice",
        "parameters": [
          {
            "in": "query",
            "name": "domain",
            "required": true,
            "schema": {
              "example": "example.com",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DropAdvice"
                }
              }
            },
            "description": "The drop advice.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/QuotaLimit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/QuotaUsed"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/InvalidDomain"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Drop advice",
        "tags": [
          "domains"
        ]
      }
    },
    "/v1/feed/drops": {
      "get": {
        "description": "Unresolved drops, soonest first, cursor paged, at most 1000 a page. Class and score filters need a plan that includes the filtered drop feed, see the pricing page. Filtering by min_score returns nothing until scores are filled.",
        "operationId": "dropFeed",
        "parameters": [
          {
            "in": "query",
            "name": "tld",
            "required": false,
            "schema": {
              "example": "com",
              "type": "string"
            }
          },
          {
            "description": "Drops on one date, YYYY-MM-DD.",
            "in": "query",
            "name": "date",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Drops on or after this date, YYYY-MM-DD.",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Drops on or before this date, YYYY-MM-DD.",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "The name class, such as word, llll or nnnn. Needs a plan that includes the filtered drop feed, see the pricing page.",
            "in": "query",
            "name": "class",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Minimum drop score. Needs a plan that includes the filtered drop feed, see the pricing page. Returns nothing until scores are filled.",
            "in": "query",
            "name": "min_score",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Drops per page, at most 1000. Defaults to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor from the previous page. A tampered cursor is a 422.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "drops": {
                      "items": {
                        "$ref": "#/components/schemas/Drop"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "Present when another page follows.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "drops"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "One page of unresolved drops.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/QuotaLimit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/QuotaUsed"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "422": {
            "$ref": "#/components/responses/InvalidDomain"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Drop feed",
        "tags": [
          "feed"
        ]
      }
    },
    "/v1/history": {
      "get": {
        "description": "Events for the domain, newest first, cursor paged.",
        "operationId": "domainHistory",
        "parameters": [
          {
            "in": "query",
            "name": "domain",
            "required": true,
            "schema": {
              "example": "example.com",
              "type": "string"
            }
          },
          {
            "description": "Events per page, at most 1000. Defaults to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "type": "integer"
            }
          },
          {
            "description": "The next_cursor from the previous page. A tampered cursor is a 422.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "events": {
                      "items": {
                        "$ref": "#/components/schemas/DomainEvent"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "description": "Present when another page follows.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "events"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "One page of events.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/QuotaLimit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/QuotaUsed"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/InvalidDomain"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Domain history",
        "tags": [
          "domains"
        ]
      }
    },
    "/v1/lookup": {
      "get": {
        "description": "Returns the domain record with flags, known and freshness. A name never seen returns known false with an answer, not a 404.",
        "operationId": "lookupDomain",
        "parameters": [
          {
            "description": "The domain to look up. Unicode input is normalized to its ASCII form.",
            "in": "query",
            "name": "domain",
            "required": true,
            "schema": {
              "example": "example.com",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainRecord"
                }
              }
            },
            "description": "The domain record.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/QuotaLimit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/QuotaUsed"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/InvalidDomain"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Look up a domain record",
        "tags": [
          "domains"
        ]
      }
    },
    "/v1/namecheck": {
      "get": {
        "description": "Returns availability across every configured TLD and the handle across every enabled site. Domain cells are registered, available with a confirmed price, premium with a confirmed price, unavailable, reserved or unconfirmed. Available is returned only after a registrar confirmation with a price. Handle cells read the shared cache first and show checking while a probe is queued.",
        "operationId": "checkName",
        "parameters": [
          {
            "description": "The name to check, a label such as example. A full domain is accepted and its label is used.",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "example": "example",
              "type": "string"
            }
          },
          {
            "description": "Only these TLDs, as a comma separated list such as com,net. Empty means every configured TLD.",
            "in": "query",
            "name": "tlds",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only these sites, as a comma separated list such as github,x. Empty means every enabled site.",
            "in": "query",
            "name": "sites",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Namecheck"
                }
              }
            },
            "description": "The name check answer.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "X-Quota-Limit": {
                "$ref": "#/components/headers/QuotaLimit"
              },
              "X-Quota-Used": {
                "$ref": "#/components/headers/QuotaUsed"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/InvalidDomain"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Check a name",
        "tags": [
          "domains"
        ]
      }
    },
    "/v1/openapi.json": {
      "get": {
        "description": "The OpenAPI 3.1 document for this API. Not counted, no key needed.",
        "operationId": "openapiDocument",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The OpenAPI document."
          }
        },
        "security": [],
        "summary": "OpenAPI document",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "description": "Calls used and the monthly cap for the caller's plan. Not counted against the cap.",
        "operationId": "usage",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "calls_limit": {
                      "description": "The monthly cap for the caller's plan.",
                      "type": "integer"
                    },
                    "calls_used": {
                      "description": "Calls made this month.",
                      "type": "integer"
                    },
                    "reset_date": {
                      "description": "The first day of the next month, when the cap resets.",
                      "format": "date",
                      "type": "string"
                    }
                  },
                  "required": [
                    "calls_used",
                    "calls_limit",
                    "reset_date"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The caller's usage."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Usage",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/watch": {
      "post": {
        "description": "Add domains to the caller's watch list, all or nothing against the cap. An import that would pass the cap is rejected whole with a message saying how many fit.",
        "operationId": "addWatch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "domains": {
                    "description": "Domains to watch.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "owned": {
                    "description": "True when the caller owns these domains.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "domains"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "watches": {
                      "description": "The watches that were added.",
                      "items": {
                        "$ref": "#/components/schemas/Watch"
                      },
                      "type": "array"
                    },
                    "skipped": {
                      "description": "Names that did not parse and were not added.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "watches"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The watches that were added."
          },
          "400": {
            "$ref": "#/components/responses/InvalidDomain"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "The import would pass the watch cap and was rejected whole."
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Add watches",
        "tags": [
          "watch"
        ]
      },
      "delete": {
        "description": "Remove one watch for the caller. A domain the caller does not watch is a no-op.",
        "operationId": "deleteWatch",
        "parameters": [
          {
            "description": "The domain to stop watching.",
            "in": "query",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "description": "True when the watch was removed.",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The watch was removed."
          },
          "400": {
            "$ref": "#/components/responses/InvalidDomain"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Remove a watch",
        "tags": [
          "watch"
        ]
      }
    },
    "/v1/watches": {
      "get": {
        "description": "List the caller's watches with the cap and count.",
        "operationId": "listWatches",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "watches": {
                      "description": "The caller's watches, newest first.",
                      "items": {
                        "$ref": "#/components/schemas/Watch"
                      },
                      "type": "array"
                    },
                    "cap": {
                      "description": "The watch cap for the caller's plan.",
                      "type": "integer"
                    },
                    "count": {
                      "description": "How many watches the caller has.",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "watches",
                    "cap",
                    "count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The caller's watches."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List watches",
        "tags": [
          "watch"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.example.com"
    }
  ],
  "tags": [
    {
      "description": "Domain records and availability.",
      "name": "domains"
    },
    {
      "description": "The drop feed.",
      "name": "feed"
    },
    {
      "description": "Usage and the API document.",
      "name": "account"
    }
  ]
}
