Health check
GET/v2/health
Check that the Askocto API is reachable and that your API key works, with a single request that needs no agent ID.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Returns the state of the API. Call it from a monitor, from a deploy script, or once after you create a key to confirm that the key and your network settings work. It does not read or change any data.
Request
GET /v2/health
The call has no path parameters, no query parameters and no body. It needs a valid API key in the Authorization header, so a 200 also tells you that the key is accepted. For how keys work, see Authentication.
Requests to this endpoint count against your rate limit like any other, so check once a minute rather than in a tight loop.
Example request
curl https://api.askocto.co/v2/health \
-H "Authorization: Bearer $OCTO_API_KEY"
const response = await fetch("https://api.askocto.co/v2/health", {
headers: { Authorization: `Bearer ${process.env.OCTO_API_KEY}` },
})
if (!response.ok) {
throw new Error(`Askocto API is not healthy: ${response.status}`)
}
const health = await response.json()
console.log(health.status, health.version)
Example response
A successful call returns 200 OK.
{
"status": "ok",
"version": "v2",
"time": "2026-03-20T14:05:00Z"
}
Response fields
| Name | Type | Description |
|---|---|---|
status |
string | ok when the API is working as expected. |
version |
string | The API version that answered, here v2. |
time |
string | The server time as an ISO 8601 UTC time. Useful to spot a clock that is far off. |
If your monitor gets an error instead of this body, read the error.code and error.requestId from the response and see Error handling for retry guidance.
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized |
The API key is missing, malformed or deleted. |
| 429 | rate_limited |
Too many requests. Wait for the number of seconds in the Retry-After header. |
| 500 | server_error |
The API could not complete the check. Retry with backoff and quote the requestId if it persists. |