# Connect a Slack channel

Connects a Slack channel.

```http
POST https://api.pozy.ai/v1/connect/slack
```

- Area: Accounts & connections / Connect
- Auth: Authorization: Bearer pz_live_...

## Request body

Content type: `application/json`

- `profileId`, string, required
- `channelId`, string
- `channelIds`, array of string: At least 1 item. Up to 25 items
- `redirect_url`, string
- `pendingDataToken`, string
- `accountId`, string

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/connect/slack" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "profileId": "6a0b6573846efc28aaa9a3ff"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/connect/slack", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    profileId: "6a0b6573846efc28aaa9a3ff"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/connect/slack",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "profileId": "6a0b6573846efc28aaa9a3ff",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200
