# Check the token and send a test notification to the phone.

> Waits for Notify (up to 10 seconds a call).
> https://koi.dog/docs/api/notifications/test-notification-channel/

`POST /api/v1/notifications/channels/{id}/test` · Scope: `config`

A success marks the channel active; a failure marks it failing with the reason.

## Path parameters.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | The notification channel's id. |

## Headers.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | `string` | no | Retry the same request with the same key. [Retry rules](https://koi.dog/docs/api/#retries). |

## Response.

200 OK · JSON object

## Request.

```sh
curl -X POST "https://api.koi.dog/api/v1/notifications/channels/$ID/test" \
    -H "Authorization: Bearer $KOIDOG_API_KEY" \
    -H "Idempotency-Key: $(uuidgen)"
```

```js
const res = await fetch(`https://api.koi.dog/api/v1/notifications/channels/${process.env.ID}/test`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(await res.json());
```

```python
import os
import uuid

import requests

r = requests.post(
    f"https://api.koi.dog/api/v1/notifications/channels/{os.environ['ID']}/test",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "ok": false,
  "scopes": [],
  "missingScopes": [],
  "notificationId": "string",
  "error": "string",
  "channel": {
    "id": "string",
    "kind": "notify",
    "name": "string",
    "send": [],
    "digestMinutes": 0,
    "maxPerHour": 0,
    …
  },
  …
}
```
