For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update folder

Rename an existing folder.

Update folder

put

Rename an existing folder.

Authorizations
AuthorizationstringRequired

Bearer authentication using API tokens in the Authorization header.

Path parameters
mailboxResourceIdstringRequired

Resource ID of the managed mailbox the bearer token is authorized for.

Example: AC1a2b3c4d5e6f7g
folderstringRequired

Current folder path (URL-encoded).

Example: INBOX.OldName
Body

Body for renaming a folder.

namestring · min: 1 · max: 100Required

New folder name. Length 1-100 after trimming.

Example: Archive
Responses
200

Folder renamed.

application/json

Single folder payload.

put/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}
PUT /api/v1/mailboxes/{mailboxResourceId}/folders/{folder} HTTP/1.1
Host: api.mail.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "name": "Archive"
}
{
  "data": {
    "path": "INBOX.Sent",
    "name": "Sent",
    "delimiter": ".",
    "specialUse": "\\Sent",
    "messageCount": 42,
    "unreadCount": 5
  }
}

Last updated

Was this helpful?