Nurama Developers
Namespaces

bot

Methods and types of the `bot` namespace (`client.bot` / `bot.bot`).

Interfaces

Bot

Properties

PropertyTypeDescription
accountType"bot"-
apiKey?BotApiKeySummary-
apiKeys?BotApiKeySummary[]-
avatar?anyPopulated avatar Asset (joined server-side from avatarId). The web client resolves the image URL from this field via getAvatarUrl().
avatarIdstring | null-
colorstring-
createdAtstring-
displayNamestring-
idstring-
membershipId?string-
projectMemberships?BotProjectMembership[]Project memberships within the workspace the bot belongs to. Populated by listBots and getBot. Empty array if the bot has no project assignments.
roles?string[]-
statusstring-
updatedAtstring-

BotApiKeySummary

Properties

PropertyTypeDescription
createdAtstring-
expiresAt?string | null-
idstring-
keyPrefixstring-
kind?"botAccess" | "pat" | "oauthAccess" | "oauthRefresh" | nullDiscriminator. Bot keys mint as 'botAccess'.
lastUsed?string | null-
namestring-
scopes?string[]Granted action verbs. Empty array = unscoped (legacy).
status"active" | "revoked"-

BotProjectMembership

Properties

PropertyType
membershipIdstring
projectIdstring
projectNamestring
rolesBotProjectRole[]

CreateBotData

Properties

PropertyTypeDescription
color?stringOptional hex color from the approved palette. Auto-assigned if omitted.
namestringDisplay name for the bot. 1–50 characters.
roles("workspaceAdmin" | "workspaceMember" | "workspaceChatMember")[]Workspace roles to grant the bot. Must be one or more of: workspaceAdmin, workspaceMember, workspaceChatMember.
scopes?string[]Optional API-key scopes. Defaults to [] (legacy — bot key can call any route that isn't yet scope-gated). Once a route is gated by requireTokenScope the bot needs the matching scope here for that route to work.

CreateBotResponse

Properties

PropertyTypeDescription
botBot-
rawKeystringRaw API key, returned ONCE at creation time. Store it immediately — it cannot be retrieved again.

RotateBotKeyResponse

Properties

PropertyTypeDescription
apiKeyBotApiKeySummary-
rawKeystringNew raw API key. Returned once.

UpdateBotAvatarFileData

Properties

PropertyType
checksumstring
namestring
sizeInMBnumber

UpdateBotAvatarResponse

Indexable

[k: string]: unknown

Properties

PropertyType
asset?{ [k: string]: unknown; id: string; }
asset.idstring
signedUrlData?{ key: string; uploadId: string; urls: string[]; }
signedUrlData.keystring
signedUrlData.uploadIdstring
signedUrlData.urlsstring[]
user{ avatarId: string | null; id: string; }
user.avatarIdstring | null
user.idstring

UpdateBotData

Properties

PropertyType
color?string
name?string

Type Aliases

BotProjectRole

type BotProjectRole = "creator" | "reviewer" | "projectAdmin";

Functions

default()

function default(client): {
  createBot: Promise<CreateBotResponse>;
  deleteBot: Promise<void>;
  getBot: Promise<Bot>;
  listBots: Promise<Bot[]>;
  listProjectMemberships: Promise<BotProjectMembership[]>;
  removeProjectMembership: Promise<void>;
  rotateBotKey: Promise<RotateBotKeyResponse>;
  setProjectMembership: Promise<BotProjectMembership>;
  updateBot: Promise<Bot>;
  updateBotAvatar: Promise<UpdateBotAvatarResponse>;
};

Bot user administration methods. Used by workspace owners/admins (callers holding a JWT) to manage bot users in a workspace. Bots themselves cannot call these endpoints — bot administration is restricted server-side.

Parameters

ParameterType
clientdefault

Returns

NameTypeDescription
createBot()(workspaceId, data) => Promise<CreateBotResponse>Create a bot user in a workspace. Returns the new bot and the raw API key (shown only once).
deleteBot()(workspaceId, botId) => Promise<void>Delete a bot user. Revokes all API keys, removes the workspace membership, and marks the user inactive.
getBot()(workspaceId, botId) => Promise<Bot>Get a single bot's details, including all of its API key metadata (no secrets).
listBots()(workspaceId) => Promise<Bot[]>List bot users in a workspace.
listProjectMemberships()(workspaceId, botId) => Promise<BotProjectMembership[]>List the bot's project memberships within the workspace.
removeProjectMembership()( workspaceId, botId, projectId ) => Promise<void>Remove the bot's membership on a project. Idempotent.
rotateBotKey()(workspaceId, botId) => Promise<RotateBotKeyResponse>Revoke the bot's current API key and issue a new one. The new raw key is returned once.
setProjectMembership()( workspaceId, botId, projectId, data ) => Promise<BotProjectMembership>Upsert the bot's membership on a project. Replaces roles if a membership already exists; creates one otherwise. Idempotent.
updateBot()( workspaceId, botId, data ) => Promise<Bot>Update a bot's display name and/or color.
updateBotAvatar()( workspaceId, botId, fileData ) => Promise<UpdateBotAvatarResponse>Request signed URL data to upload a new avatar for the bot. Upload the file with client.asset.multipartUpload(...) using the returned signedUrlData, then call client.asset.completeUpload(...) to finalize.

On this page