---
title: "Test existing notification channel."
method: POST
path: "/api/v1/actions/notificationChannels/{notificationChannelId}/test"
tags: ["Notification Channels"]
---

# Test existing notification channel.

`POST /api/v1/actions/notificationChannels/{notificationChannelId}/test`

## Request

- Base URL: `https://www.gooddata.ai`
- URL: `https://www.gooddata.ai/api/v1/actions/notificationChannels/{notificationChannelId}/test`
- Auth: none declared

Tests the existing notification channel by sending a test notification.

## Path parameters

- `notificationChannelId` string, required

## Request body

- TestDestinationRequest: Request body with notification channel destination to test.
  - `destination` union, required
    - object: Webhook destination for notifications. The property url is required on create and update.
      - `hasSecretKey` boolean, nullable: Flag indicating if webhook has a hmac secret key.
      - `hasToken` boolean, nullable: Flag indicating if webhook has a token.
      - `secretKey` string, nullable: Hmac secret key for the webhook signature.
      - `token` string, nullable: Bearer token for the webhook.
      - `type` 'WEBHOOK', required: The destination type.
      - `url` string: The webhook URL.
    - object: Custom SMTP destination for notifications. The properties host, port, username, and password are required on create and update
      - `fromEmail` string, email: E-mail address to send notifications from.
      - `fromEmailName` string: An optional e-mail name to send notifications from.
      - `host` string: The SMTP server address.
      - `password` string: The SMTP server password.
      - `port` 25 | 465 | 587 | 2525: The SMTP server port.
      - `type` 'SMTP', required: The destination type.
      - `username` string: The SMTP server username.
    - object: Default SMTP destination for notifications.
      - `fromEmail` string, email: E-mail address to send notifications from. Currently this does not have any effect. E-mail 'no-reply@gooddata.com' is used instead.
      - `fromEmailName` string: An optional e-mail name to send notifications from. Currently this does not have any effect. E-mail from name 'GoodData' is used instead.
      - `type` 'DEFAULT_SMTP', required: The destination type.
    - object: In-platform destination for notifications.
      - `type` 'IN_PLATFORM', required: The destination type.
  - `externalRecipients` AutomationExternalRecipient[], nullable: External recipients of the test result.
    - `email` string, email, required: E-mail address to send notifications from.

## Response `200`

The result of the test of a notification channel connection.

- TestResponse: Response from notification channel testing.
  - `error` string: Field containing more details in case of a failure. Details are available to a privileged user only.
  - `queryDurationMillis` TestQueryDuration: A structure containing duration of the test queries run on a data source. It is omitted if an error happens.
    - `createCacheTable` integer: Field containing duration of a test 'create table as select' query on a datasource. In milliseconds. The field is omitted if a data source doesn't support caching.
    - `simpleSelect` integer, required: Field containing duration of a test select query on a data source. In milliseconds.
  - `successful` boolean, required: A flag indicating whether test passed or not.

---

[API](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/revisions/c728ef303bfb?raw)
