---
title: "Create health check"
method: POST
path: "/api/v1/healthcheck"
tags: ["Health Checks"]
---

# Create health check

`POST /api/v1/healthcheck`

## Request

- Base URL: `http://:8080`
- URL: `http://:8080/api/v1/healthcheck`
- Auth: none declared

Create health check.

Auth: Required (bearer token).
Scope: Organization-scoped in authenticated context.
Side effects: May mutate server state.

## Headers

- `Accept` string

## Request body `*/*`

- CreateHealthCheckRequest: CreateHealthCheckRequest schema
  - `application_id` string, uuid, required: ID of the application to monitor
  - `body` string, nullable: Request body to send with health check requests
  - `endpoint` string: Health check endpoint path or URL. Defaults to /
  - `expected_status_codes` integer[], nullable: Expected HTTP status codes. Defaults to [200]
  - `failure_threshold` integer, nullable: Consecutive failures before marking unhealthy (1-10). Defaults to 3
  - `headers` object, nullable: Custom HTTP headers to include in health check requests
  - `interval_seconds` integer, nullable: Check interval in seconds (30-3600). Defaults to 60
  - `method` string: HTTP method to use. Must be GET, POST, or HEAD. Defaults to GET
  - `retention_days` integer, nullable: Number of days to retain health check results (1-365). Defaults to 30
  - `success_threshold` integer, nullable: Consecutive successes before marking healthy (1-10). Defaults to 1
  - `timeout_seconds` integer, nullable: Request timeout in seconds (5-120). Defaults to 30

## Response `201`

Created

- HealthCheckResponse: HealthCheckResponse schema
  - `message` string
  - `status` string

## Other responses

- `400`: Bad Request _(validation or deserialization error)_
- `500`: Internal Server Error _(panics)_
- `default`

## Changes

- **2026-04-26** `09f18af670c4`: 1 breaking, 10 warning, 3 info
  - removed the success response with the status `200`
  - the `failure_threshold` request property's max was set to `10.00`
  - the `interval_seconds` request property's max was set to `3600.00`
  - the `retention_days` request property's max was set to `365.00`
  - …10 more
- **2026-04-02** `2beb810c5221`: 24 warning, 13 info
  - removed the optional property `detail` from the response with the `400` status (media type: application/json)
  - removed the optional property `detail` from the response with the `400` status (media type: application/xml)
  - removed the optional property `detail` from the response with the `500` status (media type: application/json)
  - removed the optional property `detail` from the response with the `500` status (media type: application/xml)
  - …33 more
- **2026-03-26** `e34b00e45318`: 8 breaking, 4 warning, 25 info
  - removed the required property `code` from the response with the `400` status (media type: application/json)
  - removed the required property `code` from the response with the `400` status (media type: application/xml)
  - removed the required property `code` from the response with the `500` status (media type: application/json)
  - removed the required property `code` from the response with the `500` status (media type: application/xml)
  - …33 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/nixopus/apis/nixopus-api/changes/api/v1/healthcheck/post.md)

---

[API](https://skmtc.dev/nixopus/apis/nixopus-api.md) - [All operations](https://skmtc.dev/nixopus/apis/nixopus-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nixopus/apis/nixopus-api/revisions/c5bacaea7239?raw)
