> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stax.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete email folder

> Delete a folder in the connected mailbox's provider via Nylas, soft-delete the local catalog row, and remove it from every message that referenced it. System folders (Inbox/Sent/Trash) cannot be deleted. On Gmail, where hierarchy lives in the label name, every descendant label is deleted too (deepest first) — Gmail does not cascade deletes itself.



## OpenAPI

````yaml /api-reference/cx/swagger.json delete /inbox/folders/{folder}
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /inbox/folders/{folder}:
    delete:
      tags:
        - Inbox
      summary: Delete email folder
      description: >-
        Delete a folder in the connected mailbox's provider via Nylas,
        soft-delete the local catalog row, and remove it from every message that
        referenced it. System folders (Inbox/Sent/Trash) cannot be deleted. On
        Gmail, where hierarchy lives in the label name, every descendant label
        is deleted too (deepest first) — Gmail does not cascade deletes itself.
      responses:
        default:
          description: No response is documented for this operation upstream.
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.