> ## Documentation Index
> Fetch the complete documentation index at: https://tavryn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up Slack and Discord Alerts in Tavryn Dashboard

> Connect Slack or Discord to get real-time Tavryn alerts for renewal deadlines, approval requests, on-chain payment confirmations, and low-balance warnings.

Tavryn keeps your procurement supervisors informed at every stage of the autonomous agent loop. Rather than requiring you to stay logged in to the dashboard, Tavryn pushes notifications directly to Slack, Discord, or any custom HTTP endpoint the moment something needs your attention — whether that's a detected waste opportunity, a deal that needs your one-tap approval, a confirmed on-chain payment, or a treasury balance that is running low.

## What Tavryn Notifies You About

Tavryn organizes notifications into five categories:

| Category | Examples |
| - | - |
| **Renewal** | Contract entering 45-day window; seat waste detected; usage decline identified |
| **Negotiation** | Negotiation started; concession round completed; deal proposed by agent |
| **Policy** | Approval required (HMAC 1-tap link issued); supervisor override recorded |
| **Treasury** | Payment escrow funded; on-chain payment confirmed; low USDC balance (\< 100 USDC) |
| **Audit** | Reviewer issued `CHALLENGE` or `REJECT` verdict; audit chain integrity verified |

> [!NOTE]
>
> When your USDC treasury balance drops below **100 USDC**, Tavryn sends an immediate notification with a direct link to [faucet.circle.com](https://faucet.circle.com) so you can top up before the next scheduled settlement. This alert fires for each business wallet independently.

## Slack Integration

**1. Create a Slack app and Incoming Webhook**

Go to [api.slack.com/apps](https://api.slack.com/apps) and click **Create New App → From scratch**. Name your app (e.g., "Tavryn Alerts"), select your workspace, and click **Create App**.

Under **Features**, select **Incoming Webhooks** and toggle **Activate Incoming Webhooks** to on. Click **Add New Webhook to Workspace**, choose the channel where you want Tavryn notifications to appear, and click **Allow**.

Copy the generated webhook URL — it will look like this:

```
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
```

**2. Add the URL to Tavryn**

In Tavryn, go to **Settings → Notification Webhook**. Paste the Slack webhook URL and click **Test Webhook**. You should see a test message appear in your Slack channel within a few seconds. Click **Save Settings**.

**Example Slack notification for a pending approval:**

```text theme={null}
*Approval Required: Datadog renewal — $42,000/yr*
Tavryn negotiated a 17% reduction from $50,600. Review the deal and approve or reject.
View: https://app.tavryn.com/approve/eyJ...
```

## Discord Integration

**1. Create a Discord webhook**

In Discord, open the server where you want Tavryn notifications to appear. Go to **Server Settings → Integrations → Webhooks** and click **New Webhook**. Give it a name (e.g., "Tavryn"), select the target channel, and click **Copy Webhook URL**.

The URL will look like this:

```
https://discord.com/api/webhooks/1234567890123456789/XXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

**2. Add the URL to Tavryn**

In Tavryn, go to **Settings → Notification Webhook**. Paste the Discord webhook URL and click **Test Webhook**. Confirm the test message arrives in your Discord channel, then click **Save Settings**.

**Example Discord notification for a completed payment:**

```text theme={null}
**Payment Settled: AWS Cost Optimization — $8,400 saved**
Tavryn released $31,600 to AWS after verifying delivery. Protocol fee collected. Escrow closed.
View: https://app.tavryn.com/dashboard
```

## Custom HTTP Endpoint

Connect any service that accepts a `POST` request with a JSON body. Tavryn sends a rich payload that includes both a `text` field (Slack-compatible) and a `content` field (Discord-compatible) alongside structured fields for downstream parsing.

**Example payload posted to a custom endpoint:**

```json theme={null}
{
  "title": "Waste Detected: Zoom — 47 idle seats",
  "message": "47 of 120 provisioned Zoom seats have had zero activity in 60 days. Estimated annual waste: $14,100. Tavryn has begun evaluating renewal options.",
  "content": "**Waste Detected: Zoom — 47 idle seats**\n47 of 120 provisioned Zoom seats have had zero activity in 60 days. Estimated annual waste: $14,100.",
  "text": "*Waste Detected: Zoom — 47 idle seats*\n47 of 120 provisioned Zoom seats have had zero activity in 60 days.",
  "link": "https://app.tavryn.com/dashboard"
}
```

Your endpoint must respond with an HTTP `2xx` status code within the configured timeout window. Non-2xx responses are logged as warnings and do not interrupt the agent loop.

> [!TIP]
>
> If you manage multiple organizations in Tavryn, you can configure a **different webhook URL per business**. Each business's notifications route exclusively to its own configured endpoint, so your team's Slack workspace does not receive alerts for clients or subsidiaries managed under separate business profiles.

## Managing Notification Read State

Tavryn stores all notifications in-app so nothing is lost if your webhook is temporarily unavailable. Use the Notifications panel in the dashboard to mark individual notifications as read or clear all at once.

**Mark a single notification as read:**

```bash theme={null}
POST /api/notifications
Content-Type: application/json

{
  "id": "notification-uuid"
}
```

**Mark all notifications as read for a business:**

```bash theme={null}
POST /api/notifications
Content-Type: application/json

{
  "all": true,
  "businessId": "business-uuid"
}
```

**Fetch unread notifications:**

```bash theme={null}
GET /api/notifications?businessId=<uuid>&limit=40
```

The response includes a `notifications` array and an `unreadCount` for badge display:

```json theme={null}
{
  "success": true,
  "data": {
    "notifications": [],
    "unreadCount": 3
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.