Update Discord settings
Update Discord account settings. Supports two operations (can be combined):
-
Webhook identity - Set the default display name and avatar that appear as the message author on every post. These are account-level defaults; individual posts can override them via platformSpecificData.webhookUsername / webhookAvatarUrl.
-
Switch channel - Move the connection to a different channel in the same guild. A new webhook is automatically created in the target channel.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Custom display name for the webhook (1-80 chars). Empty string resets to default ("Zernio"). Cannot contain "clyde" or "discord".
Custom avatar URL. Empty string resets to default bot avatar.
Switch to a different channel in the same guild. Must be a text (0), announcement (5), or forum (15) channel.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.discord.updateDiscordSettings({ path: { accountId: 'account_abc123', }, body: { webhookUsername: 'Example', webhookAvatarUrl: 'https://example.com', channelId: 'channel_abc123', },});console.log(data);{
"message": "Discord settings updated",
"account": {
"_id": "string",
"platform": "string",
"username": "string",
"displayName": "string",
"profilePicture": "string",
"channelId": "string",
"channelName": "string",
"channelType": "string",
"guildId": "string",
"webhookUsername": "string",
"webhookAvatarUrl": "string"
}
}{
"error": "Unauthorized"
}Get Discord account settings GET
Returns the current Discord account settings including webhook identity (display name and avatar), connected channel, and guild information.
List Discord guild channels GET
Returns the text, announcement, and forum channels in the connected Discord guild. Use this to discover available channels when switching the connected channel via PATCH /v1/accounts/{accountId}/discord-settings.