---
title: "Add a new folder to an email account"
method: POST
path: "/email/v1/folders/{emailId}"
tags: ["emailService"]
---

# Add a new folder to an email account

`POST /email/v1/folders/{emailId}`

Adds a new folder to the email account specified by emailId.

## Path parameters

- `emailId` integer, required

## Request body

- EmailFolderDto
  - `folder_name` string
  - `path` string
  - `delimitter` string
  - `is_trash` boolean
  - `is_spam` boolean
  - `is_draft` boolean
  - `is_junk` boolean
  - `is_sent` boolean
  - `is_inbox` boolean
  - `is_pending` boolean
  - `has_children` boolean
  - `is_root` boolean

## Response `200`

OK

- EmailFolder
  - `id` integer
  - `email_id` integer
  - `parent_id` integer, nullable
  - `folder_name` string
  - `path` string
  - `delimitter` string
  - `is_trash` boolean
  - `is_spam` boolean
  - `is_draft` boolean
  - `is_junk` boolean
  - `is_sent` boolean
  - `is_inbox` boolean
  - `is_pending` boolean
  - `has_children` boolean
  - `is_root` boolean
  - `is_deleted` boolean
  - `message_count` integer
  - `unread_message_count` integer

## Other responses

- `401` — Access token is missing or invalid
- `404` — Resource not found
- `422` — Validation error response

---

[API](https://skmtc.net/uspacy/apis/uspacy-api.md) · [All operations](https://skmtc.net/uspacy/apis/uspacy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uspacy/uspacy-api/versions/c3f48fd1c26b/schema)
