export const metadata = {
  title: "TCP Checks - OnlineOrNot API Documentation",
  description:
    "Documentation for OnlineOrNot's TCP Checks endpoints.",
}

## Create a TCP check   {{ tag: 'POST', label: '/v1/checks/tcp' }}
<Row>
<Col>

<a id="opIdcreateTcpCheck"></a>

*Create a new TCP check to monitor TCP connectivity*

### Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.

Example: `Authorization: Bearer 123`

<ParameterTree parameters={[{"in":"body","schema":{"type":"object","properties":{"name":{"type":"string","example":"My monitor","description":"Name of the monitor"},"test_interval":{"type":"integer","minimum":30,"example":60,"description":"Interval in seconds between checks"},"test_regions":{"type":"array","items":{"type":"string","description":"Region identifier in format aws:{region}"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions to run checks from. Valid regions: aws:us-east-1, aws:us-east-2, aws:us-west-1, aws:eu-central-1, aws:eu-west-2, aws:ap-south-1, aws:ap-southeast-2, aws:ap-northeast-1"},"user_alerts":{"type":"array","items":{"type":"string"}},"slack_alerts":{"type":"array","items":{"type":"string"}},"discord_alerts":{"type":"array","items":{"type":"string"}},"incident_io_alerts":{"type":"array","items":{"type":"string"}},"microsoft_teams_alerts":{"type":"array","items":{"type":"string"}},"telegram_alerts":{"type":"array","items":{"type":"string"}},"pushover_alerts":{"type":"array","items":{"type":"string"}},"webhook_alerts":{"type":"array","items":{"type":"string"},"description":"IDs of webhooks to associate with this check"},"oncall_alerts":{"type":"array","items":{"type":"string"},"description":"IDs of on-call integrations (Grafana, PagerDuty, Opsgenie, Spike)"},"alert_priority":{"type":"string","enum":["LOW","HIGH"],"default":"LOW","example":"LOW","description":"Alert Priority"},"confirmation_period_seconds":{"type":"integer","minimum":0,"default":60,"example":60,"description":"Confirmation period in seconds"},"recovery_period_seconds":{"type":"integer","minimum":0,"default":180,"example":180,"description":"Recovery period in seconds"},"reminder_alert_interval_minutes":{"type":"integer","minimum":-1,"default":1440,"example":1440,"description":"Interval in minutes between reminders (-1 for never)"},"timeout":{"type":"integer","minimum":1000,"default":10000,"example":10000,"description":"Timeout in milliseconds"},"type":{"type":"string","enum":["TCP_CHECK"]},"tcp_hostname":{"type":"string","minLength":1,"maxLength":253,"example":"tcpbin.com","description":"Publicly reachable hostname or IP address to connect to"},"tcp_port":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"tcp_ip_family":{"type":"string","enum":["IPv4","IPv6"],"default":"IPv4","example":"IPv4","description":"IP family to use for DNS resolution and socket connection"},"tcp_data":{"type":["string","null"],"maxLength":16384,"example":"PING\r\n","description":"Optional TCP payload to send immediately after connecting"},"tcp_should_fail":{"type":"boolean","default":false,"example":false,"description":"Whether a failed TCP connection should be treated as passing"},"assertions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]},"description":"TCP assertions to run on response time or response data"}},"required":["name","tcp_hostname","tcp_port"],"additionalProperties":false},"name":"body","required":true,"exampleValues":{"object":{"name":"My monitor","test_interval":60,"test_regions":["aws:us-east-1","aws:eu-central-1"],"user_alerts":["string"],"slack_alerts":["string"],"discord_alerts":["string"],"incident_io_alerts":["string"],"microsoft_teams_alerts":["string"],"telegram_alerts":["string"],"pushover_alerts":["string"],"webhook_alerts":["string"],"oncall_alerts":["string"],"alert_priority":"LOW","confirmation_period_seconds":60,"recovery_period_seconds":180,"reminder_alert_interval_minutes":1440,"timeout":10000,"type":"TCP_CHECK","tcp_hostname":"tcpbin.com","tcp_port":4242,"tcp_ip_family":"IPv4","tcp_data":"PING\r\n","tcp_should_fail":false,"assertions":[{"type":"TCP_RESPONSE_DATA","property":"","comparison":"EQUALS","expected":"OK"}]},"json":"{\n  \"name\": \"My monitor\",\n  \"test_interval\": 60,\n  \"test_regions\": [\n    \"aws:us-east-1\",\n    \"aws:eu-central-1\"\n  ],\n  \"user_alerts\": [\n    \"string\"\n  ],\n  \"slack_alerts\": [\n    \"string\"\n  ],\n  \"discord_alerts\": [\n    \"string\"\n  ],\n  \"incident_io_alerts\": [\n    \"string\"\n  ],\n  \"microsoft_teams_alerts\": [\n    \"string\"\n  ],\n  \"telegram_alerts\": [\n    \"string\"\n  ],\n  \"pushover_alerts\": [\n    \"string\"\n  ],\n  \"webhook_alerts\": [\n    \"string\"\n  ],\n  \"oncall_alerts\": [\n    \"string\"\n  ],\n  \"alert_priority\": \"LOW\",\n  \"confirmation_period_seconds\": 60,\n  \"recovery_period_seconds\": 180,\n  \"reminder_alert_interval_minutes\": 1440,\n  \"timeout\": 10000,\n  \"type\": \"TCP_CHECK\",\n  \"tcp_hostname\": \"tcpbin.com\",\n  \"tcp_port\": 4242,\n  \"tcp_ip_family\": \"IPv4\",\n  \"tcp_data\": \"PING\\r\\n\",\n  \"tcp_should_fail\": false,\n  \"assertions\": [\n    {\n      \"type\": \"TCP_RESPONSE_DATA\",\n      \"property\": \"\",\n      \"comparison\": \"EQUALS\",\n      \"expected\": \"OK\"\n    }\n  ]\n}"},"originalType":"object","safeType":"object"},{"in":"body","schema":{"type":"string","example":"My monitor","description":"Name of the monitor"},"name":"» name","required":true,"description":"Name of the monitor","safeType":"string","depth":1,"exampleValues":{"object":"My monitor","json":"'My monitor'"},"shortDesc":"Name of the monitor"},{"in":"body","schema":{"type":"integer","minimum":30,"example":60,"description":"Interval in seconds between checks"},"name":"» test_interval","required":false,"description":"Interval in seconds between checks","safeType":"integer","depth":1,"exampleValues":{"object":60,"json":"'60'"},"shortDesc":"Interval in seconds between checks"},{"in":"body","schema":{"type":"array","items":{"type":"string","description":"Region identifier in format aws:{region}"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions to run checks from. Valid regions: aws:us-east-1, aws:us-east-2, aws:us-west-1, aws:eu-central-1, aws:eu-west-2, aws:ap-south-1, aws:ap-southeast-2, aws:ap-northeast-1"},"name":"» test_regions","required":false,"description":"Regions to run checks from. Valid regions: aws:us-east-1, aws:us-east-2, aws:us-west-1, aws:eu-central-1, aws:eu-west-2, aws:ap-south-1, aws:ap-southeast-2, aws:ap-northeast-1","safeType":"string[]","depth":1,"exampleValues":{"object":["aws:us-east-1","aws:eu-central-1"],"json":"[\n  \"aws:us-east-1\",\n  \"aws:eu-central-1\"\n]"},"shortDesc":"Regions to run checks from. Valid regions: aws:us-east-1, aws:us-east-2, aws:us-west-1, aws:eu-central-1, aws:eu-west-2, aws:ap-south-1, aws:ap-southeast-2, aws:ap-northeast-1"},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» user_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» slack_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» discord_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» incident_io_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» microsoft_teams_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» telegram_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» pushover_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"},"description":"IDs of webhooks to associate with this check"},"name":"» webhook_alerts","required":false,"description":"IDs of webhooks to associate with this check","safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"},"shortDesc":"IDs of webhooks to associate with this check"},{"in":"body","schema":{"type":"array","items":{"type":"string"},"description":"IDs of on-call integrations (Grafana, PagerDuty, Opsgenie, Spike)"},"name":"» oncall_alerts","required":false,"description":"IDs of on-call integrations (Grafana, PagerDuty, Opsgenie, Spike)","safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"},"shortDesc":"IDs of on-call integrations (Grafana, PagerDuty, Opsgenie, Spike)"},{"in":"body","schema":{"type":"string","enum":["LOW","HIGH"],"default":"LOW","example":"LOW","description":"Alert Priority"},"name":"» alert_priority","required":false,"description":"Alert Priority","safeType":"string","depth":1,"exampleValues":{"object":"LOW","json":"'LOW'"},"shortDesc":"Alert Priority"},{"in":"body","schema":{"type":"integer","minimum":0,"default":60,"example":60,"description":"Confirmation period in seconds"},"name":"» confirmation_period_seconds","required":false,"description":"Confirmation period in seconds","safeType":"integer","depth":1,"exampleValues":{"object":60,"json":"'60'"},"shortDesc":"Confirmation period in seconds"},{"in":"body","schema":{"type":"integer","minimum":0,"default":180,"example":180,"description":"Recovery period in seconds"},"name":"» recovery_period_seconds","required":false,"description":"Recovery period in seconds","safeType":"integer","depth":1,"exampleValues":{"object":180,"json":"'180'"},"shortDesc":"Recovery period in seconds"},{"in":"body","schema":{"type":"integer","minimum":-1,"default":1440,"example":1440,"description":"Interval in minutes between reminders (-1 for never)"},"name":"» reminder_alert_interval_minutes","required":false,"description":"Interval in minutes between reminders (-1 for never)","safeType":"integer","depth":1,"exampleValues":{"object":1440,"json":"'1440'"},"shortDesc":"Interval in minutes between reminders (-1 for never)"},{"in":"body","schema":{"type":"integer","minimum":1000,"default":10000,"example":10000,"description":"Timeout in milliseconds"},"name":"» timeout","required":false,"description":"Timeout in milliseconds","safeType":"integer","depth":1,"exampleValues":{"object":10000,"json":"'10000'"},"shortDesc":"Timeout in milliseconds"},{"in":"body","schema":{"type":"string","enum":["TCP_CHECK"]},"name":"» type","required":false,"safeType":"string","depth":1,"exampleValues":{"object":"TCP_CHECK","json":"'TCP_CHECK'"}},{"in":"body","schema":{"type":"string","minLength":1,"maxLength":253,"example":"tcpbin.com","description":"Publicly reachable hostname or IP address to connect to"},"name":"» tcp_hostname","required":true,"description":"Publicly reachable hostname or IP address to connect to","safeType":"string","depth":1,"exampleValues":{"object":"tcpbin.com","json":"'tcpbin.com'"},"shortDesc":"Publicly reachable hostname or IP address to connect to"},{"in":"body","schema":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"name":"» tcp_port","required":true,"description":"TCP port to connect to","safeType":"integer","depth":1,"exampleValues":{"object":4242,"json":"'4242'"},"shortDesc":"TCP port to connect to"},{"in":"body","schema":{"type":"string","enum":["IPv4","IPv6"],"default":"IPv4","example":"IPv4","description":"IP family to use for DNS resolution and socket connection"},"name":"» tcp_ip_family","required":false,"description":"IP family to use for DNS resolution and socket connection","safeType":"string","depth":1,"exampleValues":{"object":"IPv4","json":"'IPv4'"},"shortDesc":"IP family to use for DNS resolution and socket connection"},{"in":"body","schema":{"type":["string","null"],"maxLength":16384,"example":"PING\r\n","description":"Optional TCP payload to send immediately after connecting"},"name":"» tcp_data","required":false,"description":"Optional TCP payload to send immediately after connecting","safeType":["string","null"],"depth":1,"exampleValues":{"object":"PING\r\n","json":"'PING\r\n'"},"shortDesc":"Optional TCP payload to send immediately after connecting"},{"in":"body","schema":{"type":"boolean","default":false,"example":false,"description":"Whether a failed TCP connection should be treated as passing"},"name":"» tcp_should_fail","required":false,"description":"Whether a failed TCP connection should be treated as passing","safeType":"boolean","depth":1,"exampleValues":{"object":false,"json":"'false'"},"shortDesc":"Whether a failed TCP connection should be treated as passing"},{"in":"body","schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]},"description":"TCP assertions to run on response time or response data"},"name":"» assertions","required":false,"description":"TCP assertions to run on response time or response data","safeType":"object[]","depth":1,"exampleValues":{"object":[{"type":"TCP_RESPONSE_DATA","property":"","comparison":"EQUALS","expected":"OK"}],"json":"[\n  {\n    \"type\": \"TCP_RESPONSE_DATA\",\n    \"property\": \"\",\n    \"comparison\": \"EQUALS\",\n    \"expected\": \"OK\"\n  }\n]"},"shortDesc":"TCP assertions to run on response time or response data"},{"in":"body","schema":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"name":"»» type","required":true,"description":"Type of TCP assertion","safeType":"string","depth":2,"exampleValues":{"object":"TCP_RESPONSE_DATA","json":"'TCP_RESPONSE_DATA'"},"shortDesc":"Type of TCP assertion"},{"in":"body","schema":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"name":"»» property","required":true,"description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions.","safeType":"string","depth":2,"exampleValues":{"object":"","json":"''"},"shortDesc":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},{"in":"body","schema":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"name":"»» comparison","required":true,"description":"Comparison operator","safeType":"string","depth":2,"exampleValues":{"object":"EQUALS","json":"'EQUALS'"},"shortDesc":"Comparison operator"},{"in":"body","schema":{"type":"string","example":"OK","description":"Expected value"},"name":"»» expected","required":true,"description":"Expected value","safeType":"string","depth":2,"exampleValues":{"object":"OK","json":"'OK'"},"shortDesc":"Expected value"}]} title="Body parameters" />

