Find the message nearest a date

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
GET /conversation/{conversationId}/nearest-message-by-date

Returns the id, position and date of the message in a conversation closest to the given date, so a client can jump to it.

Headers

  • organization string Required

    id of the selected (active) organization

Path parameters

  • conversationId string Required

Query parameters

  • date string Required

    Date to search

  • case string Required

    Case id to search for messages

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • messageIndex number Required
      • messageId string Required
      • date string Required
    • statusCode number Required
    • timestamp string(date-time) Required
GET /conversation/{conversationId}/nearest-message-by-date
curl \
 --request GET 'http://api.example.com/conversation/{conversationId}/nearest-message-by-date?date=string&case=string' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "organization: string"
Response examples (200)
{
  "data": {
    "messageIndex": 42,
    "messageId": "507f1f77bcf86cd799439011",
    "date": "2026-01-15T14:30:00.000Z"
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}