Create collections from search terms

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
POST /case/collections/{caseId}/bulk

Searches the case's messages for the given terms and creates one collection per matching conversation, holding the matching messages. Returns how many collections were created.

Headers

  • organization string Required

    id of the selected (active) organization

Path parameters

  • caseId string Required

    Id of the case

application/json

Body Required

  • searchTerms array[object] Required
    Hide searchTerms attributes Show searchTerms attributes object
    • searchTerm string Required
    • searchFullWord boolean
  • paddingMessagesCount number

    Number of messages to add to the beginning and end of the collection

    Default value is 0.

Responses

  • 201 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attribute Show data attribute object
      • createdCollectionsCount number Required
    • statusCode number Required
    • timestamp string(date-time) Required
POST /case/collections/{caseId}/bulk
curl \
 --request POST 'http://api.example.com/case/collections/{caseId}/bulk' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "organization: string" \
 --data '{
  "searchTerms": [
    {
      "searchTerm": "string",
      "searchFullWord": true
    }
  ],
  "paddingMessagesCount": 0
}'
Request examples
# Headers
organization: string

# Payload
{
  "searchTerms": [
    {
      "searchTerm": "string",
      "searchFullWord": true
    }
  ],
  "paddingMessagesCount": 0
}
Response examples (201)
{
  "data": {
    "createdCollectionsCount": 3
  },
  "statusCode": 201,
  "timestamp": "2026-01-15T10:15:00.000Z"
}