<h3 id="create-a-new-tcp-check-to-monitor-tcp-connectivity-responses">Responses</h3>

|Status|Meaning|Description|
|---|---|---|
|201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|Create a new OnlineOrNot TCP Check|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Validation error|
|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Unauthenticated|
|403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|Forbidden|
|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Internal Server Error|

<ResponseSchemas schemas={[{"status":"201","properties":[{"schema":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4","description":"Uptime Check ID"},"name":{"type":"string","example":"My landing page","description":"Name of the check"},"last_queued":{"type":["string","null"],"example":"2021-01-01T00:00:00.000Z","description":"Last time the check was queued"},"status":{"type":"string","enum":["UP","DOWN","PENDING","PAUSED","MUTED","MAINTENANCE","RECOVERING","VERIFYING"],"example":"UP","description":"Current status of the check based on the latest uptime event"},"headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"example":{"X-My-Header":"My Value"},"description":"Headers to send with the request"},"text_to_search_for":{"type":["string","null"],"description":"Text to search for in the response"},"reminder_alert_interval_minutes":{"type":"number","example":1440,"description":"Interval in minutes between reminder alerts (-1 for never)"},"confirmation_period_seconds":{"type":"number","example":60,"description":"Seconds to wait before confirming a down status"},"recovery_period_seconds":{"type":"number","example":180,"description":"Seconds to wait before confirming recovery"},"test_interval":{"type":"number","example":60,"description":"Interval in seconds between checks"},"timeout":{"type":"number","example":10000,"description":"Timeout in milliseconds"},"script":{"type":["string","null"],"description":"Playwright Test script for scripted browser checks (null for URL-based checks)"},"alert_priority":{"type":"string","enum":["LOW","HIGH"],"example":"HIGH","description":"Priority level for alerts"},"verify_ssl":{"type":"boolean","example":true,"description":"Whether to verify SSL certificates"},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE"],"example":"GET","description":"HTTP method to use"},"body":{"type":["string","null"],"description":"Request body for POST/PUT/PATCH requests"},"follow_redirects":{"type":"boolean","example":true,"description":"Whether to follow HTTP redirects"},"auth_username":{"type":["string","null"],"description":"Username for HTTP Basic Auth"},"auth_password":{"type":["string","null"],"description":"Password for HTTP Basic Auth"},"test_regions":{"type":"array","items":{"type":"string"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions the check runs from. Format: aws:{region}"},"user_alerts":{"type":"array","items":{"type":"string"},"description":"User IDs to notify on alerts"},"slack_alerts":{"type":"array","items":{"type":"string"},"description":"Slack integration IDs to notify"},"discord_alerts":{"type":"array","items":{"type":"string"},"description":"Discord integration IDs to notify"},"incident_io_alerts":{"type":"array","items":{"type":"string"},"description":"Incident.io integration IDs to notify"},"microsoft_teams_alerts":{"type":"array","items":{"type":"string"},"description":"Microsoft Teams integration IDs to notify"},"telegram_alerts":{"type":"array","items":{"type":"string"},"description":"Telegram integration IDs to notify"},"pushover_alerts":{"type":"array","items":{"type":"string"},"description":"Pushover integration IDs to notify"},"oncall_alerts":{"type":"array","items":{"type":"string"},"description":"On-call integration IDs (PagerDuty, Opsgenie, Grafana, Spike)"},"webhook_alerts":{"type":"array","items":{"type":"string"},"description":"Webhook IDs to notify"},"check_type":{"type":"string","enum":["TCP"],"example":"TCP","description":"Indicates this monitor is a TCP check."},"url":{"type":"null","description":"TCP checks do not use a URL target."},"version":{"type":"string","enum":["NODE24_TCP"],"example":"NODE24_TCP","description":"Runtime version for TCP checks."},"tcp_hostname":{"type":"string","example":"tcpbin.com","description":"TCP hostname connected to by this check."},"tcp_port":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"tcp_ip_family":{"type":"string","enum":["IPv4","IPv6"],"example":"IPv4","description":"IP family used by this check."},"tcp_data":{"type":["string","null"],"description":"Optional TCP payload sent by this check."},"tcp_should_fail":{"type":"boolean","example":false,"description":"Whether failed TCP connections are expected."},"assertions":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]},"description":"TCP assertions to validate the response."}},"required":["id","name","last_queued","status","headers","text_to_search_for","reminder_alert_interval_minutes","confirmation_period_seconds","recovery_period_seconds","test_interval","timeout","script","alert_priority","verify_ssl","method","body","follow_redirects","auth_username","auth_password","test_regions","user_alerts","slack_alerts","discord_alerts","incident_io_alerts","microsoft_teams_alerts","telegram_alerts","pushover_alerts","oncall_alerts","webhook_alerts","check_type","url","version","tcp_hostname","tcp_port","tcp_ip_family","tcp_data","tcp_should_fail","assertions"]},"in":"body","name":"result","depth":1,"type":"object","safeType":"object","required":true,"displayName":"» result"},{"schema":{"type":"string","example":"a1b2c3d4","description":"Uptime Check ID"},"in":"body","name":"id","depth":2,"description":"Uptime Check ID","type":"string","safeType":"string","required":true,"displayName":"»» id"},{"schema":{"type":"string","example":"My landing page","description":"Name of the check"},"in":"body","name":"name","depth":2,"description":"Name of the check","type":"string","safeType":"string","required":true,"displayName":"»» name"},{"schema":{"type":["string","null"],"example":"2021-01-01T00:00:00.000Z","description":"Last time the check was queued"},"in":"body","name":"last_queued","depth":2,"description":"Last time the check was queued","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» last_queued"},{"schema":{"type":"string","enum":["UP","DOWN","PENDING","PAUSED","MUTED","MAINTENANCE","RECOVERING","VERIFYING"],"example":"UP","description":"Current status of the check based on the latest uptime event"},"in":"body","name":"status","depth":2,"description":"Current status of the check based on the latest uptime event","type":"string","safeType":"string","required":true,"displayName":"»» status"},{"schema":{"type":["object","null"],"additionalProperties":{"type":"string"},"example":{"X-My-Header":"My Value"},"description":"Headers to send with the request"},"in":"body","name":"headers","depth":2,"description":"Headers to send with the request","type":["object","null"],"safeType":["object","null"],"required":true,"displayName":"»» headers"},{"schema":{"type":"string"},"in":"body","name":"**additionalProperties**","depth":3,"type":"string","safeType":"string","required":false,"displayName":"»»» **additionalProperties**"},{"schema":{"type":["string","null"],"description":"Text to search for in the response"},"in":"body","name":"text_to_search_for","depth":2,"description":"Text to search for in the response","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» text_to_search_for"},{"schema":{"type":"number","example":1440,"description":"Interval in minutes between reminder alerts (-1 for never)"},"in":"body","name":"reminder_alert_interval_minutes","depth":2,"description":"Interval in minutes between reminder alerts (-1 for never)","type":"number","safeType":"number","required":true,"displayName":"»» reminder_alert_interval_minutes"},{"schema":{"type":"number","example":60,"description":"Seconds to wait before confirming a down status"},"in":"body","name":"confirmation_period_seconds","depth":2,"description":"Seconds to wait before confirming a down status","type":"number","safeType":"number","required":true,"displayName":"»» confirmation_period_seconds"},{"schema":{"type":"number","example":180,"description":"Seconds to wait before confirming recovery"},"in":"body","name":"recovery_period_seconds","depth":2,"description":"Seconds to wait before confirming recovery","type":"number","safeType":"number","required":true,"displayName":"»» recovery_period_seconds"},{"schema":{"type":"number","example":60,"description":"Interval in seconds between checks"},"in":"body","name":"test_interval","depth":2,"description":"Interval in seconds between checks","type":"number","safeType":"number","required":true,"displayName":"»» test_interval"},{"schema":{"type":"number","example":10000,"description":"Timeout in milliseconds"},"in":"body","name":"timeout","depth":2,"description":"Timeout in milliseconds","type":"number","safeType":"number","required":true,"displayName":"»» timeout"},{"schema":{"type":["string","null"],"description":"Playwright Test script for scripted browser checks (null for URL-based checks)"},"in":"body","name":"script","depth":2,"description":"Playwright Test script for scripted browser checks (null for URL-based checks)","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» script"},{"schema":{"type":"string","enum":["LOW","HIGH"],"example":"HIGH","description":"Priority level for alerts"},"in":"body","name":"alert_priority","depth":2,"description":"Priority level for alerts","type":"string","safeType":"string","required":true,"displayName":"»» alert_priority"},{"schema":{"type":"boolean","example":true,"description":"Whether to verify SSL certificates"},"in":"body","name":"verify_ssl","depth":2,"description":"Whether to verify SSL certificates","type":"boolean","safeType":"boolean","required":true,"displayName":"»» verify_ssl"},{"schema":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE"],"example":"GET","description":"HTTP method to use"},"in":"body","name":"method","depth":2,"description":"HTTP method to use","type":"string","safeType":"string","required":true,"displayName":"»» method"},{"schema":{"type":["string","null"],"description":"Request body for POST/PUT/PATCH requests"},"in":"body","name":"body","depth":2,"description":"Request body for POST/PUT/PATCH requests","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» body"},{"schema":{"type":"boolean","example":true,"description":"Whether to follow HTTP redirects"},"in":"body","name":"follow_redirects","depth":2,"description":"Whether to follow HTTP redirects","type":"boolean","safeType":"boolean","required":true,"displayName":"»» follow_redirects"},{"schema":{"type":["string","null"],"description":"Username for HTTP Basic Auth"},"in":"body","name":"auth_username","depth":2,"description":"Username for HTTP Basic Auth","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» auth_username"},{"schema":{"type":["string","null"],"description":"Password for HTTP Basic Auth"},"in":"body","name":"auth_password","depth":2,"description":"Password for HTTP Basic Auth","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» auth_password"},{"schema":{"type":"array","items":{"type":"string"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions the check runs from. Format: aws:{region}"},"in":"body","name":"test_regions","depth":2,"description":"Regions the check runs from. Format: aws:{region}","type":"array","safeType":"string[]","required":true,"displayName":"»» test_regions"},{"schema":{"type":"array","items":{"type":"string"},"description":"User IDs to notify on alerts"},"in":"body","name":"user_alerts","depth":2,"description":"User IDs to notify on alerts","type":"array","safeType":"string[]","required":true,"displayName":"»» user_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Slack integration IDs to notify"},"in":"body","name":"slack_alerts","depth":2,"description":"Slack integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» slack_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Discord integration IDs to notify"},"in":"body","name":"discord_alerts","depth":2,"description":"Discord integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» discord_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Incident.io integration IDs to notify"},"in":"body","name":"incident_io_alerts","depth":2,"description":"Incident.io integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» incident_io_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Microsoft Teams integration IDs to notify"},"in":"body","name":"microsoft_teams_alerts","depth":2,"description":"Microsoft Teams integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» microsoft_teams_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Telegram integration IDs to notify"},"in":"body","name":"telegram_alerts","depth":2,"description":"Telegram integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» telegram_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Pushover integration IDs to notify"},"in":"body","name":"pushover_alerts","depth":2,"description":"Pushover integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» pushover_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"On-call integration IDs (PagerDuty, Opsgenie, Grafana, Spike)"},"in":"body","name":"oncall_alerts","depth":2,"description":"On-call integration IDs (PagerDuty, Opsgenie, Grafana, Spike)","type":"array","safeType":"string[]","required":true,"displayName":"»» oncall_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Webhook IDs to notify"},"in":"body","name":"webhook_alerts","depth":2,"description":"Webhook IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» webhook_alerts"},{"schema":{"type":"string","enum":["TCP"],"example":"TCP","description":"Indicates this monitor is a TCP check."},"in":"body","name":"check_type","depth":2,"description":"Indicates this monitor is a TCP check.","type":"string","safeType":"string","required":true,"displayName":"»» check_type"},{"schema":{"type":"null","description":"TCP checks do not use a URL target."},"in":"body","name":"url","depth":2,"description":"TCP checks do not use a URL target.","type":"null","safeType":"null","required":true,"displayName":"»» url"},{"schema":{"type":"string","enum":["NODE24_TCP"],"example":"NODE24_TCP","description":"Runtime version for TCP checks."},"in":"body","name":"version","depth":2,"description":"Runtime version for TCP checks.","type":"string","safeType":"string","required":true,"displayName":"»» version"},{"schema":{"type":"string","example":"tcpbin.com","description":"TCP hostname connected to by this check."},"in":"body","name":"tcp_hostname","depth":2,"description":"TCP hostname connected to by this check.","type":"string","safeType":"string","required":true,"displayName":"»» tcp_hostname"},{"schema":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"in":"body","name":"tcp_port","depth":2,"description":"TCP port to connect to","type":"integer","safeType":"integer","required":true,"displayName":"»» tcp_port"},{"schema":{"type":"string","enum":["IPv4","IPv6"],"example":"IPv4","description":"IP family used by this check."},"in":"body","name":"tcp_ip_family","depth":2,"description":"IP family used by this check.","type":"string","safeType":"string","required":true,"displayName":"»» tcp_ip_family"},{"schema":{"type":["string","null"],"description":"Optional TCP payload sent by this check."},"in":"body","name":"tcp_data","depth":2,"description":"Optional TCP payload sent by this check.","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» tcp_data"},{"schema":{"type":"boolean","example":false,"description":"Whether failed TCP connections are expected."},"in":"body","name":"tcp_should_fail","depth":2,"description":"Whether failed TCP connections are expected.","type":"boolean","safeType":"boolean","required":true,"displayName":"»» tcp_should_fail"},{"schema":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]},"description":"TCP assertions to validate the response."},"in":"body","name":"assertions","depth":2,"description":"TCP assertions to validate the response.","type":["array","null"],"safeType":["array","null"],"required":true,"displayName":"»» assertions"},{"schema":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"in":"body","name":"type","depth":3,"description":"Type of TCP assertion","type":"string","safeType":"string","required":true,"displayName":"»»» type"},{"schema":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"in":"body","name":"property","depth":3,"description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions.","type":"string","safeType":"string","required":true,"displayName":"»»» property"},{"schema":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"in":"body","name":"comparison","depth":3,"description":"Comparison operator","type":"string","safeType":"string","required":true,"displayName":"»»» comparison"},{"schema":{"type":"string","example":"OK","description":"Expected value"},"in":"body","name":"expected","depth":3,"description":"Expected value","type":"string","safeType":"string","required":true,"displayName":"»»» expected"},{"schema":{"type":"boolean","default":true,"example":true,"description":"Whether the API call was successful"},"in":"body","name":"success","depth":1,"description":"Whether the API call was successful","type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"}]}]} />

