Appearance
Typescript SDK - Chat API
About 448 wordsAbout 1 min
Comprehensive code examples for the Stream chat typescript SDK.
Quick Navigation
- Chat (86 methods)
- Common (84 methods)
- Moderation (31 methods)
- Types Reference - interfaces for API requests/responses
Overview
This documentation covers 201 API methods across 3 categories.
Installation
npm install stream-chat
# or
yarn add stream-chatBasic Setup
import { StreamChat } from "stream-chat";
// Initialize the client
const serverClient = StreamChat.getInstance("YOUR_API_KEY", "YOUR_API_SECRET");Categories
Chat
queryCampaigns()- Retrieve a list of campaigns based on specific criteria, helping you manage and analyze multiple marketing efforts simultaneously.getCampaign()- Obtain detailed information about a specific campaign, allowing you to review its current status and settings.startCampaign()- Initiate or schedule a campaign to begin at a designated time, enabling you to automate your marketing and outreach activities.stopCampaign()- Stop an ongoing campaign to prevent further messages from being sent, useful when campaign objectives have been achieved or if errors are detected.queryChannels()- Access a list of communication channels available in your account, facilitating efficient management and selection for your campaigns.- ... and 81 more methods
Common
getApp()- Retrieve the current application settings to understand or verify the configuration. Use this method when you need to view the existing app settings without making changes.updateApp()- Modify the application settings to align with new requirements or preferences. Use this method when you need to update the app configuration.listBlockLists()- Get a list of all existing block lists to review or manage them. Use this method when you need an overview of current block lists.createBlockList()- Create a new block list to restrict certain content or users as per your criteria. Use this method when setting up a new block list for moderation or content control.getBlockList()- Access a specific block list to view its details and contents. Use this method when you need to inspect the entries of a particular block list.- ... and 79 more methods
Moderation
insertActionLog()- Use this method to record a log of moderation actions taken within a chat, which helps in maintaining a history of actions for accountability and future reference.appeal()- Submit a request to challenge a moderation decision if you believe it was incorrect or unfair, helping to ensure accurate content moderation.getAppeal()- Retrieve details of a specific appeal you have submitted, allowing you to track the status and outcome of the appeal process.queryAppeals()- Search and list submitted appeals based on specific criteria, enabling you to manage and review multiple appeals efficiently.ban()- Use this method to prohibit a user from accessing your service due to violations, ensuring a safe and respectful environment.- ... and 26 more methods
Generated from Stream OpenAPI specification