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

# Integrations API

> Manage integrations and credentials.

# Integrations

All routes require auth (better-auth session cookie or API key with the
`integrations:*` scope).

| Method   | Path                                                         | Purpose                                                                                                                                                                              |
| -------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `GET`    | `/v1/integrations`                                           | List provider catalog + installed integrations                                                                                                                                       |
| `POST`   | `/v1/integrations/whatsapp/connect/manual`                   | Connect WhatsApp with manual fields                                                                                                                                                  |
| `POST`   | `/v1/integrations/whatsapp/connect/embedded-signup-callback` | Meta Embedded Signup callback                                                                                                                                                        |
| `GET`    | `/v1/integrations/slack/install`                             | Get Slack install URL                                                                                                                                                                |
| `GET`    | `/v1/integrations/slack/oauth-callback`                      | Slack OAuth v2 callback (`?code=…&state=…`). On success the API 302s back to `${WEB_ORIGIN}/integrations?slack=connected`; on failure the redirect carries `?slack_error=…` instead. |
| `POST`   | `/v1/integrations/mcp/connect`                               | Connect a custom MCP server (URL + auth).                                                                                                                                            |
| `GET`    | `/v1/integrations/channels`                                  | List inbound channels (e.g. WhatsApp numbers) for the active org                                                                                                                     |
| `PATCH`  | `/v1/integrations/channels/:id/default-agent`                | Set or clear the default agent for an inbound channel                                                                                                                                |
| `GET`    | `/v1/agents/:agentId/integrations`                           | List integrations attached to an agent                                                                                                                                               |
| `POST`   | `/v1/agents/:agentId/integrations`                           | Attach an integration to an agent (or update its `enabledTools`)                                                                                                                     |
| `DELETE` | `/v1/agents/:agentId/integrations/:integrationId`            | Detach an integration from an agent                                                                                                                                                  |

## Webhooks

| Path                                | Provider       | Signature                         |
| ----------------------------------- | -------------- | --------------------------------- |
| `/v1/integrations/webhook/whatsapp` | WhatsApp       | `X-Hub-Signature-256` HMAC-SHA256 |
| `/v1/integrations/webhook/slack`    | Slack (future) | `X-Slack-Signature` HMAC-SHA256   |

All webhooks are idempotent on `provider_id + external_event_id` and
return 200 within 5s.