</Col>

<Col sticky>

<CodeGroup title="Request" tag="POST" label="/v1/checks/tcp">
```bash {{ title: 'cURL' }}
curl --request POST \
  --url https://api.onlineornot.com/v1/checks/tcp \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"name":"TCP for example.com:443","tcp_hostname":"example.com","tcp_port":443,"test_interval":60}'
```

```javascript
fetch("https://api.onlineornot.com/v1/checks/tcp", {
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
  },
  "body": "{\"name\":\"TCP for example.com:443\",\"tcp_hostname\":\"example.com\",\"tcp_port\":443,\"test_interval\":60}"
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});
```

```java
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":\"TCP for example.com:443\",\"tcp_hostname\":\"example.com\",\"tcp_port\":443,\"test_interval\":60}");
Request request = new Request.Builder()
  .url("https://api.onlineornot.com/v1/checks/tcp")
  .post(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Accept", "application/json")
  .addHeader("Authorization", "Bearer {access-token}")
  .build();

Response response = client.newCall(request).execute();
```

```php
<?php

$request = new HttpRequest();
$request->setUrl('https://api.onlineornot.com/v1/checks/tcp');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
]);

$request->setBody('{"name":"TCP for example.com:443","tcp_hostname":"example.com","tcp_port":443,"test_interval":60}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
```

```ruby
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.onlineornot.com/v1/checks/tcp")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"name\":\"TCP for example.com:443\",\"tcp_hostname\":\"example.com\",\"tcp_port\":443,\"test_interval\":60}"

response = http.request(request)
puts response.read_body
```

```python
import requests

url = "https://api.onlineornot.com/v1/checks/tcp"

payload = {
    "name": "TCP for example.com:443",
    "tcp_hostname": "example.com",
    "tcp_port": 443,
    "test_interval": 60
}
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
```

</CodeGroup>

```json {{ title: 'Response' }}
{
  "result": {
    "id": "a1b2c3d4",
    "name": "My landing page",
    "last_queued": "2021-01-01T00:00:00.000Z",
    "status": "UP",
    "headers": {
      "X-My-Header": "My Value"
    },
    "text_to_search_for": "string",
    "reminder_alert_interval_minutes": 1440,
    "confirmation_period_seconds": 60,
    "recovery_period_seconds": 180,
    "test_interval": 60,
    "timeout": 10000,
    "script": "string",
    "alert_priority": "HIGH",
    "verify_ssl": true,
    "method": "GET",
    "body": "string",
    "follow_redirects": true,
    "auth_username": "string",
    "auth_password": "string",
    "test_regions": [
      "aws:us-east-1",
      "aws:eu-central-1"
    ],
    "user_alerts": [
      "string"
    ],
    "slack_alerts": [
      "string"
    ],
    "discord_alerts": [
      "string"
    ],
    "incident_io_alerts": [
      "string"
    ],
    "microsoft_teams_alerts": [
      "string"
    ],
    "telegram_alerts": [
      "string"
    ],
    "pushover_alerts": [
      "string"
    ],
    "oncall_alerts": [
      "string"
    ],
    "webhook_alerts": [
      "string"
    ],
    "check_type": "TCP",
    "url": null,
    "version": "NODE24_TCP",
    "tcp_hostname": "tcpbin.com",
    "tcp_port": 4242,
    "tcp_ip_family": "IPv4",
    "tcp_data": "string",
    "tcp_should_fail": false,
    "assertions": [
      {
        "type": "TCP_RESPONSE_DATA",
        "property": "",
        "comparison": "EQUALS",
        "expected": "OK"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}
```

</Col>
</Row>

---

## Retrieve a TCP check   {{ tag: 'GET', label: '/v1/checks/tcp/{check_id}' }}
<Row>
<Col>

<a id="opIdgetTcpCheck"></a>

*Look up detailed information about a specific TCP check*

### Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.

Example: `Authorization: Bearer 123`

<ParameterTree parameters={[{"schema":{"type":"string","minLength":8,"example":"a1b2c3d4","description":"Uptime Check ID"},"required":true,"description":"Uptime Check ID","name":"check_id","in":"path","exampleValues":{"object":"a1b2c3d4","json":"'a1b2c3d4'"},"originalType":"string","safeType":"string","shortDesc":"Uptime Check ID","style":"simple"}]} title="Path parameters" />

<h3 id="look-up-detailed-information-about-a-specific-tcp-check-responses">Responses</h3>

|Status|Meaning|Description|
|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Retrieve the specified OnlineOrNot TCP Check|
|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Unauthenticated|
|403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|Forbidden|
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|TCP check not found|
|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Internal Server Error|

