Skip to main content
PUT
Choose what Octolens collects from a Discord server

Authorizations

Authorization
string
header
required

Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>. Keys carry a scope — read, write (implies read) or admin (implies write) — chosen when the key is minted. Each operation's security requirement (and its x-required-scope extension) names the minimum scope it needs; request the least-privileged key that covers the operations you call.

Scopes

admin

Path Parameters

The connected server's link id (DiscordServer.linkId).

Required range: x <= 9007199254740991
Example:

12

Body

application/json
mode
enum<string>
required

everything: every message in the chosen channels is collected and checked for relevance (the server's whole-server keyword is active). keywords: only messages that match the workspace's keywords (the whole-server keyword, if any, is paused).

Available options:
everything,
keywords
Example:

"everything"

channelIds
string[]

everything only: channels to collect; [] = every channel of the server. The server's channelAllowlist is widened to cover the choice ([] clears it; it is never narrowed). Omit to keep the current channels (every channel the server link reads on first use).

Maximum array length: 500

A Discord snowflake id as a decimal string (64-bit — never parse it as a number).

Pattern: ^\d{1,20}$
Example:
dailyCap
integer | null

everything only: optional daily budget (1–2000 posts per UTC day), null for none. Omit to keep the current value (none on first use).

Required range: 1 <= x <= 2000
Example:

null

Response

200 response

This workspace's link to the server.

Required range: -9007199254740991 <= x <= 9007199254740991
guildId
string
required

A Discord snowflake id as a decimal string (64-bit — never parse it as a number).

Pattern: ^\d{1,20}$
Example:

"1290000000000000200"

name
string
required
icon
string | null
required

Discord icon hash; null when the server has none.

iconUrl
string | null
required
Example:

"https://cdn.discordapp.com/icons/1290000000000000100/a1b2.png"

approximateMemberCount
integer | null
required
Required range: -9007199254740991 <= x <= 9007199254740991
status
enum<string>
required

pending_bot: installed, waiting for the bot to come online in the server. active: messages flow. bot_removed: the bot was removed — reconnect it in the app.

Available options:
pending_bot,
active,
bot_removed
statusChangedAt
string
required
Example:

"2026-10-28T12:00:00.000Z"

channelAllowlist
string[]
required

Channel ids this workspace reads; [] = the whole server.

A Discord snowflake id as a decimal string (64-bit — never parse it as a number).

Pattern: ^\d{1,20}$
channels
object[]
required

The server's channels a scope may name (no categories, no threads), readable or not.

readableChannelCount
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
messagesPerDay7d
number | null
required

Average messages per day over the last 7 days; null until the collector reports stats.

statsUpdatedAt
string | null
required
Example:

"2026-10-28T12:00:00.000Z"

estimatedMonthlyMentions
integer | null
required

Mentions tracking the whole server is expected to add per month without a daily budget (messagesPerDay7d × prefilter pass ratio × 30); they count toward the workspace's monthly mention allowance. null = unknown (no stats yet).

Required range: -9007199254740991 <= x <= 9007199254740991
collection
object
required

What Octolens collects from this server (OCT-2008).

createdAt
string
required
Example:

"2026-10-28T12:00:00.000Z"