API Docs

Minimal first, detailed on demand.

Kordu Probe exposes a small anonymous API with one primary endpoint. Website checks still use Turnstile, but direct API and curl usage do not require sign-up or browser challenges. The default response is intentionally terse; ask for the full envelope only when you need it.

Endpoints

MethodPathPurpose
GET/api/healthHealth and capability status
GET/api/openapi.jsonMachine-readable schema
POST/api/checkConnectivity checks with minimal responses by default
POST/api/probeTCP compatibility alias
GET/.well-known/api-catalogRFC 9727 API catalog

Supported modules

  • tcp: open, closed, or timeout from the public probe vantage
  • dns: A, AAAA, CNAME, MX, NS, TXT, and reverse lookups where useful
  • http: HTTP/HTTPS status, redirects, final URL, and response timing
  • ip: target normalization, reverse DNS, and RDAP-backed metadata
  • udp: explicitly unsupported in v1 on Cloudflare-only infrastructure

Minimal by default

curl https://probe.kordu.tools/api/check \
  -X POST \
  -H "content-type: application/json" \
  -d '{
    "target": "example.com",
    "port": 443,
    "modules": ["tcp"]
  }'

Boolean output

curl "https://probe.kordu.tools/api/check?format=boolean" \
  -X POST \
  -H "content-type: application/json" \
  -d '{
    "target": "example.com",
    "port": 443,
    "modules": ["tcp"]
  }'

Full response on demand

curl "https://probe.kordu.tools/api/check?view=full" \
  -X POST \
  -H "content-type: application/json" \
  -d '{
    "target": "example.com",
    "port": 443,
    "modules": ["tcp", "dns", "http", "ip"],
    "timeoutMs": 3000
  }'

Prefer header

curl https://probe.kordu.tools/api/check \
  -X POST \
  -H "content-type: application/json" \
  -H "Prefer: return=representation" \
  -d '{
    "target": "example.com",
    "port": 443,
    "modules": ["tcp", "dns", "http", "ip"]
  }'

Default response

The default response is short and curl-friendly. For single-module checks, you get one concise status block instead of the full diagnostic envelope.

{
  "ok": true,
  "target": "example.com",
  "module": "tcp",
  "status": "open",
  "latencyMs": 18,
  "port": 443,
  "ip": "93.184.216.34"
}

Full response example

Use ?view=full or Prefer: return=representation when you need normalized targets, module-by-module results, commands, and the complete error envelope.

{
  "target": "example.com",
  "normalized": {
    "input": "example.com",
    "value": "example.com",
    "kind": "domain",
    "hostname": "example.com",
    "ip": null
  },
  "resolvedAddresses": ["93.184.216.34"],
  "modules": ["dns", "ip", "tcp", "http"],
  "results": {
    "tcp": { "status": "open" },
    "dns": { "status": "ok" },
    "http": { "status": "ok", "statusCode": 200 },
    "ip": { "status": "ok" }
  },
  "errors": []
}

Compatibility alias

curl https://probe.kordu.tools/api/probe \
  -X POST \
  -H "content-type: application/json" \
  -d '{
    "target": "example.com",
    "port": 443
  }'

Response controls

  • ?view=full: rich envelope with normalized targets, modules, results, commands, and errors
  • ?format=plain: plain text status such as open or timeout for single-module checks
  • ?format=boolean: true or false for single-module checks
  • Prefer: return=representation: standards-based alternative to ?view=full

OpenAPI excerpt

