REST: Bots

Managing bot accounts, roles and tokens (Owner or Manage bots). Generated from mnema-talk v3.3.13 (cca4f0fdb723).

List bots

GET /api/admin/bots

Owner or Manage bots. Bots the caller outranks or not alike are all listed; changing one needs a higher role than the bot's.

Authentication: Session cookie

Responses

StatusMeaningBody
200Bots, oldest first.Bot[]
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse

Create a bot

POST /api/admin/bots

Owner or Manage bots. The bot starts with no role, no intents and no token: it can do nothing until an admin gives it roles and a token. At most 50 bots.

Authentication: Session cookie

Request body (application/json, required): CreateRequest

FieldTypeDescription
allowed_intentsintegerAllowedIntents defaults to none.
name (required)string

Responses

StatusMeaningBody
201Created.Bot
400Invalid input (INVALID_INPUT).ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or cross-origin request rejected.ErrorResponse
409CONFLICT: the bot limit is reached.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
Bot
FieldTypeDescription
allowed_intents (required)integerAllowedIntents are the gateway intents the bot may ask for.
avatar_urlstringAvatarURL is the API URL of the avatar; omitted when none.
created_at (required)string (date-time)
created_bystring (uuid)
descriptionstringDescription and Homepage come from the manifest the bot was added from; omitted for a bot created by hand.
disabled (required)booleanDisabled bots cannot use any token or gateway connection.
homepagestring
id (required)string (uuid)
last_active_atstring (date-time)
name (required)string
role_ids (required)string (uuid)[]RoleIDs are the bot's roles, highest first; its permissions come from them and from channel overwrites, never from @everyone.
user_id (required)string (uuid)

Add a bot from a manifest

POST /api/admin/bots/install

Owner or Manage bots. In one transaction under the permission lock: creates the bot with the manifest's name, description and homepage and the kept intents, allows the kept permissions to the bot's own role in each listed channel (nothing server-wide), or, with access "all", gives them to the bot's own role server-wide, so the bot works in every channel plain members can see (a channel they cannot see stays hidden from it unless it is listed), registers the manifest's commands and issues a token named after the bot, whose secret is in the answer and shown only once. The kept permissions and intents must be the manifest's; in each channel the installer must hold every kept permission (the Owner holds all), and with access "all" the installer must hold them in every channel the bot reaches. Anything refused creates nothing. Logged as bot.installed.

Authentication: Session cookie

Request body (application/json, required): InstallRequest

