---
title: Create Health Check
---

[Skip to content](#_top)

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

[Healthchecks](https://developers.cloudflare.com/api/python/resources/healthchecks)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Create Health Check

healthchecks.create(HealthcheckCreateParams\*\*kwargs) -> [Healthcheck](<https://developers.cloudflare.com/api/python/resources/healthchecks#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)>)

POST/zones/{zone\_id}/healthchecks

Create a new health check.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Health Checks Write`

##### ParametersExpand Collapse

zone\_id: str

Identifier

maxLength32

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20zone_id%20%3E%20(schema)>)

address: str

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

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20address%20%3E%20(schema)>)

name: str

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

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20name%20%3E%20(schema)>)

<details>

<summary>

check\_regions: Optional\[List\[<a href="https://developers.cloudflare.com/api/python/resources/healthchecks#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)">CheckRegion</a>]]

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

</summary>

One of the following:

"WNAM"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"ENAM"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

"WEU"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

"EEU"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%203">Link to this property</a>

"NSAM"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%204">Link to this property</a>

"SSAM"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%205">Link to this property</a>

"OC"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%206">Link to this property</a>

"ME"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%207">Link to this property</a>

"NAF"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%208">Link to this property</a>

"SAF"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%209">Link to this property</a>

"IN"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%2010">Link to this property</a>

"SEAS"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%2011">Link to this property</a>

"NEAS"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%2012">Link to this property</a>

"ALL\_REGIONS"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%2013">Link to this property</a>

</details>

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20check_regions%20%3E%20(schema)>)

consecutive\_fails: Optional\[int]

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

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20consecutive_fails%20%3E%20(schema)>)

consecutive\_successes: Optional\[int]

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

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20consecutive_successes%20%3E%20(schema)>)

description: Optional\[str]

A human-readable description of the health check.

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20description%20%3E%20(schema)>)

<details>

<summary>

http\_config: Optional\[HTTPConfigurationParam]

Parameters specific to an HTTP or HTTPS health check.

</summary>

allow\_insecure: Optional\[bool]

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

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20allow_insecure">Link to this property</a>

expected\_body: Optional\[str]

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.

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20expected_body">Link to this property</a>

expected\_codes: Optional\[List\[str]]

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

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20expected_codes">Link to this property</a>

follow\_redirects: Optional\[bool]

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

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20follow_redirects">Link to this property</a>

header: Optional\[Dict\[str, List\[str]]]

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.

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20header">Link to this property</a>

<details>

<summary>

method: Optional\[Literal\["GET", "HEAD"]]

The HTTP method to use for the health check.

</summary>

One of the following:

"GET"

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%200">Link to this property</a>

"HEAD"

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20method">Link to this property</a>

path: Optional\[str]

The endpoint path to health check against.

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20path">Link to this property</a>

port: Optional\[int]

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

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20port">Link to this property</a>

</details>

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20http_config%20%3E%20(schema)>)

interval: Optional\[int]

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.

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20interval%20%3E%20(schema)>)

retries: Optional\[int]

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

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20retries%20%3E%20(schema)>)

suspended: Optional\[[bool](<https://developers.cloudflare.com/api/python/resources/healthchecks/methods/create#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20suspended%20%3E%20(schema)>)]

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

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20suspended%20%3E%20(schema)>)

<details>

<summary>

tcp\_config: Optional\[TCPConfigurationParam]

Parameters specific to TCP health check.

</summary>

method: Optional\[Literal\["connection\_established"]]

The TCP connection method to use for the health check.

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20tcp_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20tcp_configuration%20%3E%20(schema)%20%3E%20(property)%20method">Link to this property</a>

port: Optional\[int]

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

<a href="#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20tcp_config%20%3E%20(schema)%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20tcp_configuration%20%3E%20(schema)%20%3E%20(property)%20port">Link to this property</a>

</details>

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20tcp_config%20%3E%20(schema)>)

healthcheck\_timeout: Optional\[int]

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

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20timeout%20%3E%20(schema)>)

type: Optional\[str]

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

[Link to this property](<#(resource)%20healthchecks%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20type%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class Healthcheck: …

</summary>

id: Optional\[str]

Identifier

maxLength32

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

address: Optional\[str]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20address">Link to this property</a>

<details>

<summary>

check\_regions: Optional\[List\[<a href="https://developers.cloudflare.com/api/python/resources/healthchecks#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)">CheckRegion</a>]]

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

</summary>

One of the following:

"WNAM"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"ENAM"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

"WEU"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

"EEU"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%203">Link to this property</a>

"NSAM"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%204">Link to this property</a>

"SSAM"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%205">Link to this property</a>

"OC"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%206">Link to this property</a>

"ME"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%207">Link to this property</a>

"NAF"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%208">Link to this property</a>

"SAF"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%209">Link to this property</a>

"IN"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%2010">Link to this property</a>

"SEAS"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%2011">Link to this property</a>

"NEAS"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%2012">Link to this property</a>

"ALL\_REGIONS"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20check_region%20%3E%20(schema)%20%3E%20(member)%2013">Link to this property</a>

</details>

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20check_regions">Link to this property</a>

consecutive\_fails: Optional\[int]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20consecutive_fails">Link to this property</a>

consecutive\_successes: Optional\[int]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20consecutive_successes">Link to this property</a>

created\_on: Optional\[datetime]

formatdate-time

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

description: Optional\[str]

A human-readable description of the health check.

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

failure\_reason: Optional\[str]

The current failure reason if status is unhealthy.

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20failure_reason">Link to this property</a>

<details>

<summary>

http\_config: Optional\[HTTPConfiguration]

Parameters specific to an HTTP or HTTPS health check.

</summary>

allow\_insecure: Optional\[bool]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20allow_insecure">Link to this property</a>

expected\_body: Optional\[str]

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.

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20expected_body">Link to this property</a>

expected\_codes: Optional\[List\[str]]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20expected_codes">Link to this property</a>

follow\_redirects: Optional\[bool]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20follow_redirects">Link to this property</a>

header: Optional\[Dict\[str, List\[str]]]

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.

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20header">Link to this property</a>

<details>

<summary>

method: Optional\[Literal\["GET", "HEAD"]]

The HTTP method to use for the health check.

</summary>

One of the following:

"GET"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%200">Link to this property</a>

"HEAD"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20method">Link to this property</a>

path: Optional\[str]

The endpoint path to health check against.

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20path">Link to this property</a>

port: Optional\[int]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20http_configuration%20%3E%20(schema)%20%3E%20(property)%20port">Link to this property</a>

</details>

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20http_config">Link to this property</a>

interval: Optional\[int]

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.

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20interval">Link to this property</a>

modified\_on: Optional\[datetime]

formatdate-time

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

name: Optional\[str]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

retries: Optional\[int]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20retries">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["unknown", "healthy", "unhealthy", "suspended"]]

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

</summary>

One of the following:

"unknown"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"healthy"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"unhealthy"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

"suspended"

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

suspended: Optional\[bool]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20suspended">Link to this property</a>

<details>

<summary>

tcp\_config: Optional\[TCPConfiguration]

Parameters specific to TCP health check.

</summary>

method: Optional\[Literal\["connection\_established"]]

The TCP connection method to use for the health check.

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20tcp_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20tcp_configuration%20%3E%20(schema)%20%3E%20(property)%20method">Link to this property</a>

port: Optional\[int]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20tcp_config%20%2B%20(resource)%20healthchecks%20%3E%20(model)%20tcp_configuration%20%3E%20(schema)%20%3E%20(property)%20port">Link to this property</a>

</details>

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20tcp_config">Link to this property</a>

timeout: Optional\[int]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20timeout">Link to this property</a>

type: Optional\[str]

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

<a href="#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)%20%3E%20(property)%20type">Link to this property</a>

</details>

[Link to this property](<#(resource)%20healthchecks%20%3E%20(model)%20healthcheck%20%3E%20(schema)>)

### Create Health Check

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
healthcheck = client.healthchecks.create(
    zone_id="023e105f4ecef8ad9ca31a8372d0c353",
    address="www.example.com",
    name="server-1",
)
print(healthcheck.id)
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "address": "www.example.com",
    "check_regions": [
      "WEU",
      "ENAM"
    ],
    "consecutive_fails": 0,
    "consecutive_successes": 0,
    "created_on": "2014-01-01T05:20:00.12345Z",
    "description": "Health check for www.example.com",
    "failure_reason": "",
    "http_config": {
      "allow_insecure": true,
      "expected_body": "success",
      "expected_codes": [
        "2xx",
        "302"
      ],
      "follow_redirects": true,
      "header": {
        "Host": [
          "example.com"
        ],
        "X-App-ID": [
          "abc123"
        ]
      },
      "method": "GET",
      "path": "/health",
      "port": 0
    },
    "interval": 0,
    "modified_on": "2014-01-01T05:20:00.12345Z",
    "name": "server-1",
    "retries": 0,
    "status": "healthy",
    "suspended": true,
    "tcp_config": {
      "method": "connection_established",
      "port": 0
    },
    "timeout": 0,
    "type": "HTTPS"
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "address": "www.example.com",
    "check_regions": [
      "WEU",
      "ENAM"
    ],
    "consecutive_fails": 0,
    "consecutive_successes": 0,
    "created_on": "2014-01-01T05:20:00.12345Z",
    "description": "Health check for www.example.com",
    "failure_reason": "",
    "http_config": {
      "allow_insecure": true,
      "expected_body": "success",
      "expected_codes": [
        "2xx",
        "302"
      ],
      "follow_redirects": true,
      "header": {
        "Host": [
          "example.com"
        ],
        "X-App-ID": [
          "abc123"
        ]
      },
      "method": "GET",
      "path": "/health",
      "port": 0
    },
    "interval": 0,
    "modified_on": "2014-01-01T05:20:00.12345Z",
    "name": "server-1",
    "retries": 0,
    "status": "healthy",
    "suspended": true,
    "tcp_config": {
      "method": "connection_established",
      "port": 0
    },
    "timeout": 0,
    "type": "HTTPS"
  },
  "success": true
}
```