TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/botpress/botpress/llms.txt
Use this file to discover all available pages before exploring further.
@botpress/client package provides a standalone HTTP client for interacting with the Botpress Cloud API. Use it to manage bots, integrations, conversations, messages, and users from any Node.js or browser environment.
Installation
npm
yarn
Initialization
Configuration Options
Botpress API base URL.
Authentication token (Personal Access Token or Bot token).
Default workspace ID for operations.
Default bot ID for operations.
Default integration ID for operations.
Client Types
The client is exported from different modules:Public Client
For bot and integration runtime:Runtime Client
For internal runtime operations:Admin Client
For workspace and bot management:Basic Usage
Create a Conversation
Send a Message
Get a User
List Messages
Operations
The client provides methods for:Conversations
createConversation()- Create a conversationgetConversation()- Get conversation by IDlistConversations()- List conversationsupdateConversation()- Update conversationdeleteConversation()- Delete conversationgetOrCreateConversation()- Get or create conversation
Messages
createMessage()- Send a messagegetMessage()- Get message by IDlistMessages()- List messagesupdateMessage()- Update messagedeleteMessage()- Delete messagegetOrCreateMessage()- Get or create message
Users
createUser()- Create a usergetUser()- Get user by IDlistUsers()- List usersupdateUser()- Update userdeleteUser()- Delete usergetOrCreateUser()- Get or create user
Events
createEvent()- Create an eventgetEvent()- Get event by IDlistEvents()- List events
State
getState()- Get statesetState()- Set stategetOrSetState()- Get or set statepatchState()- Partially update state
Actions
callAction()- Execute an integration action
Files
uploadFile()- Upload a filegetFile()- Get file metadatalistFiles()- List filesdeleteFile()- Delete a fileupsertFile()- Create or update fileupdateFileMetadata()- Update file metadatasearchFiles()- Search files
Tables
createTableRows()- Insert rowsgetTableRow()- Get a rowfindTableRows()- Query rowsupdateTableRows()- Update rowsupsertTableRows()- Insert or update rowsdeleteTableRows()- Delete rows
Workflows
createWorkflow()- Create workflowgetWorkflow()- Get workflowupdateWorkflow()- Update workflowdeleteWorkflow()- Delete workflowlistWorkflows()- List workflowsgetOrCreateWorkflow()- Get or create workflow
Participants
addParticipant()- Add participant to conversationgetParticipant()- Get participantlistParticipants()- List participantsremoveParticipant()- Remove participant
Analytics
trackAnalytics()- Track analytics events
Error Handling
Error Types
Type guard for API errors.
SDK runtime error class.
Pagination
Many list operations support pagination:Timeouts and Retries
The client uses axios with retry logic:Environment Variables
.env
See Also
- Authentication - API authentication methods
- Client Methods - Complete method reference
- BotSpecificClient - Type-safe bot client
- IntegrationSpecificClient - Type-safe integration client