---
title: "Test alert destination"
method: POST
path: "/api/{org_id}/alerts/destinations/test"
tags: ["Alerts"]
---

# Test alert destination

`POST /api/{org_id}/alerts/destinations/test`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/alerts/destinations/test`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/alerts/destinations/test/post.ts> (a function with typed inputs; its response is checked against the schema)

Tests an alert destination configuration. For HTTP destinations, sends a test HTTP request to the specified endpoint. For email destinations, validates SMTP configuration and recipient permissions, then sends a test email. This allows users to verify that their destination configuration is correct before saving it.

## Path parameters

- `org_id` string, required

## Request body

- object
  - `body` string, nullable
  - `headers` object, nullable
  - `method` string, nullable
  - `recipients` string[], nullable: Email recipients for email destination testing
  - `skipTlsVerify` boolean, nullable
  - `slackApp` SlackAppFields: `SlackAppTarget` with every field optional, so an omitted one takes the type's default.
    - `auto_investigate` 'off' | 'critical'
    - `buttons` boolean, nullable: Acknowledge, Mute and Investigate on each message; default true.
    - `channel_id` string, nullable
    - `channel_name` string, nullable
    - `installation_id` string, nullable
    - `mention` union: Who a repeat or a level-up mentions; `Default` is `@here` for critical and nobody otherwise.
      - 'default'
      - 'here'
      - 'channel'
      - 'none'
      - object
        - `subteam` object, required
          - `handle` string, required
          - `subteam_id` string, required
    - `oncall_room_confirmed` boolean, nullable: Required true when an on-call team pages into this channel through a Slack webhook.
    - `previous_webhook` object, nullable: The webhook a switch replaced, kept so it can be switched back; never sent to.
    - `refire_reuse_minutes` integer, nullable: 0 to 240; default 30.
    - `shared_channel_confirmed` boolean, nullable: Required true when the channel is shared with another company.
  - `template` string, nullable: Template a `slack_app` test renders on a sample alert; the org default when absent.
  - `type` 'http' | 'email' | 'sns' | 'slack_app'
  - `url` string

## Response `200`

Success

- object
  - `error` string, nullable
  - `responseBody` string, nullable
  - `statusCode` integer, nullable
  - `success` boolean, required

## Other responses

- `400`: Error

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