{
  "openapi": "3.1.0",
  "info": {
    "title": "Kordu Probe API",
    "version": "0.2.0",
    "description": "Anonymous public connectivity checks from a canonical Cloudflare Workers vantage, with modular TCP, DNS, HTTP/HTTPS, and IP/domain diagnostics."
  },
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Health endpoint",
        "responses": {
          "200": {
            "description": "API is healthy"
          }
        }
      }
    },
    "/api/openapi.json": {
      "get": {
        "summary": "OpenAPI document",
        "responses": {
          "200": {
            "description": "Machine-readable API schema"
          }
        }
      }
    },
    "/api/check": {
      "post": {
        "summary": "Run a connectivity check",
        "parameters": [
          {
            "name": "view",
            "in": "query",
            "description": "Response shape. Defaults to `minimal`; use `full` for the rich diagnostic envelope.",
            "schema": {
              "type": "string",
              "enum": [
                "minimal",
                "full"
              ],
              "default": "minimal"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Output encoding for minimal responses. `plain` and `boolean` only support single-module checks.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "plain",
                "boolean"
              ],
              "default": "json"
            }
          },
          {
            "name": "Prefer",
            "in": "header",
            "description": "Optional HTTP preference. `return=representation` requests the full response envelope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target"
                ],
                "properties": {
                  "target": {
                    "type": "string",
                    "description": "Public hostname or IP address to inspect."
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "modules": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "tcp",
                        "dns",
                        "http",
                        "ip",
                        "udp"
                      ]
                    }
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "minimum": 250,
                    "maximum": 10000,
                    "default": 3000
                  },
                  "http": {
                    "type": "object",
                    "properties": {
                      "scheme": {
                        "type": "string",
                        "enum": [
                          "http",
                          "https"
                        ]
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "HEAD",
                          "GET"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Connectivity check completed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "ok",
                        "target"
                      ],
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "target": {
                          "type": "string"
                        },
                        "module": {
                          "type": "string",
                          "enum": [
                            "tcp",
                            "dns",
                            "http",
                            "ip",
                            "udp"
                          ]
                        },
                        "status": {
                          "type": "string"
                        },
                        "latencyMs": {
                          "type": "integer",
                          "nullable": true
                        },
                        "port": {
                          "type": "integer",
                          "nullable": true
                        },
                        "ip": {
                          "type": "string",
                          "nullable": true
                        },
                        "url": {
                          "type": "string",
                          "nullable": true
                        },
                        "statusCode": {
                          "type": "integer",
                          "nullable": true
                        },
                        "records": {
                          "type": "integer",
                          "nullable": true
                        },
                        "ipVersion": {
                          "type": "string",
                          "enum": [
                            "IPv4",
                            "IPv6"
                          ],
                          "nullable": true
                        },
                        "reason": {
                          "type": "string",
                          "nullable": true
                        },
                        "checks": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "target",
                        "normalized",
                        "resolvedAddresses",
                        "vantage",
                        "modules",
                        "results",
                        "errors"
                      ],
                      "properties": {
                        "target": {
                          "type": "string"
                        },
                        "normalized": {
                          "type": "object",
                          "required": [
                            "input",
                            "value",
                            "kind",
                            "hostname",
                            "ip"
                          ],
                          "properties": {
                            "input": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "ip",
                                "domain"
                              ]
                            },
                            "hostname": {
                              "type": "string",
                              "nullable": true
                            },
                            "ip": {
                              "type": "string",
                              "nullable": true
                            }
                          }
                        },
                        "resolvedAddresses": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "vantage": {
                          "type": "object",
                          "required": [
                            "id",
                            "label",
                            "regionHint"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "regionHint": {
                              "type": "string"
                            }
                          }
                        },
                        "modules": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "tcp",
                              "dns",
                              "http",
                              "ip",
                              "udp"
                            ]
                          }
                        },
                        "results": {
                          "type": "object",
                          "properties": {
                            "tcp": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "closed",
                                    "timeout"
                                  ]
                                },
                                "moduleStatus": {
                                  "type": "string",
                                  "enum": [
                                    "ok",
                                    "timeout"
                                  ]
                                },
                                "latencyMs": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "explanation": {
                                  "type": "string"
                                },
                                "port": {
                                  "type": "integer"
                                }
                              }
                            },
                            "dns": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "ok",
                                    "failed",
                                    "timeout",
                                    "unsupported"
                                  ]
                                },
                                "resolver": {
                                  "type": "string"
                                },
                                "hostname": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "reverseNames": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "records": {
                                  "type": "object",
                                  "properties": {
                                    "a": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "aaaa": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "cname": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "mx": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "exchange": {
                                            "type": "string"
                                          },
                                          "priority": {
                                            "type": "integer"
                                          }
                                        }
                                      }
                                    },
                                    "ns": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "txt": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "http": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "ok",
                                    "failed",
                                    "timeout",
                                    "unsupported"
                                  ]
                                },
                                "scheme": {
                                  "type": "string",
                                  "enum": [
                                    "http",
                                    "https"
                                  ]
                                },
                                "method": {
                                  "type": "string",
                                  "enum": [
                                    "HEAD",
                                    "GET"
                                  ]
                                },
                                "url": {
                                  "type": "string"
                                },
                                "finalUrl": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "statusCode": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "ok": {
                                  "type": "boolean"
                                },
                                "latencyMs": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "redirectChain": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string"
                                      },
                                      "statusCode": {
                                        "type": "integer"
                                      },
                                      "location": {
                                        "type": "string",
                                        "nullable": true
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "ip": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "ok",
                                    "failed",
                                    "timeout",
                                    "unsupported"
                                  ]
                                },
                                "subject": {
                                  "type": "string"
                                },
                                "ip": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "ipVersion": {
                                  "type": "string",
                                  "enum": [
                                    "IPv4",
                                    "IPv6"
                                  ],
                                  "nullable": true
                                },
                                "reverseNames": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "source": {
                                  "type": "string"
                                },
                                "rdap": {
                                  "type": "object",
                                  "nullable": true,
                                  "properties": {
                                    "objectClassName": {
                                      "type": "string",
                                      "nullable": true
                                    },
                                    "handle": {
                                      "type": "string",
                                      "nullable": true
                                    },
                                    "name": {
                                      "type": "string",
                                      "nullable": true
                                    },
                                    "country": {
                                      "type": "string",
                                      "nullable": true
                                    },
                                    "parentHandle": {
                                      "type": "string",
                                      "nullable": true
                                    },
                                    "startAddress": {
                                      "type": "string",
                                      "nullable": true
                                    },
                                    "endAddress": {
                                      "type": "string",
                                      "nullable": true
                                    }
                                  }
                                }
                              }
                            },
                            "udp": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "unsupported"
                                  ]
                                },
                                "reason": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "module",
                              "code",
                              "message"
                            ],
                            "properties": {
                              "module": {
                                "type": "string",
                                "enum": [
                                  "tcp",
                                  "dns",
                                  "http",
                                  "ip",
                                  "udp"
                                ]
                              },
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "retryable": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "commands": {
                          "type": "object",
                          "properties": {
                            "tcp": {
                              "type": "object",
                              "properties": {
                                "curl": {
                                  "type": "string"
                                },
                                "netcat": {
                                  "type": "string"
                                },
                                "powershell": {
                                  "type": "string"
                                }
                              }
                            },
                            "http": {
                              "type": "object",
                              "properties": {
                                "curl": {
                                  "type": "string"
                                },
                                "powershell": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid target or malformed request"
          },
          "429": {
            "description": "Rate-limited"
          }
        }
      }
    },
    "/api/probe": {
      "post": {
        "summary": "Compatibility TCP probe alias",
        "parameters": [
          {
            "name": "view",
            "in": "query",
            "description": "Response shape. Defaults to `minimal`; use `full` for the rich diagnostic envelope.",
            "schema": {
              "type": "string",
              "enum": [
                "minimal",
                "full"
              ],
              "default": "minimal"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Output encoding for minimal responses. `plain` and `boolean` only support single-module checks.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "plain",
                "boolean"
              ],
              "default": "json"
            }
          },
          {
            "name": "Prefer",
            "in": "header",
            "description": "Optional HTTP preference. `return=representation` requests the full response envelope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target",
                  "port"
                ],
                "properties": {
                  "target": {
                    "type": "string",
                    "description": "Public hostname or IP address to test."
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "minimum": 250,
                    "maximum": 10000,
                    "default": 3000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "TCP probe completed",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "ok",
                        "target"
                      ],
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "target": {
                          "type": "string"
                        },
                        "module": {
                          "type": "string",
                          "enum": [
                            "tcp",
                            "dns",
                            "http",
                            "ip",
                            "udp"
                          ]
                        },
                        "status": {
                          "type": "string"
                        },
                        "latencyMs": {
                          "type": "integer",
                          "nullable": true
                        },
                        "port": {
                          "type": "integer",
                          "nullable": true
                        },
                        "ip": {
                          "type": "string",
                          "nullable": true
                        },
                        "url": {
                          "type": "string",
                          "nullable": true
                        },
                        "statusCode": {
                          "type": "integer",
                          "nullable": true
                        },
                        "records": {
                          "type": "integer",
                          "nullable": true
                        },
                        "ipVersion": {
                          "type": "string",
                          "enum": [
                            "IPv4",
                            "IPv6"
                          ],
                          "nullable": true
                        },
                        "reason": {
                          "type": "string",
                          "nullable": true
                        },
                        "checks": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "latencyMs",
                        "target",
                        "vantage",
                        "explanation",
                        "commands"
                      ],
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "closed",
                            "timeout"
                          ]
                        },
                        "latencyMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "target": {
                          "type": "string"
                        },
                        "resolvedAddress": {
                          "type": "string",
                          "nullable": true
                        },
                        "explanation": {
                          "type": "string"
                        },
                        "commands": {
                          "type": "object",
                          "required": [
                            "curl",
                            "netcat",
                            "powershell"
                          ],
                          "properties": {
                            "curl": {
                              "type": "string"
                            },
                            "netcat": {
                              "type": "string"
                            },
                            "powershell": {
                              "type": "string"
                            }
                          }
                        },
                        "vantage": {
                          "type": "object",
                          "required": [
                            "id",
                            "label",
                            "regionHint"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "regionHint": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid target or malformed request"
          },
          "429": {
            "description": "Rate-limited"
          }
        }
      }
    }
  }
}