List a mailbox's folders

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/case/email-providers/{providerId}/folders

Fetches the folders of a mailbox linked to the extraction code's case live from the email provider, saves them on the mailbox and returns them. Returns 404 for a mailbox that is not linked to the caller's extraction code.

Path parameters

  • providerId string Required

    Id of the email provider (UserEmailDataProvider)

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data array[object] Required
      Hide data attributes Show data attributes object
      • id string
      • name string
      • isSystemFolder boolean
      • backgroundColor string | null
      • metadata object

        The folder as the provider returned it

    • statusCode number Required
    • timestamp string(date-time) Required
POST /extraction/case/email-providers/{providerId}/folders
curl \
 --request POST 'http://api.example.com/extraction/case/email-providers/{providerId}/folders' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": [
    {
      "id": "INBOX",
      "name": "Inbox",
      "isSystemFolder": true,
      "backgroundColor": "string",
      "metadata": {}
    }
  ],
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}