<ResponseSchemas schemas={[{"status":"200","properties":[{"schema":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4","description":"Uptime Check ID"},"name":{"type":"string","example":"My landing page","description":"Name of the check"},"last_queued":{"type":["string","null"],"example":"2021-01-01T00:00:00.000Z","description":"Last time the check was queued"},"status":{"type":"string","enum":["UP","DOWN","PENDING","PAUSED","MUTED","MAINTENANCE","RECOVERING","VERIFYING"],"example":"UP","description":"Current status of the check based on the latest uptime event"},"headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"example":{"X-My-Header":"My Value"},"description":"Headers to send with the request"},"text_to_search_for":{"type":["string","null"],"description":"Text to search for in the response"},"reminder_alert_interval_minutes":{"type":"number","example":1440,"description":"Interval in minutes between reminder alerts (-1 for never)"},"confirmation_period_seconds":{"type":"number","example":60,"description":"Seconds to wait before confirming a down status"},"recovery_period_seconds":{"type":"number","example":180,"description":"Seconds to wait before confirming recovery"},"test_interval":{"type":"number","example":60,"description":"Interval in seconds between checks"},"timeout":{"type":"number","example":10000,"description":"Timeout in milliseconds"},"script":{"type":["string","null"],"description":"Playwright Test script for scripted browser checks (null for URL-based checks)"},"alert_priority":{"type":"string","enum":["LOW","HIGH"],"example":"HIGH","description":"Priority level for alerts"},"verify_ssl":{"type":"boolean","example":true,"description":"Whether to verify SSL certificates"},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE"],"example":"GET","description":"HTTP method to use"},"body":{"type":["string","null"],"description":"Request body for POST/PUT/PATCH requests"},"follow_redirects":{"type":"boolean","example":true,"description":"Whether to follow HTTP redirects"},"auth_username":{"type":["string","null"],"description":"Username for HTTP Basic Auth"},"auth_password":{"type":["string","null"],"description":"Password for HTTP Basic Auth"},"test_regions":{"type":"array","items":{"type":"string"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions the check runs from. Format: aws:{region}"},"user_alerts":{"type":"array","items":{"type":"string"},"description":"User IDs to notify on alerts"},"slack_alerts":{"type":"array","items":{"type":"string"},"description":"Slack integration IDs to notify"},"discord_alerts":{"type":"array","items":{"type":"string"},"description":"Discord integration IDs to notify"},"incident_io_alerts":{"type":"array","items":{"type":"string"},"description":"Incident.io integration IDs to notify"},"microsoft_teams_alerts":{"type":"array","items":{"type":"string"},"description":"Microsoft Teams integration IDs to notify"},"telegram_alerts":{"type":"array","items":{"type":"string"},"description":"Telegram integration IDs to notify"},"pushover_alerts":{"type":"array","items":{"type":"string"},"description":"Pushover integration IDs to notify"},"oncall_alerts":{"type":"array","items":{"type":"string"},"description":"On-call integration IDs (PagerDuty, Opsgenie, Grafana, Spike)"},"webhook_alerts":{"type":"array","items":{"type":"string"},"description":"Webhook IDs to notify"},"check_type":{"type":"string","enum":["TCP"],"example":"TCP","description":"Indicates this monitor is a TCP check."},"url":{"type":"null","description":"TCP checks do not use a URL target."},"version":{"type":"string","enum":["NODE24_TCP"],"example":"NODE24_TCP","description":"Runtime version for TCP checks."},"tcp_hostname":{"type":"string","example":"tcpbin.com","description":"TCP hostname connected to by this check."},"tcp_port":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"tcp_ip_family":{"type":"string","enum":["IPv4","IPv6"],"example":"IPv4","description":"IP family used by this check."},"tcp_data":{"type":["string","null"],"description":"Optional TCP payload sent by this check."},"tcp_should_fail":{"type":"boolean","example":false,"description":"Whether failed TCP connections are expected."},"assertions":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]},"description":"TCP assertions to validate the response."}},"required":["id","name","last_queued","status","headers","text_to_search_for","reminder_alert_interval_minutes","confirmation_period_seconds","recovery_period_seconds","test_interval","timeout","script","alert_priority","verify_ssl","method","body","follow_redirects","auth_username","auth_password","test_regions","user_alerts","slack_alerts","discord_alerts","incident_io_alerts","microsoft_teams_alerts","telegram_alerts","pushover_alerts","oncall_alerts","webhook_alerts","check_type","url","version","tcp_hostname","tcp_port","tcp_ip_family","tcp_data","tcp_should_fail","assertions"]},"in":"body","name":"result","depth":1,"type":"object","safeType":"object","required":true,"displayName":"» result"},{"schema":{"type":"string","example":"a1b2c3d4","description":"Uptime Check ID"},"in":"body","name":"id","depth":2,"description":"Uptime Check ID","type":"string","safeType":"string","required":true,"displayName":"»» id"},{"schema":{"type":"string","example":"My landing page","description":"Name of the check"},"in":"body","name":"name","depth":2,"description":"Name of the check","type":"string","safeType":"string","required":true,"displayName":"»» name"},{"schema":{"type":["string","null"],"example":"2021-01-01T00:00:00.000Z","description":"Last time the check was queued"},"in":"body","name":"last_queued","depth":2,"description":"Last time the check was queued","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» last_queued"},{"schema":{"type":"string","enum":["UP","DOWN","PENDING","PAUSED","MUTED","MAINTENANCE","RECOVERING","VERIFYING"],"example":"UP","description":"Current status of the check based on the latest uptime event"},"in":"body","name":"status","depth":2,"description":"Current status of the check based on the latest uptime event","type":"string","safeType":"string","required":true,"displayName":"»» status"},{"schema":{"type":["object","null"],"additionalProperties":{"type":"string"},"example":{"X-My-Header":"My Value"},"description":"Headers to send with the request"},"in":"body","name":"headers","depth":2,"description":"Headers to send with the request","type":["object","null"],"safeType":["object","null"],"required":true,"displayName":"»» headers"},{"schema":{"type":"string"},"in":"body","name":"**additionalProperties**","depth":3,"type":"string","safeType":"string","required":false,"displayName":"»»» **additionalProperties**"},{"schema":{"type":["string","null"],"description":"Text to search for in the response"},"in":"body","name":"text_to_search_for","depth":2,"description":"Text to search for in the response","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» text_to_search_for"},{"schema":{"type":"number","example":1440,"description":"Interval in minutes between reminder alerts (-1 for never)"},"in":"body","name":"reminder_alert_interval_minutes","depth":2,"description":"Interval in minutes between reminder alerts (-1 for never)","type":"number","safeType":"number","required":true,"displayName":"»» reminder_alert_interval_minutes"},{"schema":{"type":"number","example":60,"description":"Seconds to wait before confirming a down status"},"in":"body","name":"confirmation_period_seconds","depth":2,"description":"Seconds to wait before confirming a down status","type":"number","safeType":"number","required":true,"displayName":"»» confirmation_period_seconds"},{"schema":{"type":"number","example":180,"description":"Seconds to wait before confirming recovery"},"in":"body","name":"recovery_period_seconds","depth":2,"description":"Seconds to wait before confirming recovery","type":"number","safeType":"number","required":true,"displayName":"»» recovery_period_seconds"},{"schema":{"type":"number","example":60,"description":"Interval in seconds between checks"},"in":"body","name":"test_interval","depth":2,"description":"Interval in seconds between checks","type":"number","safeType":"number","required":true,"displayName":"»» test_interval"},{"schema":{"type":"number","example":10000,"description":"Timeout in milliseconds"},"in":"body","name":"timeout","depth":2,"description":"Timeout in milliseconds","type":"number","safeType":"number","required":true,"displayName":"»» timeout"},{"schema":{"type":["string","null"],"description":"Playwright Test script for scripted browser checks (null for URL-based checks)"},"in":"body","name":"script","depth":2,"description":"Playwright Test script for scripted browser checks (null for URL-based checks)","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» script"},{"schema":{"type":"string","enum":["LOW","HIGH"],"example":"HIGH","description":"Priority level for alerts"},"in":"body","name":"alert_priority","depth":2,"description":"Priority level for alerts","type":"string","safeType":"string","required":true,"displayName":"»» alert_priority"},{"schema":{"type":"boolean","example":true,"description":"Whether to verify SSL certificates"},"in":"body","name":"verify_ssl","depth":2,"description":"Whether to verify SSL certificates","type":"boolean","safeType":"boolean","required":true,"displayName":"»» verify_ssl"},{"schema":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE"],"example":"GET","description":"HTTP method to use"},"in":"body","name":"method","depth":2,"description":"HTTP method to use","type":"string","safeType":"string","required":true,"displayName":"»» method"},{"schema":{"type":["string","null"],"description":"Request body for POST/PUT/PATCH requests"},"in":"body","name":"body","depth":2,"description":"Request body for POST/PUT/PATCH requests","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» body"},{"schema":{"type":"boolean","example":true,"description":"Whether to follow HTTP redirects"},"in":"body","name":"follow_redirects","depth":2,"description":"Whether to follow HTTP redirects","type":"boolean","safeType":"boolean","required":true,"displayName":"»» follow_redirects"},{"schema":{"type":["string","null"],"description":"Username for HTTP Basic Auth"},"in":"body","name":"auth_username","depth":2,"description":"Username for HTTP Basic Auth","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» auth_username"},{"schema":{"type":["string","null"],"description":"Password for HTTP Basic Auth"},"in":"body","name":"auth_password","depth":2,"description":"Password for HTTP Basic Auth","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» auth_password"},{"schema":{"type":"array","items":{"type":"string"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions the check runs from. Format: aws:{region}"},"in":"body","name":"test_regions","depth":2,"description":"Regions the check runs from. Format: aws:{region}","type":"array","safeType":"string[]","required":true,"displayName":"»» test_regions"},{"schema":{"type":"array","items":{"type":"string"},"description":"User IDs to notify on alerts"},"in":"body","name":"user_alerts","depth":2,"description":"User IDs to notify on alerts","type":"array","safeType":"string[]","required":true,"displayName":"»» user_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Slack integration IDs to notify"},"in":"body","name":"slack_alerts","depth":2,"description":"Slack integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» slack_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Discord integration IDs to notify"},"in":"body","name":"discord_alerts","depth":2,"description":"Discord integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» discord_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Incident.io integration IDs to notify"},"in":"body","name":"incident_io_alerts","depth":2,"description":"Incident.io integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» incident_io_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Microsoft Teams integration IDs to notify"},"in":"body","name":"microsoft_teams_alerts","depth":2,"description":"Microsoft Teams integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» microsoft_teams_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Telegram integration IDs to notify"},"in":"body","name":"telegram_alerts","depth":2,"description":"Telegram integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» telegram_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Pushover integration IDs to notify"},"in":"body","name":"pushover_alerts","depth":2,"description":"Pushover integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» pushover_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"On-call integration IDs (PagerDuty, Opsgenie, Grafana, Spike)"},"in":"body","name":"oncall_alerts","depth":2,"description":"On-call integration IDs (PagerDuty, Opsgenie, Grafana, Spike)","type":"array","safeType":"string[]","required":true,"displayName":"»» oncall_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Webhook IDs to notify"},"in":"body","name":"webhook_alerts","depth":2,"description":"Webhook IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» webhook_alerts"},{"schema":{"type":"string","enum":["TCP"],"example":"TCP","description":"Indicates this monitor is a TCP check."},"in":"body","name":"check_type","depth":2,"description":"Indicates this monitor is a TCP check.","type":"string","safeType":"string","required":true,"displayName":"»» check_type"},{"schema":{"type":"null","description":"TCP checks do not use a URL target."},"in":"body","name":"url","depth":2,"description":"TCP checks do not use a URL target.","type":"null","safeType":"null","required":true,"displayName":"»» url"},{"schema":{"type":"string","enum":["NODE24_TCP"],"example":"NODE24_TCP","description":"Runtime version for TCP checks."},"in":"body","name":"version","depth":2,"description":"Runtime version for TCP checks.","type":"string","safeType":"string","required":true,"displayName":"»» version"},{"schema":{"type":"string","example":"tcpbin.com","description":"TCP hostname connected to by this check."},"in":"body","name":"tcp_hostname","depth":2,"description":"TCP hostname connected to by this check.","type":"string","safeType":"string","required":true,"displayName":"»» tcp_hostname"},{"schema":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"in":"body","name":"tcp_port","depth":2,"description":"TCP port to connect to","type":"integer","safeType":"integer","required":true,"displayName":"»» tcp_port"},{"schema":{"type":"string","enum":["IPv4","IPv6"],"example":"IPv4","description":"IP family used by this check."},"in":"body","name":"tcp_ip_family","depth":2,"description":"IP family used by this check.","type":"string","safeType":"string","required":true,"displayName":"»» tcp_ip_family"},{"schema":{"type":["string","null"],"description":"Optional TCP payload sent by this check."},"in":"body","name":"tcp_data","depth":2,"description":"Optional TCP payload sent by this check.","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» tcp_data"},{"schema":{"type":"boolean","example":false,"description":"Whether failed TCP connections are expected."},"in":"body","name":"tcp_should_fail","depth":2,"description":"Whether failed TCP connections are expected.","type":"boolean","safeType":"boolean","required":true,"displayName":"»» tcp_should_fail"},{"schema":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]},"description":"TCP assertions to validate the response."},"in":"body","name":"assertions","depth":2,"description":"TCP assertions to validate the response.","type":["array","null"],"safeType":["array","null"],"required":true,"displayName":"»» assertions"},{"schema":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"in":"body","name":"type","depth":3,"description":"Type of TCP assertion","type":"string","safeType":"string","required":true,"displayName":"»»» type"},{"schema":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"in":"body","name":"property","depth":3,"description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions.","type":"string","safeType":"string","required":true,"displayName":"»»» property"},{"schema":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"in":"body","name":"comparison","depth":3,"description":"Comparison operator","type":"string","safeType":"string","required":true,"displayName":"»»» comparison"},{"schema":{"type":"string","example":"OK","description":"Expected value"},"in":"body","name":"expected","depth":3,"description":"Expected value","type":"string","safeType":"string","required":true,"displayName":"»»» expected"},{"schema":{"type":"boolean","default":true,"example":true,"description":"Whether the API call was successful"},"in":"body","name":"success","depth":1,"description":"Whether the API call was successful","type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"}]}]} />

</Col>

<Col sticky>

<CodeGroup title="Request" tag="GET" label="/v1/checks/tcp/{check_id}">
```bash {{ title: 'cURL' }}
curl --request GET \
  --url https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
```

```javascript
fetch("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4", {
  "method": "GET",
  "headers": {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
  }
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});
```

```java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Authorization", "Bearer {access-token}")
  .build();

Response response = client.newCall(request).execute();
```

```php
<?php

$request = new HttpRequest();
$request->setUrl('https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
```

```ruby
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body
```

```python
import requests

url = "https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4"

headers = {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
```

</CodeGroup>

```json {{ title: 'Response' }}
{
  "result": {
    "id": "a1b2c3d4",
    "name": "My landing page",
    "last_queued": "2021-01-01T00:00:00.000Z",
    "status": "UP",
    "headers": {
      "X-My-Header": "My Value"
    },
    "text_to_search_for": "string",
    "reminder_alert_interval_minutes": 1440,
    "confirmation_period_seconds": 60,
    "recovery_period_seconds": 180,
    "test_interval": 60,
    "timeout": 10000,
    "script": "string",
    "alert_priority": "HIGH",
    "verify_ssl": true,
    "method": "GET",
    "body": "string",
    "follow_redirects": true,
    "auth_username": "string",
    "auth_password": "string",
    "test_regions": [
      "aws:us-east-1",
      "aws:eu-central-1"
    ],
    "user_alerts": [
      "string"
    ],
    "slack_alerts": [
      "string"
    ],
    "discord_alerts": [
      "string"
    ],
    "incident_io_alerts": [
      "string"
    ],
    "microsoft_teams_alerts": [
      "string"
    ],
    "telegram_alerts": [
      "string"
    ],
    "pushover_alerts": [
      "string"
    ],
    "oncall_alerts": [
      "string"
    ],
    "webhook_alerts": [
      "string"
    ],
    "check_type": "TCP",
    "url": null,
    "version": "NODE24_TCP",
    "tcp_hostname": "tcpbin.com",
    "tcp_port": 4242,
    "tcp_ip_family": "IPv4",
    "tcp_data": "string",
    "tcp_should_fail": false,
    "assertions": [
      {
        "type": "TCP_RESPONSE_DATA",
        "property": "",
        "comparison": "EQUALS",
        "expected": "OK"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}
```

</Col>
</Row>

---

## Modify a TCP check   {{ tag: 'PATCH', label: '/v1/checks/tcp/{check_id}' }}
<Row>
<Col>

<a id="opIdupdateTcpCheck"></a>

*Modify the configuration of an existing TCP check*

### Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.

Example: `Authorization: Bearer 123`

<ParameterTree parameters={[{"schema":{"type":"string","minLength":8,"example":"a1b2c3d4","description":"Uptime Check ID"},"required":true,"description":"Uptime Check ID","name":"check_id","in":"path","exampleValues":{"object":"a1b2c3d4","json":"'a1b2c3d4'"},"originalType":"string","safeType":"string","shortDesc":"Uptime Check ID","style":"simple"}]} title="Path parameters" />

