# Send a test notification

`POST /v1/channels/{channel_id}/test`

Requires role admin or higher.

Sends a test message to the channel and waits for the outcome (up to 15 s).

## Authentication

A session token: `Authorization: Bearer <session token>`, or the session cookie in the browser. Requires role `admin` or higher.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `channel_id` | path | string | yes |  |

## Responses

### 200

The outcome of the test delivery.

`application/json`

```json
{
  "additionalProperties": false,
  "description": "The outcome of the test delivery.",
  "properties": {
    "delivered": {
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "description": "A delivery error such as timeout, address_rejected or http_status.",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "status_code": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "delivered",
    "status_code",
    "error"
  ],
  "type": "object"
}
```

### 401

unauthorized: no valid session, or the email is not verified.

Problem type: [unauthorized](https://docs.dlogify.com/errors/unauthorized.md).

### 403

channel-type-not-allowed: the plan does not include this channel type. csrf-origin-rejected: a cookie-authenticated change from an origin outside the web app. forbidden: the action requires the admin role.

Problem type: [channel-type-not-allowed](https://docs.dlogify.com/errors/channel-type-not-allowed.md).

### 404

not-found: the resource does not exist, or the caller is not a member of its organization.

Problem type: [not-found](https://docs.dlogify.com/errors/not-found.md).

### 422

validation-failed: the email channel's member is not verified.

Problem type: [validation-failed](https://docs.dlogify.com/errors/validation-failed.md).

### 429

channel-test-rate-limited: one test per channel per minute. rate-limited: per-user management request limit.

Problem type: [channel-test-rate-limited](https://docs.dlogify.com/errors/channel-test-rate-limited.md).

### 503

notifier-unavailable: the notification service is not available.

Problem type: [notifier-unavailable](https://docs.dlogify.com/errors/notifier-unavailable.md).

### 504

notifier-timeout: the notification service did not answer within 15 s.

Problem type: [notifier-timeout](https://docs.dlogify.com/errors/notifier-timeout.md).

## Example

```bash
curl -X POST "https://api.dlogify.com/v1/channels/{channel_id}/test" \
  -H "Authorization: Bearer $DLOGIFY_SESSION"
```

Source: https://docs.dlogify.com/api/channels/testChannel
