---
title: Healthchecks
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Healthchecks

##### [List Health Checks](https://developers.cloudflare.com/api/typescript/resources/healthchecks/methods/list)

client.healthchecks.list(HealthcheckListParams { zone\_id, page, per\_page } params, RequestOptionsoptions?): V4PagePaginationArray<[Healthcheck](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20healthcheck%20%3E%20%28schema%29) { id, address, check\_regions, 15 more } \>

GET/zones/{zone\_id}/healthchecks

##### [Health Check Details](https://developers.cloudflare.com/api/typescript/resources/healthchecks/methods/get)

client.healthchecks.get(stringhealthcheckID, HealthcheckGetParams { zone\_id } params, RequestOptionsoptions?): [Healthcheck](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20healthcheck%20%3E%20%28schema%29) { id, address, check\_regions, 15 more } 

GET/zones/{zone\_id}/healthchecks/{healthcheck\_id}

##### [Create Health Check](https://developers.cloudflare.com/api/typescript/resources/healthchecks/methods/create)

client.healthchecks.create(HealthcheckCreateParams { zone\_id, address, name, 11 more } params, RequestOptionsoptions?): [Healthcheck](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20healthcheck%20%3E%20%28schema%29) { id, address, check\_regions, 15 more } 

POST/zones/{zone\_id}/healthchecks

##### [Update Health Check](https://developers.cloudflare.com/api/typescript/resources/healthchecks/methods/update)

client.healthchecks.update(stringhealthcheckID, HealthcheckUpdateParams { zone\_id, address, name, 11 more } params, RequestOptionsoptions?): [Healthcheck](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20healthcheck%20%3E%20%28schema%29) { id, address, check\_regions, 15 more } 

PUT/zones/{zone\_id}/healthchecks/{healthcheck\_id}

##### [Patch Health Check](https://developers.cloudflare.com/api/typescript/resources/healthchecks/methods/edit)

client.healthchecks.edit(stringhealthcheckID, HealthcheckEditParams { zone\_id, address, name, 11 more } params, RequestOptionsoptions?): [Healthcheck](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20healthcheck%20%3E%20%28schema%29) { id, address, check\_regions, 15 more } 

PATCH/zones/{zone\_id}/healthchecks/{healthcheck\_id}

##### [Delete Health Check](https://developers.cloudflare.com/api/typescript/resources/healthchecks/methods/delete)

client.healthchecks.delete(stringhealthcheckID, HealthcheckDeleteParams { zone\_id } params, RequestOptionsoptions?): [HealthcheckDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20healthcheck%5Fdelete%5Fresponse%20%3E%20%28schema%29) { id } 

DELETE/zones/{zone\_id}/healthchecks/{healthcheck\_id}

##### ModelsExpand Collapse 

CheckRegion \= "WNAM" | "ENAM" | "WEU" | 11 more

WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, IN: India, SEAS: South East Asia, NEAS: North East Asia, ALL\_REGIONS: all regions (BUSINESS and ENTERPRISE customers only).

One of the following:

"WNAM"

"ENAM"

"WEU"

"EEU"

"NSAM"

"SSAM"

"OC"

"ME"

"NAF"

"SAF"

"IN"

"SEAS"

"NEAS"

"ALL\_REGIONS"

Healthcheck { id, address, check\_regions, 15 more } 

id?: string

Identifier

maxLength32

address?: string

The hostname or IP address of the origin server to run health checks on.

check\_regions?: Array<[CheckRegion](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20check%5Fregion%20%3E%20%28schema%29)\> | null

A list of regions from which to run health checks. Null means Cloudflare will pick a default region.

One of the following:

"WNAM"

"ENAM"

"WEU"

"EEU"

"NSAM"

"SSAM"

"OC"

"ME"

"NAF"

"SAF"

"IN"

"SEAS"

"NEAS"

"ALL\_REGIONS"

consecutive\_fails?: number

The number of consecutive fails required from a health check before changing the health to unhealthy.

consecutive\_successes?: number

The number of consecutive successes required from a health check before changing the health to healthy.

created\_on?: string

formatdate-time

description?: string

A human-readable description of the health check.

failure\_reason?: string

The current failure reason if status is unhealthy.

http\_config?: [HTTPConfiguration](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20http%5Fconfiguration%20%3E%20%28schema%29) { allow\_insecure, expected\_body, expected\_codes, 5 more } | null

Parameters specific to an HTTP or HTTPS health check.

interval?: number

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.

modified\_on?: string

formatdate-time

name?: string

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

retries?: number

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.

status?: "unknown" | "healthy" | "unhealthy" | "suspended"

The current status of the origin server according to the health check.

One of the following:

"unknown"

"healthy"

"unhealthy"

"suspended"

