Zernio
Zernio
API Reference

Discord

Settings

Get Discord account settingsGETUpdate Discord settingsPATCHList Discord guild channelsGET

Messaging

Send a Discord Direct MessagePOSTList pinned messagesGETPin a Discord messagePUTUnpin a Discord messageDELETECreate a Discord public threadPOSTCrosspost Discord messagePOSTDelete a Discord channel messageDELETE

Roles & Members

List Discord guild rolesGETCreate a Discord guild rolePOSTEdit a Discord guild rolePATCHDelete a Discord guild roleDELETEList Discord guild membersGETSearch Discord guild membersGETGet a Discord guild memberGETAssign a role to a guild memberPUTRemove a role from a guild memberDELETE

Scheduled Events

List Discord scheduled eventsGETCreate a Discord scheduled eventPOSTGet a Discord scheduled eventGETUpdate a Discord scheduled eventPATCHDelete a Discord scheduled eventDELETE
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Discord

Create a Discord public thread

Creates a public thread in a channel. Pass messageId to start the thread from an existing message, or omit it to create a standalone thread.

Threads created here are always public. Requires the bot to hold Create Public Threads, which the Zernio bot requests at install time.


POST
/v1/discord/channels/{channelId}/threads

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

channelId*string

Discord channel snowflake ID

Query Parameters

accountId*string

SocialAccount _id of the Discord account bound to this channel's guild

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.createDiscordThread({  path: {    channelId: 'channel_abc123',  },  query: {    accountId: 'account_abc123',  },  body: {    name: 'Example',  },});console.log(data);
{  "data": {    "id": "1180000000000000000",    "name": "Release 2.4 discussion"  }}
Was this page helpful?

Unpin a Discord message

Unpin a message. Same MANAGE_MESSAGES permission requirement as pin. Idempotent: unpinning a non-pinned message is a 204 no-op.

Crosspost Discord message

Publishes a message from an announcement channel so it propagates to every server following that channel. The source channel must be an announcement channel. Calling this on a regular text channel returns a 400 before Discord is contacted, because Discord's own error for this case is opaque.

name*string

Thread name

Length1 <= length <= 100
messageId?string

Optional message snowflake to start the thread from. Omit for a standalone thread.

autoArchiveDuration?integer

Minutes of inactivity before the thread auto-archives. Discord accepts only these four values.

Value in

  • 60
  • 1440
  • 4320
  • 10080