<ParameterTree parameters={[{"in":"body","schema":{"type":"object","properties":{"name":{"type":"string","example":"My monitor","description":"Name of the monitor"},"test_interval":{"type":"integer","minimum":30,"example":60,"description":"Interval in seconds between checks"},"test_regions":{"type":"array","items":{"type":"string","description":"Region identifier in format aws:{region}"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions to run checks from. Valid regions: aws:us-east-1, aws:us-east-2, aws:us-west-1, aws:eu-central-1, aws:eu-west-2, aws:ap-south-1, aws:ap-southeast-2, aws:ap-northeast-1"},"user_alerts":{"type":"array","items":{"type":"string"}},"slack_alerts":{"type":"array","items":{"type":"string"}},"discord_alerts":{"type":"array","items":{"type":"string"}},"incident_io_alerts":{"type":"array","items":{"type":"string"}},"microsoft_teams_alerts":{"type":"array","items":{"type":"string"}},"telegram_alerts":{"type":"array","items":{"type":"string"}},"pushover_alerts":{"type":"array","items":{"type":"string"}},"webhook_alerts":{"type":"array","items":{"type":"string"},"description":"IDs of webhooks to associate with this check"},"oncall_alerts":{"type":"array","items":{"type":"string"},"description":"IDs of on-call integrations (Grafana, PagerDuty, Opsgenie, Spike)"},"alert_priority":{"type":"string","enum":["LOW","HIGH"],"default":"LOW","example":"LOW","description":"Alert Priority"},"confirmation_period_seconds":{"type":"integer","minimum":0,"example":60,"description":"Confirmation period in seconds"},"recovery_period_seconds":{"type":"integer","minimum":0,"example":180,"description":"Recovery period in seconds"},"reminder_alert_interval_minutes":{"type":"integer","minimum":-1,"example":1440,"description":"Interval in minutes between reminders (-1 for never)"},"timeout":{"type":"integer","minimum":1000,"example":10000,"description":"Timeout in milliseconds"},"paused":{"type":"boolean","example":false,"description":"Whether the monitor is paused (completely stops execution) or actively running"},"muted":{"type":"boolean","example":false,"description":"Whether the monitor is muted (continues running but suppresses alerts) or sending alerts normally"},"tcp_hostname":{"type":"string","minLength":1,"maxLength":253,"example":"tcpbin.com","description":"Publicly reachable hostname or IP address to connect to"},"tcp_port":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"tcp_ip_family":{"type":"string","enum":["IPv4","IPv6"]},"tcp_data":{"type":["string","null"],"maxLength":16384,"example":"PING\r\n","description":"Optional TCP payload to send immediately after connecting"},"tcp_should_fail":{"type":"boolean"},"assertions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]}}},"additionalProperties":false},"name":"body","required":true,"exampleValues":{"object":{"name":"My monitor","test_interval":60,"test_regions":["aws:us-east-1","aws:eu-central-1"],"user_alerts":["string"],"slack_alerts":["string"],"discord_alerts":["string"],"incident_io_alerts":["string"],"microsoft_teams_alerts":["string"],"telegram_alerts":["string"],"pushover_alerts":["string"],"webhook_alerts":["string"],"oncall_alerts":["string"],"alert_priority":"LOW","confirmation_period_seconds":60,"recovery_period_seconds":180,"reminder_alert_interval_minutes":1440,"timeout":10000,"paused":false,"muted":false,"tcp_hostname":"tcpbin.com","tcp_port":4242,"tcp_ip_family":"IPv4","tcp_data":"PING\r\n","tcp_should_fail":true,"assertions":[{"type":"TCP_RESPONSE_DATA","property":"","comparison":"EQUALS","expected":"OK"}]},"json":"{\n  \"name\": \"My monitor\",\n  \"test_interval\": 60,\n  \"test_regions\": [\n    \"aws:us-east-1\",\n    \"aws:eu-central-1\"\n  ],\n  \"user_alerts\": [\n    \"string\"\n  ],\n  \"slack_alerts\": [\n    \"string\"\n  ],\n  \"discord_alerts\": [\n    \"string\"\n  ],\n  \"incident_io_alerts\": [\n    \"string\"\n  ],\n  \"microsoft_teams_alerts\": [\n    \"string\"\n  ],\n  \"telegram_alerts\": [\n    \"string\"\n  ],\n  \"pushover_alerts\": [\n    \"string\"\n  ],\n  \"webhook_alerts\": [\n    \"string\"\n  ],\n  \"oncall_alerts\": [\n    \"string\"\n  ],\n  \"alert_priority\": \"LOW\",\n  \"confirmation_period_seconds\": 60,\n  \"recovery_period_seconds\": 180,\n  \"reminder_alert_interval_minutes\": 1440,\n  \"timeout\": 10000,\n  \"paused\": false,\n  \"muted\": false,\n  \"tcp_hostname\": \"tcpbin.com\",\n  \"tcp_port\": 4242,\n  \"tcp_ip_family\": \"IPv4\",\n  \"tcp_data\": \"PING\\r\\n\",\n  \"tcp_should_fail\": true,\n  \"assertions\": [\n    {\n      \"type\": \"TCP_RESPONSE_DATA\",\n      \"property\": \"\",\n      \"comparison\": \"EQUALS\",\n      \"expected\": \"OK\"\n    }\n  ]\n}"},"originalType":"object","safeType":"object"},{"in":"body","schema":{"type":"string","example":"My monitor","description":"Name of the monitor"},"name":"» name","required":false,"description":"Name of the monitor","safeType":"string","depth":1,"exampleValues":{"object":"My monitor","json":"'My monitor'"},"shortDesc":"Name of the monitor"},{"in":"body","schema":{"type":"integer","minimum":30,"example":60,"description":"Interval in seconds between checks"},"name":"» test_interval","required":false,"description":"Interval in seconds between checks","safeType":"integer","depth":1,"exampleValues":{"object":60,"json":"'60'"},"shortDesc":"Interval in seconds between checks"},{"in":"body","schema":{"type":"array","items":{"type":"string","description":"Region identifier in format aws:{region}"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions to run checks from. Valid regions: aws:us-east-1, aws:us-east-2, aws:us-west-1, aws:eu-central-1, aws:eu-west-2, aws:ap-south-1, aws:ap-southeast-2, aws:ap-northeast-1"},"name":"» test_regions","required":false,"description":"Regions to run checks from. Valid regions: aws:us-east-1, aws:us-east-2, aws:us-west-1, aws:eu-central-1, aws:eu-west-2, aws:ap-south-1, aws:ap-southeast-2, aws:ap-northeast-1","safeType":"string[]","depth":1,"exampleValues":{"object":["aws:us-east-1","aws:eu-central-1"],"json":"[\n  \"aws:us-east-1\",\n  \"aws:eu-central-1\"\n]"},"shortDesc":"Regions to run checks from. Valid regions: aws:us-east-1, aws:us-east-2, aws:us-west-1, aws:eu-central-1, aws:eu-west-2, aws:ap-south-1, aws:ap-southeast-2, aws:ap-northeast-1"},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» user_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» slack_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» discord_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» incident_io_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» microsoft_teams_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» telegram_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"}},"name":"» pushover_alerts","required":false,"safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"}},{"in":"body","schema":{"type":"array","items":{"type":"string"},"description":"IDs of webhooks to associate with this check"},"name":"» webhook_alerts","required":false,"description":"IDs of webhooks to associate with this check","safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"},"shortDesc":"IDs of webhooks to associate with this check"},{"in":"body","schema":{"type":"array","items":{"type":"string"},"description":"IDs of on-call integrations (Grafana, PagerDuty, Opsgenie, Spike)"},"name":"» oncall_alerts","required":false,"description":"IDs of on-call integrations (Grafana, PagerDuty, Opsgenie, Spike)","safeType":"string[]","depth":1,"exampleValues":{"object":["string"],"json":"[\n  \"string\"\n]"},"shortDesc":"IDs of on-call integrations (Grafana, PagerDuty, Opsgenie, Spike)"},{"in":"body","schema":{"type":"string","enum":["LOW","HIGH"],"default":"LOW","example":"LOW","description":"Alert Priority"},"name":"» alert_priority","required":false,"description":"Alert Priority","safeType":"string","depth":1,"exampleValues":{"object":"LOW","json":"'LOW'"},"shortDesc":"Alert Priority"},{"in":"body","schema":{"type":"integer","minimum":0,"example":60,"description":"Confirmation period in seconds"},"name":"» confirmation_period_seconds","required":false,"description":"Confirmation period in seconds","safeType":"integer","depth":1,"exampleValues":{"object":60,"json":"'60'"},"shortDesc":"Confirmation period in seconds"},{"in":"body","schema":{"type":"integer","minimum":0,"example":180,"description":"Recovery period in seconds"},"name":"» recovery_period_seconds","required":false,"description":"Recovery period in seconds","safeType":"integer","depth":1,"exampleValues":{"object":180,"json":"'180'"},"shortDesc":"Recovery period in seconds"},{"in":"body","schema":{"type":"integer","minimum":-1,"example":1440,"description":"Interval in minutes between reminders (-1 for never)"},"name":"» reminder_alert_interval_minutes","required":false,"description":"Interval in minutes between reminders (-1 for never)","safeType":"integer","depth":1,"exampleValues":{"object":1440,"json":"'1440'"},"shortDesc":"Interval in minutes between reminders (-1 for never)"},{"in":"body","schema":{"type":"integer","minimum":1000,"example":10000,"description":"Timeout in milliseconds"},"name":"» timeout","required":false,"description":"Timeout in milliseconds","safeType":"integer","depth":1,"exampleValues":{"object":10000,"json":"'10000'"},"shortDesc":"Timeout in milliseconds"},{"in":"body","schema":{"type":"boolean","example":false,"description":"Whether the monitor is paused (completely stops execution) or actively running"},"name":"» paused","required":false,"description":"Whether the monitor is paused (completely stops execution) or actively running","safeType":"boolean","depth":1,"exampleValues":{"object":false,"json":"'false'"},"shortDesc":"Whether the monitor is paused (completely stops execution) or actively running"},{"in":"body","schema":{"type":"boolean","example":false,"description":"Whether the monitor is muted (continues running but suppresses alerts) or sending alerts normally"},"name":"» muted","required":false,"description":"Whether the monitor is muted (continues running but suppresses alerts) or sending alerts normally","safeType":"boolean","depth":1,"exampleValues":{"object":false,"json":"'false'"},"shortDesc":"Whether the monitor is muted (continues running but suppresses alerts) or sending alerts normally"},{"in":"body","schema":{"type":"string","minLength":1,"maxLength":253,"example":"tcpbin.com","description":"Publicly reachable hostname or IP address to connect to"},"name":"» tcp_hostname","required":false,"description":"Publicly reachable hostname or IP address to connect to","safeType":"string","depth":1,"exampleValues":{"object":"tcpbin.com","json":"'tcpbin.com'"},"shortDesc":"Publicly reachable hostname or IP address to connect to"},{"in":"body","schema":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"name":"» tcp_port","required":false,"description":"TCP port to connect to","safeType":"integer","depth":1,"exampleValues":{"object":4242,"json":"'4242'"},"shortDesc":"TCP port to connect to"},{"in":"body","schema":{"type":"string","enum":["IPv4","IPv6"]},"name":"» tcp_ip_family","required":false,"safeType":"string","depth":1,"exampleValues":{"object":"IPv4","json":"'IPv4'"}},{"in":"body","schema":{"type":["string","null"],"maxLength":16384,"example":"PING\r\n","description":"Optional TCP payload to send immediately after connecting"},"name":"» tcp_data","required":false,"description":"Optional TCP payload to send immediately after connecting","safeType":["string","null"],"depth":1,"exampleValues":{"object":"PING\r\n","json":"'PING\r\n'"},"shortDesc":"Optional TCP payload to send immediately after connecting"},{"in":"body","schema":{"type":"boolean"},"name":"» tcp_should_fail","required":false,"safeType":"boolean","depth":1,"exampleValues":{"object":true,"json":"'true'"}},{"in":"body","schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]}},"name":"» assertions","required":false,"safeType":"object[]","depth":1,"exampleValues":{"object":[{"type":"TCP_RESPONSE_DATA","property":"","comparison":"EQUALS","expected":"OK"}],"json":"[\n  {\n    \"type\": \"TCP_RESPONSE_DATA\",\n    \"property\": \"\",\n    \"comparison\": \"EQUALS\",\n    \"expected\": \"OK\"\n  }\n]"}},{"in":"body","schema":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"name":"»» type","required":true,"description":"Type of TCP assertion","safeType":"string","depth":2,"exampleValues":{"object":"TCP_RESPONSE_DATA","json":"'TCP_RESPONSE_DATA'"},"shortDesc":"Type of TCP assertion"},{"in":"body","schema":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"name":"»» property","required":true,"description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions.","safeType":"string","depth":2,"exampleValues":{"object":"","json":"''"},"shortDesc":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},{"in":"body","schema":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"name":"»» comparison","required":true,"description":"Comparison operator","safeType":"string","depth":2,"exampleValues":{"object":"EQUALS","json":"'EQUALS'"},"shortDesc":"Comparison operator"},{"in":"body","schema":{"type":"string","example":"OK","description":"Expected value"},"name":"»» expected","required":true,"description":"Expected value","safeType":"string","depth":2,"exampleValues":{"object":"OK","json":"'OK'"},"shortDesc":"Expected value"}]} title="Body parameters" />

<h3 id="modify-the-configuration-of-an-existing-tcp-check-responses">Responses</h3>

|Status|Meaning|Description|
|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Modify an OnlineOrNot TCP Check|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Validation error|
|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Unauthenticated|
|403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|Forbidden|
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|TCP check not found|
|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Internal Server Error|

<ResponseSchemas schemas={[{"status":"200","properties":[{"schema":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4","description":"Uptime Check ID"},"name":{"type":"string","example":"My landing page","description":"Name of the check"},"last_queued":{"type":["string","null"],"example":"2021-01-01T00:00:00.000Z","description":"Last time the check was queued"},"status":{"type":"string","enum":["UP","DOWN","PENDING","PAUSED","MUTED","MAINTENANCE","RECOVERING","VERIFYING"],"example":"UP","description":"Current status of the check based on the latest uptime event"},"headers":{"type":["object","null"],"additionalProperties":{"type":"string"},"example":{"X-My-Header":"My Value"},"description":"Headers to send with the request"},"text_to_search_for":{"type":["string","null"],"description":"Text to search for in the response"},"reminder_alert_interval_minutes":{"type":"number","example":1440,"description":"Interval in minutes between reminder alerts (-1 for never)"},"confirmation_period_seconds":{"type":"number","example":60,"description":"Seconds to wait before confirming a down status"},"recovery_period_seconds":{"type":"number","example":180,"description":"Seconds to wait before confirming recovery"},"test_interval":{"type":"number","example":60,"description":"Interval in seconds between checks"},"timeout":{"type":"number","example":10000,"description":"Timeout in milliseconds"},"script":{"type":["string","null"],"description":"Playwright Test script for scripted browser checks (null for URL-based checks)"},"alert_priority":{"type":"string","enum":["LOW","HIGH"],"example":"HIGH","description":"Priority level for alerts"},"verify_ssl":{"type":"boolean","example":true,"description":"Whether to verify SSL certificates"},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE"],"example":"GET","description":"HTTP method to use"},"body":{"type":["string","null"],"description":"Request body for POST/PUT/PATCH requests"},"follow_redirects":{"type":"boolean","example":true,"description":"Whether to follow HTTP redirects"},"auth_username":{"type":["string","null"],"description":"Username for HTTP Basic Auth"},"auth_password":{"type":["string","null"],"description":"Password for HTTP Basic Auth"},"test_regions":{"type":"array","items":{"type":"string"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions the check runs from. Format: aws:{region}"},"user_alerts":{"type":"array","items":{"type":"string"},"description":"User IDs to notify on alerts"},"slack_alerts":{"type":"array","items":{"type":"string"},"description":"Slack integration IDs to notify"},"discord_alerts":{"type":"array","items":{"type":"string"},"description":"Discord integration IDs to notify"},"incident_io_alerts":{"type":"array","items":{"type":"string"},"description":"Incident.io integration IDs to notify"},"microsoft_teams_alerts":{"type":"array","items":{"type":"string"},"description":"Microsoft Teams integration IDs to notify"},"telegram_alerts":{"type":"array","items":{"type":"string"},"description":"Telegram integration IDs to notify"},"pushover_alerts":{"type":"array","items":{"type":"string"},"description":"Pushover integration IDs to notify"},"oncall_alerts":{"type":"array","items":{"type":"string"},"description":"On-call integration IDs (PagerDuty, Opsgenie, Grafana, Spike)"},"webhook_alerts":{"type":"array","items":{"type":"string"},"description":"Webhook IDs to notify"},"check_type":{"type":"string","enum":["TCP"],"example":"TCP","description":"Indicates this monitor is a TCP check."},"url":{"type":"null","description":"TCP checks do not use a URL target."},"version":{"type":"string","enum":["NODE24_TCP"],"example":"NODE24_TCP","description":"Runtime version for TCP checks."},"tcp_hostname":{"type":"string","example":"tcpbin.com","description":"TCP hostname connected to by this check."},"tcp_port":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"tcp_ip_family":{"type":"string","enum":["IPv4","IPv6"],"example":"IPv4","description":"IP family used by this check."},"tcp_data":{"type":["string","null"],"description":"Optional TCP payload sent by this check."},"tcp_should_fail":{"type":"boolean","example":false,"description":"Whether failed TCP connections are expected."},"assertions":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]},"description":"TCP assertions to validate the response."}},"required":["id","name","last_queued","status","headers","text_to_search_for","reminder_alert_interval_minutes","confirmation_period_seconds","recovery_period_seconds","test_interval","timeout","script","alert_priority","verify_ssl","method","body","follow_redirects","auth_username","auth_password","test_regions","user_alerts","slack_alerts","discord_alerts","incident_io_alerts","microsoft_teams_alerts","telegram_alerts","pushover_alerts","oncall_alerts","webhook_alerts","check_type","url","version","tcp_hostname","tcp_port","tcp_ip_family","tcp_data","tcp_should_fail","assertions"]},"in":"body","name":"result","depth":1,"type":"object","safeType":"object","required":true,"displayName":"» result"},{"schema":{"type":"string","example":"a1b2c3d4","description":"Uptime Check ID"},"in":"body","name":"id","depth":2,"description":"Uptime Check ID","type":"string","safeType":"string","required":true,"displayName":"»» id"},{"schema":{"type":"string","example":"My landing page","description":"Name of the check"},"in":"body","name":"name","depth":2,"description":"Name of the check","type":"string","safeType":"string","required":true,"displayName":"»» name"},{"schema":{"type":["string","null"],"example":"2021-01-01T00:00:00.000Z","description":"Last time the check was queued"},"in":"body","name":"last_queued","depth":2,"description":"Last time the check was queued","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» last_queued"},{"schema":{"type":"string","enum":["UP","DOWN","PENDING","PAUSED","MUTED","MAINTENANCE","RECOVERING","VERIFYING"],"example":"UP","description":"Current status of the check based on the latest uptime event"},"in":"body","name":"status","depth":2,"description":"Current status of the check based on the latest uptime event","type":"string","safeType":"string","required":true,"displayName":"»» status"},{"schema":{"type":["object","null"],"additionalProperties":{"type":"string"},"example":{"X-My-Header":"My Value"},"description":"Headers to send with the request"},"in":"body","name":"headers","depth":2,"description":"Headers to send with the request","type":["object","null"],"safeType":["object","null"],"required":true,"displayName":"»» headers"},{"schema":{"type":"string"},"in":"body","name":"**additionalProperties**","depth":3,"type":"string","safeType":"string","required":false,"displayName":"»»» **additionalProperties**"},{"schema":{"type":["string","null"],"description":"Text to search for in the response"},"in":"body","name":"text_to_search_for","depth":2,"description":"Text to search for in the response","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» text_to_search_for"},{"schema":{"type":"number","example":1440,"description":"Interval in minutes between reminder alerts (-1 for never)"},"in":"body","name":"reminder_alert_interval_minutes","depth":2,"description":"Interval in minutes between reminder alerts (-1 for never)","type":"number","safeType":"number","required":true,"displayName":"»» reminder_alert_interval_minutes"},{"schema":{"type":"number","example":60,"description":"Seconds to wait before confirming a down status"},"in":"body","name":"confirmation_period_seconds","depth":2,"description":"Seconds to wait before confirming a down status","type":"number","safeType":"number","required":true,"displayName":"»» confirmation_period_seconds"},{"schema":{"type":"number","example":180,"description":"Seconds to wait before confirming recovery"},"in":"body","name":"recovery_period_seconds","depth":2,"description":"Seconds to wait before confirming recovery","type":"number","safeType":"number","required":true,"displayName":"»» recovery_period_seconds"},{"schema":{"type":"number","example":60,"description":"Interval in seconds between checks"},"in":"body","name":"test_interval","depth":2,"description":"Interval in seconds between checks","type":"number","safeType":"number","required":true,"displayName":"»» test_interval"},{"schema":{"type":"number","example":10000,"description":"Timeout in milliseconds"},"in":"body","name":"timeout","depth":2,"description":"Timeout in milliseconds","type":"number","safeType":"number","required":true,"displayName":"»» timeout"},{"schema":{"type":["string","null"],"description":"Playwright Test script for scripted browser checks (null for URL-based checks)"},"in":"body","name":"script","depth":2,"description":"Playwright Test script for scripted browser checks (null for URL-based checks)","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» script"},{"schema":{"type":"string","enum":["LOW","HIGH"],"example":"HIGH","description":"Priority level for alerts"},"in":"body","name":"alert_priority","depth":2,"description":"Priority level for alerts","type":"string","safeType":"string","required":true,"displayName":"»» alert_priority"},{"schema":{"type":"boolean","example":true,"description":"Whether to verify SSL certificates"},"in":"body","name":"verify_ssl","depth":2,"description":"Whether to verify SSL certificates","type":"boolean","safeType":"boolean","required":true,"displayName":"»» verify_ssl"},{"schema":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE"],"example":"GET","description":"HTTP method to use"},"in":"body","name":"method","depth":2,"description":"HTTP method to use","type":"string","safeType":"string","required":true,"displayName":"»» method"},{"schema":{"type":["string","null"],"description":"Request body for POST/PUT/PATCH requests"},"in":"body","name":"body","depth":2,"description":"Request body for POST/PUT/PATCH requests","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» body"},{"schema":{"type":"boolean","example":true,"description":"Whether to follow HTTP redirects"},"in":"body","name":"follow_redirects","depth":2,"description":"Whether to follow HTTP redirects","type":"boolean","safeType":"boolean","required":true,"displayName":"»» follow_redirects"},{"schema":{"type":["string","null"],"description":"Username for HTTP Basic Auth"},"in":"body","name":"auth_username","depth":2,"description":"Username for HTTP Basic Auth","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» auth_username"},{"schema":{"type":["string","null"],"description":"Password for HTTP Basic Auth"},"in":"body","name":"auth_password","depth":2,"description":"Password for HTTP Basic Auth","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» auth_password"},{"schema":{"type":"array","items":{"type":"string"},"example":["aws:us-east-1","aws:eu-central-1"],"description":"Regions the check runs from. Format: aws:{region}"},"in":"body","name":"test_regions","depth":2,"description":"Regions the check runs from. Format: aws:{region}","type":"array","safeType":"string[]","required":true,"displayName":"»» test_regions"},{"schema":{"type":"array","items":{"type":"string"},"description":"User IDs to notify on alerts"},"in":"body","name":"user_alerts","depth":2,"description":"User IDs to notify on alerts","type":"array","safeType":"string[]","required":true,"displayName":"»» user_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Slack integration IDs to notify"},"in":"body","name":"slack_alerts","depth":2,"description":"Slack integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» slack_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Discord integration IDs to notify"},"in":"body","name":"discord_alerts","depth":2,"description":"Discord integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» discord_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Incident.io integration IDs to notify"},"in":"body","name":"incident_io_alerts","depth":2,"description":"Incident.io integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» incident_io_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Microsoft Teams integration IDs to notify"},"in":"body","name":"microsoft_teams_alerts","depth":2,"description":"Microsoft Teams integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» microsoft_teams_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Telegram integration IDs to notify"},"in":"body","name":"telegram_alerts","depth":2,"description":"Telegram integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» telegram_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Pushover integration IDs to notify"},"in":"body","name":"pushover_alerts","depth":2,"description":"Pushover integration IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» pushover_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"On-call integration IDs (PagerDuty, Opsgenie, Grafana, Spike)"},"in":"body","name":"oncall_alerts","depth":2,"description":"On-call integration IDs (PagerDuty, Opsgenie, Grafana, Spike)","type":"array","safeType":"string[]","required":true,"displayName":"»» oncall_alerts"},{"schema":{"type":"array","items":{"type":"string"},"description":"Webhook IDs to notify"},"in":"body","name":"webhook_alerts","depth":2,"description":"Webhook IDs to notify","type":"array","safeType":"string[]","required":true,"displayName":"»» webhook_alerts"},{"schema":{"type":"string","enum":["TCP"],"example":"TCP","description":"Indicates this monitor is a TCP check."},"in":"body","name":"check_type","depth":2,"description":"Indicates this monitor is a TCP check.","type":"string","safeType":"string","required":true,"displayName":"»» check_type"},{"schema":{"type":"null","description":"TCP checks do not use a URL target."},"in":"body","name":"url","depth":2,"description":"TCP checks do not use a URL target.","type":"null","safeType":"null","required":true,"displayName":"»» url"},{"schema":{"type":"string","enum":["NODE24_TCP"],"example":"NODE24_TCP","description":"Runtime version for TCP checks."},"in":"body","name":"version","depth":2,"description":"Runtime version for TCP checks.","type":"string","safeType":"string","required":true,"displayName":"»» version"},{"schema":{"type":"string","example":"tcpbin.com","description":"TCP hostname connected to by this check."},"in":"body","name":"tcp_hostname","depth":2,"description":"TCP hostname connected to by this check.","type":"string","safeType":"string","required":true,"displayName":"»» tcp_hostname"},{"schema":{"type":"integer","minimum":1,"maximum":65535,"example":4242,"description":"TCP port to connect to"},"in":"body","name":"tcp_port","depth":2,"description":"TCP port to connect to","type":"integer","safeType":"integer","required":true,"displayName":"»» tcp_port"},{"schema":{"type":"string","enum":["IPv4","IPv6"],"example":"IPv4","description":"IP family used by this check."},"in":"body","name":"tcp_ip_family","depth":2,"description":"IP family used by this check.","type":"string","safeType":"string","required":true,"displayName":"»» tcp_ip_family"},{"schema":{"type":["string","null"],"description":"Optional TCP payload sent by this check."},"in":"body","name":"tcp_data","depth":2,"description":"Optional TCP payload sent by this check.","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» tcp_data"},{"schema":{"type":"boolean","example":false,"description":"Whether failed TCP connections are expected."},"in":"body","name":"tcp_should_fail","depth":2,"description":"Whether failed TCP connections are expected.","type":"boolean","safeType":"boolean","required":true,"displayName":"»» tcp_should_fail"},{"schema":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"property":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"comparison":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"expected":{"type":"string","example":"OK","description":"Expected value"}},"required":["type","property","comparison","expected"]},"description":"TCP assertions to validate the response."},"in":"body","name":"assertions","depth":2,"description":"TCP assertions to validate the response.","type":["array","null"],"safeType":["array","null"],"required":true,"displayName":"»» assertions"},{"schema":{"type":"string","enum":["TCP_RESPONSE_TIME","TCP_RESPONSE_DATA"],"example":"TCP_RESPONSE_DATA","description":"Type of TCP assertion"},"in":"body","name":"type","depth":3,"description":"Type of TCP assertion","type":"string","safeType":"string","required":true,"displayName":"»»» type"},{"schema":{"type":"string","example":"","description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions."},"in":"body","name":"property","depth":3,"description":"Property to assert on. Use an empty string for raw TCP response data and responseTime for response time assertions.","type":"string","safeType":"string","required":true,"displayName":"»»» property"},{"schema":{"type":"string","enum":["EQUALS","NOT_EQUALS","GREATER_THAN","LESS_THAN","NULL","NOT_NULL","EMPTY","NOT_EMPTY","CONTAINS","NOT_CONTAINS","FALSE","TRUE"],"example":"EQUALS","description":"Comparison operator"},"in":"body","name":"comparison","depth":3,"description":"Comparison operator","type":"string","safeType":"string","required":true,"displayName":"»»» comparison"},{"schema":{"type":"string","example":"OK","description":"Expected value"},"in":"body","name":"expected","depth":3,"description":"Expected value","type":"string","safeType":"string","required":true,"displayName":"»»» expected"},{"schema":{"type":"boolean","default":true,"example":true,"description":"Whether the API call was successful"},"in":"body","name":"success","depth":1,"description":"Whether the API call was successful","type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"}]}]} />

