Mail

Create a mail folder

Creates a folder in the mailbox.

POST /v1/folders

Permission

The key must be granted mail.folders.write

A key without it gets 403 insufficient_scope, with the missing permission named in details.

Request body

Field Type Description
name required string Shown in webmail and over IMAP. Must be unique among its siblings.
parent_id string Nests the folder inside another. Omit for a top-level folder.

Request

curl https://api.veruapis.com/v1/folders \
  -X POST \
  -H "Authorization: Bearer vak_live_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Invoices", "parent_id": null }'

Idempotency-Key is required on every write. Retrying with the same key returns the original response rather than repeating the operation, so a timeout is something you retry rather than something you investigate.

Response

Answers 201.

Field Type Description
id string The new folder, ready to move messages into.
{
  "data": { "id": "fld_01j8z9invoices", "name": "Invoices", "message_count": 0, "unread_count": 0 },
  "meta": { "request_id": "req_01j8z9...", "timestamp": "2026-09-02T10:00:00Z" }
}
Errors

Every failure uses the same shape, with a stable string code you can branch on. See the error reference.

Related

POST /v1/folders

Sends this body to your own workspace, for real. Edit it before running.