Create folder
Create a new folder in the managed mailbox.
Create a new folder in the managed mailbox.
Authorizations
AuthorizationstringRequired
Bearer authentication using API tokens in the Authorization header.
Path parameters
mailboxResourceIdstringRequiredExample:
Resource ID of the managed mailbox the bearer token is authorized for.
AC1a2b3c4d5e6f7gBody
Body for creating a folder.
namestring · min: 1 · max: 100RequiredExample:
Folder name. Length 1-100 after trimming.
ProjectsResponses
201
Folder created.
application/json
Single folder payload.
401
Missing or invalid credentials.
application/json
403
Token is not authorized to manage the requested mailbox.
application/json
409
Conflict with the target resource.
application/json
422
Request payload failed validation. params maps field name to an array of error messages.
application/json
500
Server-side failure.
application/json
502
Upstream service is unavailable or returned an unexpected response.
application/json
post/api/v1/mailboxes/{mailboxResourceId}/folders
POST /api/v1/mailboxes/{mailboxResourceId}/folders HTTP/1.1
Host: api.mail.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"name": "Projects"
}{
"data": {
"path": "INBOX.Sent",
"name": "Sent",
"delimiter": ".",
"specialUse": "\\Sent",
"messageCount": 42,
"unreadCount": 5
}
}Last updated
Was this helpful?