List the extraction code's mailboxes

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 /extraction/case/email-providers

Lists the mailboxes linked to the caller's extraction code. OAuth tokens and IMAP credentials are never returned.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data array[object] Required
      Hide data attributes Show data attributes object
      • createdAt string(date-time) Required
      • updatedAt string(date-time) Required
      • id string Required
      • email string Required
      • ecCode string

        Never sent today: no importer fills it.

      • grantId string | null Required
      • provider string | null Required
      • isValid boolean Required
      • lastAccessedAt string(date-time) | null Required
      • folders array[object] Required

        Mailbox folders saved when the account was connected or its folders were refreshed.

        Hide folders attributes Show folders attributes object
        • name string
        • id string
        • isSystemFolder boolean
        • backgroundColor string
        • metadata object

          A copy of the provider's folder record. OAuth (Nylas) accounts: id, name, object, grantId, and depending on the provider backgroundColor, textColor, systemFolder, parentId, childCount, totalCount, unreadCount, attributes. IMAP accounts: name, id, isSystemFolder, backgroundColor and an empty metadata object.

          Additional properties are allowed.

    • statusCode number Required
    • timestamp string(date-time) Required
GET /extraction/case/email-providers
curl \
 --request GET 'http://api.example.com/extraction/case/email-providers' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": [
    {
      "createdAt": "2026-01-15T14:30:00.000Z",
      "updatedAt": "2026-01-15T14:30:00.000Z",
      "id": "507f1f77bcf86cd799439011",
      "email": "jane.doe@example.com",
      "ecCode": "K7Q2-9XPL",
      "grantId": "5f0c8b3e-2a41-4d7c-9a51-1c2b3d4e5f60",
      "provider": "google",
      "isValid": true,
      "lastAccessedAt": "2026-01-15T14:30:00.000Z",
      "folders": [
        {
          "backgroundColor": "#ffffff",
          "id": "INBOX",
          "isSystemFolder": true,
          "metadata": {
            "grantId": "5f0c8b3e-2a41-4d7c-9a51-1c2b3d4e5f60",
            "id": "INBOX",
            "name": "INBOX",
            "object": "folder",
            "systemFolder": true
          },
          "name": "INBOX"
        }
      ]
    }
  ],
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}