List sender and recipient domains

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 /local-emails/{caseId}/domains

Lists the email domains that appear in the case's emails, with how many emails each appears in.

Path parameters

  • caseId string Required

Query parameters

  • sourceEmails array[string]

    Restrict to these source mailboxes (provider emails). Omit to cover every mailbox in the case.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • data array[object] Required
        Hide data attributes Show data attributes object
        • domain string Required

          The email domain (part after @), lowercased.

        • count number Required

          Number of emails with this domain on a from/to/cc/bcc.

      • totalDomains number Required

        Number of distinct domains.

    • statusCode number Required
    • timestamp string(date-time) Required
GET /local-emails/{caseId}/domains
curl \
 --request GET 'http://api.example.com/local-emails/{caseId}/domains' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "data": [
      {
        "domain": "example.org",
        "count": 128
      }
    ],
    "totalDomains": 12
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}