suspended?: boolean

If suspended, no health checks are sent to the origin.

tcp\_config?: [TCPConfiguration](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20tcp%5Fconfiguration%20%3E%20%28schema%29) { method, port } | null

Parameters specific to TCP health check.

timeout?: number

The timeout (in seconds) before marking the health check as failed.

type?: string

The protocol to use for the health check. Currently supported protocols are ‘HTTP’, ‘HTTPS’ and ‘TCP’.

HTTPConfiguration { allow\_insecure, expected\_body, expected\_codes, 5 more } 

Parameters specific to an HTTP or HTTPS health check.

allow\_insecure?: boolean

Do not validate the certificate when the health check uses HTTPS.

expected\_body?: string

A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.

expected\_codes?: Array<string\> | null

The expected HTTP response codes (e.g. “200”) or code ranges (e.g. “2xx” for all codes starting with 2) of the health check.

follow\_redirects?: boolean

Follow redirects if the origin returns a 3xx status code.

header?: Record<string, Array<string\>\> | null

The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden.

method?: "GET" | "HEAD"

The HTTP method to use for the health check.

One of the following:

"GET"

"HEAD"

path?: string

The endpoint path to health check against.

port?: number

Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.

QueryHealthcheck { address, name, check\_regions, 10 more } 

address: string

The hostname or IP address of the origin server to run health checks on.

name: string

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

check\_regions?: Array<[CheckRegion](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20check%5Fregion%20%3E%20%28schema%29)\> | null

A list of regions from which to run health checks. Null means Cloudflare will pick a default region.

One of the following:

"WNAM"

"ENAM"

"WEU"

"EEU"

"NSAM"

"SSAM"

"OC"

"ME"

"NAF"

"SAF"

"IN"

"SEAS"

"NEAS"

"ALL\_REGIONS"

consecutive\_fails?: number

The number of consecutive fails required from a health check before changing the health to unhealthy.

consecutive\_successes?: number

The number of consecutive successes required from a health check before changing the health to healthy.

description?: string

A human-readable description of the health check.

http\_config?: [HTTPConfiguration](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20http%5Fconfiguration%20%3E%20%28schema%29) { allow\_insecure, expected\_body, expected\_codes, 5 more } | null

Parameters specific to an HTTP or HTTPS health check.

interval?: number

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.

retries?: number

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.

suspended?: boolean

If suspended, no health checks are sent to the origin.

tcp\_config?: [TCPConfiguration](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20tcp%5Fconfiguration%20%3E%20%28schema%29) { method, port } | null

Parameters specific to TCP health check.

timeout?: number

The timeout (in seconds) before marking the health check as failed.

type?: string

The protocol to use for the health check. Currently supported protocols are ‘HTTP’, ‘HTTPS’ and ‘TCP’.

TCPConfiguration { method, port } 

Parameters specific to TCP health check.

method?: "connection\_established"

The TCP connection method to use for the health check.

port?: number

Port number to connect to for the health check. Defaults to 80.

HealthcheckDeleteResponse { id } 

id?: string

Identifier

maxLength32

#### HealthchecksPreviews

##### [Health Check Preview Details](https://developers.cloudflare.com/api/typescript/resources/healthchecks/subresources/previews/methods/get)

client.healthchecks.previews.get(stringhealthcheckID, PreviewGetParams { zone\_id } params, RequestOptionsoptions?): [Healthcheck](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20healthcheck%20%3E%20%28schema%29) { id, address, check\_regions, 15 more } 

GET/zones/{zone\_id}/healthchecks/preview/{healthcheck\_id}

##### [Create Preview Health Check](https://developers.cloudflare.com/api/typescript/resources/healthchecks/subresources/previews/methods/create)

client.healthchecks.previews.create(PreviewCreateParams { zone\_id, address, name, 11 more } params, RequestOptionsoptions?): [Healthcheck](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks%20%3E%20%28model%29%20healthcheck%20%3E%20%28schema%29) { id, address, check\_regions, 15 more } 

POST/zones/{zone\_id}/healthchecks/preview

##### [Delete Preview Health Check](https://developers.cloudflare.com/api/typescript/resources/healthchecks/subresources/previews/methods/delete)

client.healthchecks.previews.delete(stringhealthcheckID, PreviewDeleteParams { zone\_id } params, RequestOptionsoptions?): [PreviewDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/healthchecks#%28resource%29%20healthchecks.previews%20%3E%20%28model%29%20preview%5Fdelete%5Fresponse%20%3E%20%28schema%29) { id } 

DELETE/zones/{zone\_id}/healthchecks/preview/{healthcheck\_id}

##### ModelsExpand Collapse 

PreviewDeleteResponse { id } 

id?: string

Identifier

maxLength32