# POST /api/v1/businesses/slack/{webhook_id}/test

> Test Slack webhook

- **Tag:** businesses
- **Operation ID:** `test_business_slack_webhook_api_v1_businesses_slack__webhook_id__test_post`

## Description

Send a test message to the business's configured Slack webhook.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `webhook_id` (path, string, required)

## Responses

### 201 — Successful Response

Schema: `SlackTestSendResult`

- `status` (string · required) — "ok" on success
- `message` (string · required) — Human-readable status message

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X POST 'https://api.ondayzero.com/api/v1/businesses/slack/{webhook_id}/test' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/businesses/slack/{webhook_id}/test', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.post("https://api.ondayzero.com/api/v1/businesses/slack/{webhook_id}/test", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/businesses/test-business-slack-webhook
- OpenAPI slice: https://www.ondayzero.com/docs/reference/businesses/test-business-slack-webhook/openapi.json
- Other endpoints in **businesses**: https://www.ondayzero.com/docs/reference/businesses
