# Health-check a bring-your-own provider

POST /v1/byo-providers/{id}/test: Health-check a bring-your-own provider

```http
POST /v1/byo-providers/{id}/test
```

|  |  |
|---|---|
| Operation id | `testByoProvider` |
| Key scope | `admin`: admin keys only |
| Section | [BYO providers](https://docs.kaab.ist/reference/api#byo-providers) |

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | pattern `^byo_[0-9a-hjkmnp-tv-z]{26}$` |

## Example request

```bash
curl -X POST "https://api.kaab.ist/v1/byo-providers/{id}/test" \
  -H "Authorization: Bearer $KAAB_API_KEY"
```

## Responses

### 200

Test result

| Field | Type | Required | Description |
|---|---|---|---|
| `ok` | boolean | yes |  |
| `latency_ms` | integer or null | yes | ≥ 0 |
| `detail` | string | yes |  |
| `egress_ip` | string |  |  |

## Errors

Every error answers with the [error envelope](https://docs.kaab.ist/reference/api/schemas/error-response); its `code` is one of the [error codes](https://docs.kaab.ist/reference/codes#errors).

| Status | When |
|---|---|
| 400 | `request_invalid`: request validation failed |
| 401 | Missing or invalid API key |
| 402 | `insufficient_credits`: top up to continue |
| 403 | The key's scope does not cover this operation |
| 404 | Resource not found |
| 409 | Conflicting state (see `error.code`) |
| 422 | Semantically invalid request (see `error.code`) |
| 429 | Rate limited; see `Retry-After` |
| 500 | `internal`: unexpected server error |
