> ## 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.

# Create email folder

> Create a folder in the connected mailbox's provider (Gmail label / Outlook folder) via Nylas and mirror it into the local catalog. Rejects case-insensitive duplicates. Nesting: on Outlook, parent_id is forwarded to the provider. On Gmail, which has no nested labels, hierarchy is encoded in the label name as "Parent/Child" (Gmail's own nesting model) and any missing ancestor labels are created, because Gmail only renders a tree when every ancestor exists.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /inbox/folders
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:
    post:
      tags:
        - Inbox
      summary: Create email folder
      description: >-
        Create a folder in the connected mailbox's provider (Gmail label /
        Outlook folder) via Nylas and mirror it into the local catalog. Rejects
        case-insensitive duplicates. Nesting: on Outlook, parent_id is forwarded
        to the provider. On Gmail, which has no nested labels, hierarchy is
        encoded in the label name as "Parent/Child" (Gmail's own nesting model)
        and any missing ancestor labels are created, because Gmail only renders
        a tree when every ancestor exists.
      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.