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

# Discord

Kavenio publishes to Discord through a connected bot and channel webhook. Use
`discord` as the platform value in post payloads.

## Quick Reference

| Capability           | Support                                  |
| -------------------- | ---------------------------------------- |
| Platform key         | `discord`                                |
| Connect              | Discord bot install flow                 |
| Text post            | Supported                                |
| Image post           | Supported                                |
| Video post           | Supported                                |
| Document attachment  | Supported                                |
| Webhook identity     | Configurable per connected account       |
| Native edit/delete   | Supported for Kavenio-published messages |
| Direct messages      | Supported for users reachable by the bot |
| Roles and members    | Supported                                |
| Pins                 | Supported                                |
| Scheduled events     | Supported                                |
| Analytics            | Not supported                            |
| Inbox/Gateway events | Not supported                            |

## Connect

Start a Discord connect flow through the shared connect API:

```http theme={null}
POST /v1/connect/begin
```

Select `discord` as the provider. Discord accounts are connected through a bot
install flow. Kavenio stores bot and webhook credentials encrypted and never
returns provider secrets in API responses.

After connect, select a postable channel:

```http theme={null}
GET /v1/accounts/{accountId}/discord-channels
PATCH /v1/accounts/{accountId}/discord-settings
```

Channel selection creates or rotates the account webhook for that channel.

## Create A Post

Create Discord posts through the shared posts API:

```json theme={null}
{
  "profileId": "customer_user_123",
  "content": "Shipping a product update today.",
  "platforms": [
    {
      "platform": "discord",
      "accountId": "acc_123"
    }
  ],
  "publishNow": true
}
```

```bash theme={null}
kavenio posts create \
  --profile-id customer_user_123 \
  --content "Shipping a product update today." \
  --publish-now \
  --platform discord:acc_123
```

## Settings

Discord account settings include the selected guild, selected channel, and
webhook display identity:

```http theme={null}
GET /v1/accounts/{accountId}/discord-settings
PATCH /v1/accounts/{accountId}/discord-settings
```

Use `webhookUsername` and `webhookAvatarUrl` to customize the webhook identity.
Use `channelId` to switch the posting channel.

## Direct Messages

Send a direct message through the connected bot:

```http theme={null}
POST /v1/discord/dms
```

```json theme={null}
{
  "accountId": "acc_123",
  "userId": "123456789012345678",
  "content": "Your support request was updated."
}
```

The user must be reachable by the bot under Discord provider rules.

## Roles And Members

Discord role and member management is guild scoped:

```http theme={null}
GET /v1/discord/guilds/{guildId}/roles
GET /v1/discord/guilds/{guildId}/members
PUT /v1/discord/guilds/{guildId}/members/{userId}/roles/{roleId}
DELETE /v1/discord/guilds/{guildId}/members/{userId}/roles/{roleId}
```

Kavenio rejects attempts to mutate the `@everyone` role.

## Pins

Pin management is channel scoped:

```http theme={null}
GET /v1/discord/channels/{channelId}/pins
PUT /v1/discord/channels/{channelId}/pins/{messageId}
DELETE /v1/discord/channels/{channelId}/pins/{messageId}
```

The channel must belong to the connected Discord account's guild. Discord's
50-pin cap is surfaced as a validation error with provider details.

## Scheduled Events

Scheduled event management is guild scoped:

```http theme={null}
POST /v1/discord/guilds/{guildId}/events
GET /v1/discord/guilds/{guildId}/events
GET /v1/discord/guilds/{guildId}/events/{eventId}
PATCH /v1/discord/guilds/{guildId}/events/{eventId}
DELETE /v1/discord/guilds/{guildId}/events/{eventId}
```

Create payloads support `external`, `voice`, and `stage_instance` events. Use
`status: "cancelled"` with `PATCH` to cancel an event. Use `DELETE` only for
hard deletion.

## Health

Run account health after setup or when publishing fails:

```http theme={null}
POST /v1/accounts/{accountId}/health
```

Discord health checks verify the selected channel is still postable, refresh
readiness metadata, and surface missing setup or permission drift. Kavenio does
not use Discord Gateway behavior for publish, DM, role, pin, event, or health
operations.