</Col>

<Col sticky>

<CodeGroup title="Request" tag="PATCH" label="/v1/checks/tcp/{check_id}">
```bash {{ title: 'cURL' }}
curl --request PATCH \
  --url https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"tcp_hostname":"example.org","tcp_port":8443,"tcp_ip_family":"IPv4"}'
```

```javascript
fetch("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4", {
  "method": "PATCH",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
  },
  "body": "{\"tcp_hostname\":\"example.org\",\"tcp_port\":8443,\"tcp_ip_family\":\"IPv4\"}"
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});
```

```java
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"tcp_hostname\":\"example.org\",\"tcp_port\":8443,\"tcp_ip_family\":\"IPv4\"}");
Request request = new Request.Builder()
  .url("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4")
  .patch(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Accept", "application/json")
  .addHeader("Authorization", "Bearer {access-token}")
  .build();

Response response = client.newCall(request).execute();
```

```php
<?php

HttpRequest::methodRegister('PATCH');
$request = new HttpRequest();
$request->setUrl('https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
]);

$request->setBody('{"tcp_hostname":"example.org","tcp_port":8443,"tcp_ip_family":"IPv4"}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
```

```ruby
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"tcp_hostname\":\"example.org\",\"tcp_port\":8443,\"tcp_ip_family\":\"IPv4\"}"

response = http.request(request)
puts response.read_body
```

