QueryPost

A POST endpoint to query the status of multiple ports on a given hostname or IP address.

This endpoint accepts a JSON payload containing either an IPv4 address or a resolvable hostname, along with an array of port numbers to be checked. For each port in the array, the endpoint performs a connectivity check with a timeout of 1 second per port.

NOTE: The request body for this endpoint is not logged.

"POST /api/query HTTP/1.1" 200 OK
post/api/query

Request

  • Base URL: https://portchecker.io
  • URL: https://portchecker.io/api/query
  • Auth: none declared

Request body

hoststring required

The IPv4 address or hostname of the host to query

portsinteger[] required

Example request

{
  "host": "example.com",
  "ports": [
    443
  ]
}

Response

Request fulfilled, document follows

errorboolean required

Whether an error occurred during the check

msgstring nullable required
hoststring required

The IPv4 address or hostname of the host to query

Example response

{
  "check": [
    {
      "port": 443,
      "status": true
    }
  ],
  "host": "example.com"
}

Changes

No recorded changes to this operation across all 1 revision of this API.