Skip to main content
POST
Create a Slack alert trigger

Authorizations

X-Auth-Token
string
header
required

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Body

application/json
name
string
required

How the trigger is listed in the app

alert_type
enum<string>
required
Available options:
CRITICAL,
WARNING,
INFO
slack_webhook
string<uri>

Incoming webhook URL the alert is posted to. It is stored as a Slack connection this project can use (an existing one holding the same URL, else a new project connection). Send this or slack_connection_id, not both.

slack_connection_id
string

The Slack connection the alert posts through: an organization connection or one of this project's, as GET /api/slack-connections and langwatch slack-connection list list them. Send this or slack_webhook, not both.

Minimum string length: 1
slack_channel_id
string

The channel a bot connection posts in; required with one. Invite the LangWatch app to it first.

Minimum string length: 1
message
string

Extra line included with each alert

filters
object

Which traces the trigger fires on. An empty object fires on all of them.

Response

Success

message
string
required
Last modified on October 12, 2026