```python
import requests

url = "https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4"

payload = {
    "tcp_hostname": "example.org",
    "tcp_port": 8443,
    "tcp_ip_family": "IPv4"
}
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
}

response = requests.request("PATCH", url, json=payload, headers=headers)

print(response.text)
```

</CodeGroup>

```json {{ title: 'Response' }}
{
  "result": {
    "id": "a1b2c3d4",
    "name": "My landing page",
    "last_queued": "2021-01-01T00:00:00.000Z",
    "status": "UP",
    "headers": {
      "X-My-Header": "My Value"
    },
    "text_to_search_for": "string",
    "reminder_alert_interval_minutes": 1440,
    "confirmation_period_seconds": 60,
    "recovery_period_seconds": 180,
    "test_interval": 60,
    "timeout": 10000,
    "script": "string",
    "alert_priority": "HIGH",
    "verify_ssl": true,
    "method": "GET",
    "body": "string",
    "follow_redirects": true,
    "auth_username": "string",
    "auth_password": "string",
    "test_regions": [
      "aws:us-east-1",
      "aws:eu-central-1"
    ],
    "user_alerts": [
      "string"
    ],
    "slack_alerts": [
      "string"
    ],
    "discord_alerts": [
      "string"
    ],
    "incident_io_alerts": [
      "string"
    ],
    "microsoft_teams_alerts": [
      "string"
    ],
    "telegram_alerts": [
      "string"
    ],
    "pushover_alerts": [
      "string"
    ],
    "oncall_alerts": [
      "string"
    ],
    "webhook_alerts": [
      "string"
    ],
    "check_type": "TCP",
    "url": null,
    "version": "NODE24_TCP",
    "tcp_hostname": "tcpbin.com",
    "tcp_port": 4242,
    "tcp_ip_family": "IPv4",
    "tcp_data": "string",
    "tcp_should_fail": false,
    "assertions": [
      {
        "type": "TCP_RESPONSE_DATA",
        "property": "",
        "comparison": "EQUALS",
        "expected": "OK"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}
```

</Col>
</Row>

---

## Delete a TCP check   {{ tag: 'DELETE', label: '/v1/checks/tcp/{check_id}' }}
<Row>
<Col>

<a id="opIddeleteTcpCheck"></a>

*Permanently delete a TCP check*

### Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.

Example: `Authorization: Bearer 123`

<ParameterTree parameters={[{"schema":{"type":"string","minLength":8,"example":"a1b2c3d4","description":"Uptime Check ID"},"required":true,"description":"Uptime Check ID","name":"check_id","in":"path","exampleValues":{"object":"a1b2c3d4","json":"'a1b2c3d4'"},"originalType":"string","safeType":"string","shortDesc":"Uptime Check ID","style":"simple"}]} title="Path parameters" />

<h3 id="permanently-delete-a-tcp-check-responses">Responses</h3>

|Status|Meaning|Description|
|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Returns the deleted OnlineOrNot TCP Check's ID|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Validation error|
|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Unauthenticated|
|403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|Forbidden|
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|TCP check not found|
|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Internal Server Error|

<ResponseSchemas schemas={[{"status":"200","properties":[{"schema":{"type":"object","properties":{"id":{"type":"string","example":"a1b2c3d4","description":"Uptime Check ID"}},"required":["id"]},"in":"body","name":"result","depth":1,"type":"object","safeType":"object","required":true,"displayName":"» result"},{"schema":{"type":"string","example":"a1b2c3d4","description":"Uptime Check ID"},"in":"body","name":"id","depth":2,"description":"Uptime Check ID","type":"string","safeType":"string","required":true,"displayName":"»» id"},{"schema":{"type":"boolean","default":true,"example":true,"description":"Whether the API call was successful"},"in":"body","name":"success","depth":1,"description":"Whether the API call was successful","type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"}]}]} />

</Col>

<Col sticky>

<CodeGroup title="Request" tag="DELETE" label="/v1/checks/tcp/{check_id}">
```bash {{ title: 'cURL' }}
curl --request DELETE \
  --url https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
```

```javascript
fetch("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4", {
  "method": "DELETE",
  "headers": {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
  }
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});
```

```java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4")
  .delete(null)
  .addHeader("Accept", "application/json")
  .addHeader("Authorization", "Bearer {access-token}")
  .build();

Response response = client.newCall(request).execute();
```

```php
<?php

$request = new HttpRequest();
$request->setUrl('https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
```

```ruby
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body
```

```python
import requests

url = "https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4"

headers = {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
}

response = requests.request("DELETE", url, headers=headers)

print(response.text)
```

</CodeGroup>

```json {{ title: 'Response' }}
{
  "result": {
    "id": "a1b2c3d4"
  },
  "success": true,
  "errors": [],
  "messages": []
}
```

</Col>
</Row>

---

## List incidents for a TCP check   {{ tag: 'GET', label: '/v1/checks/tcp/{check_id}/incidents' }}
<Row>
<Col>

<a id="opIdlistTcpCheckIncidents"></a>

*Review recent failures and recoveries for a specific TCP check*

### Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.

Example: `Authorization: Bearer 123`

<ParameterTree parameters={[{"schema":{"type":"string","minLength":1,"example":"a1b2c3d4","description":"Public check ID"},"required":true,"description":"Public check ID","name":"check_id","in":"path","exampleValues":{"object":"a1b2c3d4","json":"'a1b2c3d4'"},"originalType":"string","safeType":"string","shortDesc":"Public check ID","style":"simple"}]} title="Path parameters" />

<ParameterTree parameters={[{"schema":{"type":"string","pattern":"^[1-9][0-9]*$","default":1,"example":1,"description":"Page number of paginated results"},"required":false,"description":"Page number of paginated results","name":"page","in":"query","exampleValues":{"object":1,"json":"'1'"},"originalType":"string","safeType":"string","shortDesc":"Page number of paginated results","style":"form"},{"schema":{"type":"string","pattern":"^[1-9][0-9]*$","default":20,"example":20,"description":"Number of records per page, from 1 through 100"},"required":false,"description":"Number of records per page, from 1 through 100","name":"per_page","in":"query","exampleValues":{"object":20,"json":"'20'"},"originalType":"string","safeType":"string","shortDesc":"Number of records per page, from 1 through 100","style":"form"},{"schema":{"type":"string","format":"date-time","example":"2026-08-25T10:00:00Z","description":"Inclusive start of the requested time range"},"required":false,"description":"Inclusive start of the requested time range","name":"from","in":"query","exampleValues":{"object":"2026-08-25T10:00:00Z","json":"'2026-08-25T10:00:00Z'"},"originalType":"string","safeType":"string(date-time)","shortDesc":"Inclusive start of the requested time range","style":"form"},{"schema":{"type":"string","format":"date-time","example":"2026-08-25T11:00:00Z","description":"Exclusive end of the requested time range. Must be later than from when both are provided."},"required":false,"description":"Exclusive end of the requested time range. Must be later than from when both are provided.","name":"to","in":"query","exampleValues":{"object":"2026-08-25T11:00:00Z","json":"'2026-08-25T11:00:00Z'"},"originalType":"string","safeType":"string(date-time)","shortDesc":"Exclusive end of the requested time range. Must be later than from when both are provided.","style":"form"}]} title="Query parameters" />

<h3 id="review-recent-failures-and-recoveries-for-a-specific-tcp-check-responses">Responses</h3>

|Status|Meaning|Description|
|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A page of incidents for the check|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Invalid query parameters|
|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Unauthenticated|
|403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|Forbidden|
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|Check not found|
|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Internal server error|

<ResponseSchemas schemas={[{"status":"200","properties":[{"schema":{"type":"boolean","enum":[true]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"check_id":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"}},"required":["id","check_id","started_at","ended_at"],"additionalProperties":false}},"in":"body","name":"result","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» result"},{"schema":{"type":"string"},"in":"body","name":"id","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» id"},{"schema":{"type":"string"},"in":"body","name":"check_id","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» check_id"},{"schema":{"type":"string","format":"date-time"},"in":"body","name":"started_at","depth":2,"type":"string","format":"date-time","safeType":"string(date-time)","required":true,"displayName":"»» started_at"},{"schema":{"type":["string","null"],"format":"date-time"},"in":"body","name":"ended_at","depth":2,"type":["string","null"],"format":"date-time","safeType":"string,null(date-time)","required":true,"displayName":"»» ended_at"},{"schema":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0},"per_page":{"type":"integer","minimum":1,"maximum":100},"count":{"type":"integer","minimum":0},"total_count":{"type":"integer","minimum":0}},"required":["page","per_page","count","total_count"],"additionalProperties":false},"in":"body","name":"result_info","depth":1,"type":"object","safeType":"object","required":true,"displayName":"» result_info"},{"schema":{"type":"integer","exclusiveMinimum":0},"in":"body","name":"page","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» page"},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"body","name":"per_page","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» per_page"},{"schema":{"type":"integer","minimum":0},"in":"body","name":"count","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» count"},{"schema":{"type":"integer","minimum":0},"in":"body","name":"total_count","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» total_count"},{"schema":{"type":"array","prefixItems":[]},"in":"body","name":"errors","depth":1,"type":"array","safeType":"array","required":true,"displayName":"» errors"},{"schema":{"type":"array","prefixItems":[]},"in":"body","name":"messages","depth":1,"type":"array","safeType":"array","required":true,"displayName":"» messages"}]},{"status":"400","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]},{"status":"401","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]},{"status":"403","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]},{"status":"404","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]},{"status":"500","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]}]} />

</Col>

<Col sticky>

<CodeGroup title="Request" tag="GET" label="/v1/checks/tcp/{check_id}/incidents">
```bash {{ title: 'cURL' }}
curl --request GET \
  --url https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/incidents \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
```

```javascript
fetch("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/incidents", {
  "method": "GET",
  "headers": {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
  }
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});
```

```java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/incidents")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Authorization", "Bearer {access-token}")
  .build();

Response response = client.newCall(request).execute();
```

```php
<?php

$request = new HttpRequest();
$request->setUrl('https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/incidents');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
```

```ruby
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/incidents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body
```

```python
import requests

url = "https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/incidents"

headers = {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
```

</CodeGroup>

```json {{ title: 'Response' }}
{
  "success": true,
  "result": [
    {
      "id": "string",
      "check_id": "string",
      "started_at": "2019-08-24T14:15:22Z",
      "ended_at": "2019-08-24T14:15:22Z"
    }
  ],
  "result_info": {
    "page": 0,
    "per_page": 1,
    "count": 0,
    "total_count": 0
  },
  "errors": [
    null
  ],
  "messages": [
    null
  ]
}
```

</Col>
</Row>

---

## List results for a TCP check   {{ tag: 'GET', label: '/v1/checks/tcp/{check_id}/results' }}
<Row>
<Col>

<a id="opIdlistTcpCheckResults"></a>

*Review raw TCP check results over a bounded time range*

### Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.

Example: `Authorization: Bearer 123`

<ParameterTree parameters={[{"schema":{"type":"string","minLength":1,"example":"a1b2c3d4","description":"Public check ID"},"required":true,"description":"Public check ID","name":"check_id","in":"path","exampleValues":{"object":"a1b2c3d4","json":"'a1b2c3d4'"},"originalType":"string","safeType":"string","shortDesc":"Public check ID","style":"simple"}]} title="Path parameters" />

<ParameterTree parameters={[{"schema":{"type":"string","pattern":"^[1-9][0-9]*$","default":1,"example":1,"description":"Page number of paginated results"},"required":false,"description":"Page number of paginated results","name":"page","in":"query","exampleValues":{"object":1,"json":"'1'"},"originalType":"string","safeType":"string","shortDesc":"Page number of paginated results","style":"form"},{"schema":{"type":"string","pattern":"^[1-9][0-9]*$","default":20,"example":20,"description":"Number of records per page, from 1 through 100"},"required":false,"description":"Number of records per page, from 1 through 100","name":"per_page","in":"query","exampleValues":{"object":20,"json":"'20'"},"originalType":"string","safeType":"string","shortDesc":"Number of records per page, from 1 through 100","style":"form"},{"schema":{"type":"string","format":"date-time","example":"2026-08-25T10:00:00Z","description":"Inclusive start of the requested time range"},"required":true,"description":"Inclusive start of the requested time range","name":"from","in":"query","exampleValues":{"object":"2026-08-25T10:00:00Z","json":"'2026-08-25T10:00:00Z'"},"originalType":"string","safeType":"string(date-time)","shortDesc":"Inclusive start of the requested time range","style":"form"},{"schema":{"type":"string","format":"date-time","example":"2026-08-25T11:00:00Z","description":"Exclusive end of the requested time range"},"required":true,"description":"Exclusive end of the requested time range","name":"to","in":"query","exampleValues":{"object":"2026-08-25T11:00:00Z","json":"'2026-08-25T11:00:00Z'"},"originalType":"string","safeType":"string(date-time)","shortDesc":"Exclusive end of the requested time range","style":"form"}]} title="Query parameters" />

