Memorys
Search Memory
Search memories for records matching a given search query
post
/v1/memory/search
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Request Body * Required
Request Body Schema: application/json
searchstring
The keyword/phrase to search for
contactIdstring
The ID of the contact to filter memories by
botIdstring
The ID of the bot to filter memories by
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.memory.search(
{)"search":"string","contactId":"string",}"botId":"string"
{"items":[{"id":"string","text":"string","meta":"object"}]}The search was successful