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.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
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": "string", "account": { "_id": "string", "platform": "string", "username": "string", "displayName": "string", "profilePicture": "string", "channelId": "string", "channelName": "string", "channelType": "string", "guildId": "string", "webhookUsername": "string", "webhookAvatarUrl": "string" }}Get Discord account settings
Returns the current Discord account settings including webhook identity (display name and avatar), connected channel, and guild information.
List Discord guild channels
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.