FieldTypeDescription
accessstringAccess is "channels" (the default: the kept permissions only in the listed channels) or "all" (the kept permissions in every channel, held server-wide by the bot's own role; a channel plain members cannot see stays hidden unless it is listed).
channel_ids (required)string (uuid)[]ChannelIDs are the channels the bot may work in (none: it sees nothing yet); with access "all" the private channels it may also see. Each must be a channel the installer can view.
intents (required)string[]Intents are names from the manifest's intents; none means none.
manifest (required)Manifest
permissions (required)string[]Permissions are keys from the manifest's permissions; none means none.

Responses

StatusMeaningBody
201Added; the token's secret is shown once.InstallResponse
400INVALID_INPUT: the manifest is invalid, or a kept permission or intent is not in it; the message names it.ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, a kept permission the installer lacks in a listed channel (the message names both), or cross-origin request rejected.ErrorResponse
404NOT_FOUND: a listed channel does not exist, is not a channel, or the installer cannot view it.ErrorResponse
409CONFLICT: the bot limit is reached, or a listed channel is a temporary Talk.ErrorResponse
413PAYLOAD_TOO_LARGE: the body exceeds 1 MiB.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
InstallResponse
FieldTypeDescription
bot (required)Bot
token (required)NewTokenResponse

Check a bot manifest

POST /api/admin/bots/manifests/check

Owner or Manage bots. Validates a manifest and answers it normalised: cleaned text, its intents with their bits and its permissions with their names, in a fixed order, without duplicates. Unknown fields are ignored; the avatar is not part of the answer. Nothing is stored.

Authentication: Session cookie

Request body (application/json, required): Manifest

FieldTypeDescription
avatarstringAvatar is a data: URL the web app uploads through the avatar route. The server ignores it and never fetches anything.
commandsCommandInput[]Commands are registered as by PUT /api/bot/v1/commands; at most 50.
descriptionstring
homepagestringHomepage is an https URL, shown as a link.
intentsstring[]Intents are names: GUILDS, GUILD_MEMBERS, GUILD_MESSAGES, GUILD_MESSAGE_REACTIONS.
manifest_version (required)integer
name (required)string
permissionsstring[]Permissions are permission keys, channel permissions only: view_channel, send_messages, attach_files, add_reactions, manage_messages, mention_everyone.

Responses

StatusMeaningBody
200The manifest as the server understands it.CheckedManifest
400INVALID_INPUT: the manifest is invalid or asks for a permission a manifest cannot ask for; the message names it.ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or cross-origin request rejected.ErrorResponse
413PAYLOAD_TOO_LARGE: the body exceeds 1 MiB.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
CheckedManifest
FieldTypeDescription
commands (required)CommandInput[]
description (required)string
homepage (required)string
intents (required)ManifestIntent[]
manifest_version (required)integer
name (required)string
permissions (required)ManifestPermission[]

Delete a bot

DELETE /api/admin/bots/{id}

Its tokens stop working and its gateway connections close at once, and its own managed role is deleted. Messages it posted stay, with its name.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Responses

StatusMeaningBody
204Deleted.
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse

Get a bot

GET /api/admin/bots/{id}

One bot account with its owner, status and roles. Needs Manage bots (or the Owner); secrets and tokens are never part of the answer.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Responses

StatusMeaningBody
200The bot.Bot
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours.ErrorResponse
404NOT_FOUND: no such bot.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
Bot
FieldTypeDescription
allowed_intents (required)integerAllowedIntents are the gateway intents the bot may ask for.
avatar_urlstringAvatarURL is the API URL of the avatar; omitted when none.
created_at (required)string (date-time)
created_bystring (uuid)
descriptionstringDescription and Homepage come from the manifest the bot was added from; omitted for a bot created by hand.
disabled (required)booleanDisabled bots cannot use any token or gateway connection.
homepagestring
id (required)string (uuid)
last_active_atstring (date-time)
name (required)string
role_ids (required)string (uuid)[]RoleIDs are the bot's roles, highest first; its permissions come from them and from channel overwrites, never from @everyone.
user_id (required)string (uuid)

Change a bot

PATCH /api/admin/bots/{id}

Name (the bot's own managed role is renamed with it), allowed gateway intents, or disabled. Disabling closes its gateway connections at once and refuses all its tokens.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Request body (application/json, required): UpdateRequest

FieldTypeDescription
allowed_intentsinteger
disabledboolean
namestring

Responses

StatusMeaningBody
200Updated.Bot
400Invalid input (INVALID_INPUT).ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
Bot
FieldTypeDescription
allowed_intents (required)integerAllowedIntents are the gateway intents the bot may ask for.
avatar_urlstringAvatarURL is the API URL of the avatar; omitted when none.
created_at (required)string (date-time)
created_bystring (uuid)
descriptionstringDescription and Homepage come from the manifest the bot was added from; omitted for a bot created by hand.
disabled (required)booleanDisabled bots cannot use any token or gateway connection.
homepagestring
id (required)string (uuid)
last_active_atstring (date-time)
name (required)string
role_ids (required)string (uuid)[]RoleIDs are the bot's roles, highest first; its permissions come from them and from channel overwrites, never from @everyone.
user_id (required)string (uuid)

Show what a bot can reach

GET /api/admin/bots/{id}/access

The effective result of the bot's roles and the channel overwrites: its server-wide permissions and, per channel it can view, what it may do there.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Responses

StatusMeaningBody
200Effective access.Access
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours.ErrorResponse
404NOT_FOUND: no such bot.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
Access
FieldTypeDescription
channels (required)ChannelAccess[]
elevated (required)booleanElevated is true when the bot holds Administrator or opens any part of the admin area: the interface warns about it.
grantedintegerGranted is the set the choice grants (a bit set of channel permissions); in mode "channels" what every one of SelectedChannelIDs allows.
mixedbooleanMixed is true in mode "channels" when the selected channels allow different sets (set by hand): saving the choice applies one set to all.
modestringMode is the bot's access choice: "all" (its own role holds its channel permissions server-wide) or "channels" (only overwrites of its own role in the listed channels).
permissions (required)integerPermissions are the server-wide permissions (a bit set).
private_reachbooleanPrivateReach is true in mode "channels" when the bot can view a channel that plain members cannot see (@everyone cannot view it) without having an overwrite of its own role there.
selected_channel_idsstring (uuid)[]SelectedChannelIDs are the channels the caller can view where the bot's own role has an overwrite: its channels in mode "channels", the private channels it may also see in mode "all".

Choose which channels a bot works in

PUT /api/admin/bots/{id}/access

Owner or Manage bots. Sets the bot's access: "channels" gives the listed permissions to the bot's own role in exactly the listed channels (its other server-wide channel grants and overwrites go), "all" gives them to the bot's own role server-wide, so the bot works in every channel plain members can see; a channel where @everyone is denied View channels stays hidden from it unless it is listed. Only these channel permissions can be given: view, send, attach, react, manage messages, mention everyone; never Administrator or the admin area. A permission that is both given and listed lifts a deny of the bot's own role in that channel. Overwrites of the bot's own role in channels the caller cannot view stay. "all" needs view_channel. The usual bot invariant applies: nobody but the Owner gives a bot anything elevated, and nobody gives a bot a permission they lack in a channel it reaches. A bot that reaches a channel the caller cannot view cannot be changed by the caller either. Logged as bot.access.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Request body (application/json, required): AccessRequest

FieldTypeDescription
access (required)stringAccess is "channels" (the permissions only in the listed channels) or "all" (the permissions in every channel, held server-wide by the bot's own role; a channel plain members cannot see stays hidden unless it is listed).
channel_ids (required)string (uuid)[]ChannelIDs are the channels of the bot's own overwrites (with access "all": the private channels it may also see). Overwrites in channels the caller cannot view are left as they are.
permissions (required)string[]Permissions are permission keys, at most the channel permissions a manifest may ask for: view_channel, send_messages, attach_files, add_reactions, manage_messages, mention_everyone. They replace what the choice granted before.

Responses

StatusMeaningBody
200The access now.Access
400INVALID_INPUT: an unknown access or permission key.ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, the bot's highest role is not below yours, a permission you lack, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot, or a listed channel does not exist or you cannot view it.ErrorResponse
409CONFLICT: a listed channel is a temporary Talk.ErrorResponse
413PAYLOAD_TOO_LARGE: the body exceeds 1 MiB.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
Access
FieldTypeDescription
channels (required)ChannelAccess[]
elevated (required)booleanElevated is true when the bot holds Administrator or opens any part of the admin area: the interface warns about it.
grantedintegerGranted is the set the choice grants (a bit set of channel permissions); in mode "channels" what every one of SelectedChannelIDs allows.
mixedbooleanMixed is true in mode "channels" when the selected channels allow different sets (set by hand): saving the choice applies one set to all.
modestringMode is the bot's access choice: "all" (its own role holds its channel permissions server-wide) or "channels" (only overwrites of its own role in the listed channels).
permissions (required)integerPermissions are the server-wide permissions (a bit set).
private_reachbooleanPrivateReach is true in mode "channels" when the bot can view a channel that plain members cannot see (@everyone cannot view it) without having an overwrite of its own role there.
selected_channel_idsstring (uuid)[]SelectedChannelIDs are the channels the caller can view where the bot's own role has an overwrite: its channels in mode "channels", the private channels it may also see in mode "all".

Set a bot's avatar

POST /api/admin/bots/{id}/avatar

multipart/form-data with an image in field 'avatar' (max 5 MB).

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Request body (multipart/form-data, required): object

FieldTypeDescription
avatar (required)string (binary)Image file, at most 5 MB.

Responses

StatusMeaningBody
200Updated.Bot
400Invalid input (INVALID_INPUT).ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot.ErrorResponse
413PAYLOAD_TOO_LARGE: file exceeds the limit.ErrorResponse
415UNSUPPORTED_MEDIA_TYPE: the file type is not allowed.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
503UNAVAILABLE: file storage is not available.ErrorResponse
Bot
FieldTypeDescription
allowed_intents (required)integerAllowedIntents are the gateway intents the bot may ask for.
avatar_urlstringAvatarURL is the API URL of the avatar; omitted when none.
created_at (required)string (date-time)
created_bystring (uuid)
descriptionstringDescription and Homepage come from the manifest the bot was added from; omitted for a bot created by hand.
disabled (required)booleanDisabled bots cannot use any token or gateway connection.
homepagestring
id (required)string (uuid)
last_active_atstring (date-time)
name (required)string
role_ids (required)string (uuid)[]RoleIDs are the bot's roles, highest first; its permissions come from them and from channel overwrites, never from @everyone.
user_id (required)string (uuid)

List a bot's commands

GET /api/admin/bots/{id}/commands

All of them, including the disabled ones.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Responses

StatusMeaningBody
200Commands by name.Command[]
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours.ErrorResponse
404NOT_FOUND: no such bot.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse

Delete a command

DELETE /api/admin/bots/{id}/commands/{commandID}

The bot can register it again; disable it instead to keep it off.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.
commandIDpathstring (uuid)yesCommand ID.

Responses

StatusMeaningBody
204Deleted.
400Invalid input (INVALID_INPUT).ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot or command.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse

Enable or disable a command

PATCH /api/admin/bots/{id}/commands/{commandID}

A disabled command is hidden from members and refuses invocations. The bot cannot switch it back on, not even by registering the command again.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.
commandIDpathstring (uuid)yesCommand ID.

Request body (application/json, required): CommandPatch

FieldTypeDescription
disabled (required)boolean

Responses

StatusMeaningBody
200Updated.Command
400Invalid input (INVALID_INPUT).ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot or command.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
Command
FieldTypeDescription
bot_id (required)string (uuid)
created_at (required)string (date-time)
default_member_permissionsstring | null
description (required)string
disabled (required)booleanDisabled commands are hidden from members and refuse invocations; only an admin can set it, a bot registering the command again keeps it.
id (required)string (uuid)
name (required)string
options (required)Option[]

Set a bot's roles

PUT /api/admin/bots/{id}/roles

Replaces the bot's roles. The usual hierarchy applies: only roles below the caller's highest role, and no permission the caller lacks. A role with Administrator or any admin-area permission can only be given by the Owner. The bot never inherits @everyone, always keeps the shared Bot role and its own managed role, and another bot's own role is refused.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Request body (application/json, required): RolesRequest

FieldTypeDescription
role_ids (required)string (uuid)[]

Responses

StatusMeaningBody
200Updated.Bot
400Invalid input (INVALID_INPUT).ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, a role is not below your highest role, or it holds a permission you lack (roles with Administrator or admin-area permissions: Owner only), or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
Bot
FieldTypeDescription
allowed_intents (required)integerAllowedIntents are the gateway intents the bot may ask for.
avatar_urlstringAvatarURL is the API URL of the avatar; omitted when none.
created_at (required)string (date-time)
created_bystring (uuid)
descriptionstringDescription and Homepage come from the manifest the bot was added from; omitted for a bot created by hand.
disabled (required)booleanDisabled bots cannot use any token or gateway connection.
homepagestring
id (required)string (uuid)
last_active_atstring (date-time)
name (required)string
role_ids (required)string (uuid)[]RoleIDs are the bot's roles, highest first; its permissions come from them and from channel overwrites, never from @everyone.
user_id (required)string (uuid)

List a bot's tokens

GET /api/admin/bots/{id}/tokens

Never contains the secrets: name, last characters, state, expiry and last use.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Responses

StatusMeaningBody
200Tokens, newest first.Token[]
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours.ErrorResponse
404NOT_FOUND: no such bot.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse

Issue a token

POST /api/admin/bots/{id}/tokens

The secret is in the answer and shown only once; only a SHA-256 hash is stored. Optional expiry. At most 10 active tokens per bot.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.

Request body (application/json): TokenRequest

FieldTypeDescription
expires_atstring (date-time)ExpiresAt is optional; without it the token never expires.
namestring

Responses

StatusMeaningBody
201Issued.NewTokenResponse
400Invalid input (INVALID_INPUT).ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot.ErrorResponse
409CONFLICT: too many active tokens.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
NewTokenResponse
FieldTypeDescription
created_at (required)string (date-time)
expires_atstring (date-time)ExpiresAt is empty for a token that never expires.
hint (required)string
id (required)string (uuid)
issuer_bindingstringIssuerBinding is only set for a token issued before 1.0, which has no recorded issuer: "unbound" until it is first used after the upgrade, then "inferred" (bound to the bot's creator or the Owner, whoever qualified; regenerate it to bind it to its real issuer). Absent for a token whose issuer was recorded when it was issued.
last_used_atstring (date-time)
name (required)string
secret (required)stringSecret is the API token. It is shown only now; only its hash is kept.
state (required)string

Revoke a token

DELETE /api/admin/bots/{id}/tokens/{tokenID}

Takes effect at once; open gateway connections that used the token close.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.
tokenIDpathstring (uuid)yesToken ID.

Responses

StatusMeaningBody
204Revoked.
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot or token.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse

Regenerate a token

POST /api/admin/bots/{id}/tokens/{tokenID}/regenerate

Issues a new token with the same name and expiry and revokes the old one at once (its gateway connections close), in one step. Only an active token can be regenerated.

Authentication: Session cookie

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesBot ID.
tokenIDpathstring (uuid)yesToken ID.

Responses

StatusMeaningBody
201Issued; the secret is shown once.NewTokenResponse
400INVALID_INPUT: the token is expired or revoked.ErrorResponse
401No valid session (UNAUTHORIZED).ErrorResponse
403FORBIDDEN: missing the Manage bots permission, or the bot's highest role is not below yours, or cross-origin request rejected.ErrorResponse
404NOT_FOUND: no such bot or token.ErrorResponse
409CONFLICT: too many active tokens.ErrorResponse
429RATE_LIMITED: too many requests.ErrorResponse
500INTERNAL_ERROR: sanitized server failure.ErrorResponse
NewTokenResponse
FieldTypeDescription
created_at (required)string (date-time)
expires_atstring (date-time)ExpiresAt is empty for a token that never expires.
hint (required)string
id (required)string (uuid)
issuer_bindingstringIssuerBinding is only set for a token issued before 1.0, which has no recorded issuer: "unbound" until it is first used after the upgrade, then "inferred" (bound to the bot's creator or the Owner, whoever qualified; regenerate it to bind it to its real issuer). Absent for a token whose issuer was recorded when it was issued.
last_used_atstring (date-time)
name (required)string
secret (required)stringSecret is the API token. It is shown only now; only its hash is kept.
state (required)string

Something wrong on this page? Tell us.