<h3 id="review-raw-tcp-check-results-over-a-bounded-time-range-responses">Responses</h3>

|Status|Meaning|Description|
|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A chronological page of raw check results|
|400|[Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1)|Invalid query parameters|
|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Unauthenticated|
|403|[Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3)|Forbidden|
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|Check not found|
|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Internal server error|
|503|[Service Unavailable](https://tools.ietf.org/html/rfc7231#section-6.6.4)|Required result storage unavailable|

<ResponseSchemas schemas={[{"status":"200","properties":[{"schema":{"type":"boolean","enum":[true]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"object","properties":{"check_id":{"type":"string","minLength":1},"check_type":{"type":"string","enum":["TCP"]},"window":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start of the returned result window"},"to":{"type":"string","format":"date-time","description":"Exclusive end of the returned result window"}},"required":["from","to"],"additionalProperties":false},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"checked_at":{"type":"string","format":"date-time"},"checked_from":{"type":["string","null"],"enum":["aws:us-east-1","aws:us-east-2","aws:us-west-1","aws:eu-central-1","aws:eu-west-2","aws:ap-south-1","aws:ap-southeast-2","aws:ap-northeast-1"],"description":"Region identifier in format aws:{region}"},"passing":{"type":["boolean","null"]},"response_time_ms":{"type":"number","minimum":0},"attempt_number":{"type":["integer","null"],"minimum":0},"is_final_attempt":{"type":["boolean","null"]},"dispatched_at_ms":{"type":["integer","null"],"minimum":0},"response_body":{"type":["string","null"]},"body_availability":{"type":"string","enum":["AVAILABLE","NOT_RECORDED","EXPIRED","TRACE_ONLY"]},"tcp_status":{"type":["string","null"]},"failure_source":{"type":["string","null"],"enum":["TRANSPORT","ASSERTION"]},"failure_type":{"type":["string","null"]},"dns_time_ms":{"type":["number","null"],"minimum":0},"connect_time_ms":{"type":["number","null"],"minimum":0},"data_time_ms":{"type":["number","null"],"minimum":0}},"required":["id","checked_at","checked_from","passing","response_time_ms","attempt_number","is_final_attempt","dispatched_at_ms","response_body","body_availability","tcp_status","failure_source","failure_type","dns_time_ms","connect_time_ms","data_time_ms"],"additionalProperties":false}},"result_info":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0},"per_page":{"type":"integer","minimum":1,"maximum":100},"count":{"type":"integer","minimum":0},"total_count":{"type":"integer","minimum":0}},"required":["page","per_page","count","total_count"],"additionalProperties":false}},"required":["check_id","check_type","window","results","result_info"],"additionalProperties":false},"in":"body","name":"result","depth":1,"type":"object","safeType":"object","required":true,"displayName":"» result"},{"schema":{"type":"string","minLength":1},"in":"body","name":"check_id","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» check_id"},{"schema":{"type":"string","enum":["TCP"]},"in":"body","name":"check_type","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» check_type"},{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start of the returned result window"},"to":{"type":"string","format":"date-time","description":"Exclusive end of the returned result window"}},"required":["from","to"],"additionalProperties":false},"in":"body","name":"window","depth":2,"type":"object","safeType":"object","required":true,"displayName":"»» window"},{"schema":{"type":"string","format":"date-time","description":"Inclusive start of the returned result window"},"in":"body","name":"from","depth":3,"description":"Inclusive start of the returned result window","type":"string","format":"date-time","safeType":"string(date-time)","required":true,"displayName":"»»» from"},{"schema":{"type":"string","format":"date-time","description":"Exclusive end of the returned result window"},"in":"body","name":"to","depth":3,"description":"Exclusive end of the returned result window","type":"string","format":"date-time","safeType":"string(date-time)","required":true,"displayName":"»»» to"},{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"checked_at":{"type":"string","format":"date-time"},"checked_from":{"type":["string","null"],"enum":["aws:us-east-1","aws:us-east-2","aws:us-west-1","aws:eu-central-1","aws:eu-west-2","aws:ap-south-1","aws:ap-southeast-2","aws:ap-northeast-1"],"description":"Region identifier in format aws:{region}"},"passing":{"type":["boolean","null"]},"response_time_ms":{"type":"number","minimum":0},"attempt_number":{"type":["integer","null"],"minimum":0},"is_final_attempt":{"type":["boolean","null"]},"dispatched_at_ms":{"type":["integer","null"],"minimum":0},"response_body":{"type":["string","null"]},"body_availability":{"type":"string","enum":["AVAILABLE","NOT_RECORDED","EXPIRED","TRACE_ONLY"]},"tcp_status":{"type":["string","null"]},"failure_source":{"type":["string","null"],"enum":["TRANSPORT","ASSERTION"]},"failure_type":{"type":["string","null"]},"dns_time_ms":{"type":["number","null"],"minimum":0},"connect_time_ms":{"type":["number","null"],"minimum":0},"data_time_ms":{"type":["number","null"],"minimum":0}},"required":["id","checked_at","checked_from","passing","response_time_ms","attempt_number","is_final_attempt","dispatched_at_ms","response_body","body_availability","tcp_status","failure_source","failure_type","dns_time_ms","connect_time_ms","data_time_ms"],"additionalProperties":false}},"in":"body","name":"results","depth":2,"type":"array","safeType":"object[]","required":true,"displayName":"»» results"},{"schema":{"type":"string","minLength":1},"in":"body","name":"id","depth":3,"type":"string","safeType":"string","required":true,"displayName":"»»» id"},{"schema":{"type":"string","format":"date-time"},"in":"body","name":"checked_at","depth":3,"type":"string","format":"date-time","safeType":"string(date-time)","required":true,"displayName":"»»» checked_at"},{"schema":{"type":["string","null"],"enum":["aws:us-east-1","aws:us-east-2","aws:us-west-1","aws:eu-central-1","aws:eu-west-2","aws:ap-south-1","aws:ap-southeast-2","aws:ap-northeast-1"],"description":"Region identifier in format aws:{region}"},"in":"body","name":"checked_from","depth":3,"description":"Region identifier in format aws:{region}","type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»»» checked_from"},{"schema":{"type":["boolean","null"]},"in":"body","name":"passing","depth":3,"type":["boolean","null"],"safeType":["boolean","null"],"required":true,"displayName":"»»» passing"},{"schema":{"type":"number","minimum":0},"in":"body","name":"response_time_ms","depth":3,"type":"number","safeType":"number","required":true,"displayName":"»»» response_time_ms"},{"schema":{"type":["integer","null"],"minimum":0},"in":"body","name":"attempt_number","depth":3,"type":["integer","null"],"safeType":["integer","null"],"required":true,"displayName":"»»» attempt_number"},{"schema":{"type":["boolean","null"]},"in":"body","name":"is_final_attempt","depth":3,"type":["boolean","null"],"safeType":["boolean","null"],"required":true,"displayName":"»»» is_final_attempt"},{"schema":{"type":["integer","null"],"minimum":0},"in":"body","name":"dispatched_at_ms","depth":3,"type":["integer","null"],"safeType":["integer","null"],"required":true,"displayName":"»»» dispatched_at_ms"},{"schema":{"type":["string","null"]},"in":"body","name":"response_body","depth":3,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»»» response_body"},{"schema":{"type":"string","enum":["AVAILABLE","NOT_RECORDED","EXPIRED","TRACE_ONLY"]},"in":"body","name":"body_availability","depth":3,"type":"string","safeType":"string","required":true,"displayName":"»»» body_availability"},{"schema":{"type":["string","null"]},"in":"body","name":"tcp_status","depth":3,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»»» tcp_status"},{"schema":{"type":["string","null"],"enum":["TRANSPORT","ASSERTION"]},"in":"body","name":"failure_source","depth":3,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»»» failure_source"},{"schema":{"type":["string","null"]},"in":"body","name":"failure_type","depth":3,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»»» failure_type"},{"schema":{"type":["number","null"],"minimum":0},"in":"body","name":"dns_time_ms","depth":3,"type":["number","null"],"safeType":["number","null"],"required":true,"displayName":"»»» dns_time_ms"},{"schema":{"type":["number","null"],"minimum":0},"in":"body","name":"connect_time_ms","depth":3,"type":["number","null"],"safeType":["number","null"],"required":true,"displayName":"»»» connect_time_ms"},{"schema":{"type":["number","null"],"minimum":0},"in":"body","name":"data_time_ms","depth":3,"type":["number","null"],"safeType":["number","null"],"required":true,"displayName":"»»» data_time_ms"},{"schema":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0},"per_page":{"type":"integer","minimum":1,"maximum":100},"count":{"type":"integer","minimum":0},"total_count":{"type":"integer","minimum":0}},"required":["page","per_page","count","total_count"],"additionalProperties":false},"in":"body","name":"result_info","depth":2,"type":"object","safeType":"object","required":true,"displayName":"»» result_info"},{"schema":{"type":"integer","exclusiveMinimum":0},"in":"body","name":"page","depth":3,"type":"integer","safeType":"integer","required":true,"displayName":"»»» page"},{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"body","name":"per_page","depth":3,"type":"integer","safeType":"integer","required":true,"displayName":"»»» per_page"},{"schema":{"type":"integer","minimum":0},"in":"body","name":"count","depth":3,"type":"integer","safeType":"integer","required":true,"displayName":"»»» count"},{"schema":{"type":"integer","minimum":0},"in":"body","name":"total_count","depth":3,"type":"integer","safeType":"integer","required":true,"displayName":"»»» total_count"},{"schema":{"type":"array","prefixItems":[]},"in":"body","name":"errors","depth":1,"type":"array","safeType":"array","required":true,"displayName":"» errors"},{"schema":{"type":"array","prefixItems":[]},"in":"body","name":"messages","depth":1,"type":"array","safeType":"array","required":true,"displayName":"» messages"}]},{"status":"400","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]},{"status":"401","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]},{"status":"403","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]},{"status":"404","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]},{"status":"500","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]},{"status":"503","properties":[{"schema":{"type":"boolean","enum":[false]},"in":"body","name":"success","depth":1,"type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"null"},"in":"body","name":"result","depth":1,"type":"null","safeType":"null","required":true,"displayName":"» result"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},"minItems":1},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"type":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false}},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"integer"},"in":"body","name":"code","depth":2,"type":"integer","safeType":"integer","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":["string","null"]},"in":"body","name":"type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":false,"displayName":"»» type"}]}]} />

</Col>

<Col sticky>

<CodeGroup title="Request" tag="GET" label="/v1/checks/tcp/{check_id}/results">
```bash {{ title: 'cURL' }}
curl --request GET \
  --url 'https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/results?from=2026-08-25T10%3A00%3A00Z&to=2026-08-25T11%3A00%3A00Z' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
```

```javascript
fetch("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/results?from=2026-08-25T10%3A00%3A00Z&to=2026-08-25T11%3A00%3A00Z", {
  "method": "GET",
  "headers": {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
  }
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});
```

```java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/results?from=2026-08-25T10%3A00%3A00Z&to=2026-08-25T11%3A00%3A00Z")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Authorization", "Bearer {access-token}")
  .build();

Response response = client.newCall(request).execute();
```

```php
<?php

$request = new HttpRequest();
$request->setUrl('https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/results');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'from' => '2026-08-25T10:00:00Z',
  'to' => '2026-08-25T11:00:00Z'
]);

$request->setHeaders([
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
```

```ruby
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/results?from=2026-08-25T10%3A00%3A00Z&to=2026-08-25T11%3A00%3A00Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body
```

```python
import requests

url = "https://api.onlineornot.com/v1/checks/tcp/a1b2c3d4/results"

querystring = {"from":"2026-08-25T10:00:00Z","to":"2026-08-25T11:00:00Z"}

headers = {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
```

</CodeGroup>

```json {{ title: 'Response' }}
{
  "success": true,
  "result": {
    "check_id": "string",
    "check_type": "TCP",
    "window": {
      "from": "2019-08-24T14:15:22Z",
      "to": "2019-08-24T14:15:22Z"
    },
    "results": [
      {
        "id": "string",
        "checked_at": "2019-08-24T14:15:22Z",
        "checked_from": "aws:us-east-1",
        "passing": true,
        "response_time_ms": 0,
        "attempt_number": 0,
        "is_final_attempt": true,
        "dispatched_at_ms": 0,
        "response_body": "string",
        "body_availability": "AVAILABLE",
        "tcp_status": "string",
        "failure_source": "TRANSPORT",
        "failure_type": "string",
        "dns_time_ms": 0,
        "connect_time_ms": 0,
        "data_time_ms": 0
      }
    ],
    "result_info": {
      "page": 0,
      "per_page": 1,
      "count": 0,
      "total_count": 0
    }
  },
  "errors": [
    null
  ],
  "messages": [
    null
  ]
}
```

</Col>
</Row>

---

