Record collection events (internal)

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 /extraction/collection-events

Desktop and portal plumbing: records a batch of up to 50 collection events against the caller's extraction code and returns a result per event (accepted, duplicate, rejected or retry). Returns 404 when collection events are turned off, 411 without a Content-Length header and 413 over 256 KB.

Headers

  • content-length string Required
application/json

Body Required

  • events array[object] Required

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attribute Show data attribute object
      • results array[object] Required
        Hide results attributes Show results attributes object
        • eventId string | null Required
        • status string Required

          Values are accepted, duplicate, rejected, or retry.

        • reason string
    • statusCode number Required
    • timestamp string(date-time) Required
POST /extraction/collection-events
curl \
 --request POST 'http://api.example.com/extraction/collection-events' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "content-length: string" \
 --data '{
  "events": [
    {}
  ]
}'
Request examples
# Headers
content-length: string

# Payload
{
  "events": [
    {}
  ]
}
Response examples (200)
{
  "data": {
    "results": [
      {
        "eventId": "7f3c2a10-5b4e-4d2a-9c1e-2f6b8a9d0e11",
        "status": "accepted",
        "reason": "string"
      }
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}