This repository was archived by the owner on Jun 7, 2023. It is now read-only.
This repository was archived by the owner on Jun 7, 2023. It is now read-only.
Support custom attributes for labels #39
Closed
Description
Allow users to specify custom attributes for labels and mailboxes.
Below are the examples for V2 API
Create Label:
POST /rest/v2/:domain/:user/mailbox/label/
{
"name" : "MyNewLabel",
"attributes" : {
"order" : "3",
"color" : "red",
...
},
}
Update Label (add or modify custom attributes):
PUT /rest/v2/:domain/:user/mailbox/label/:id/
{
"name" : "BlueLabel",
"attributes" : {
"order" : "6",
"color" : "blue",
"icon" : "smile",
...
},
}
To remove custom attributes just set them to empty string or null:
PUT /rest/v2/:domain/:user/mailbox/label/:id/
{
"attributes" : {
"color" : "",
"icon" : null
}
}
Get attributes:
GET /rest/v2/:domain/:user/mailbox/?metadata=true
{
"0": {
"name": "all",
"size": 2193085,
"total": 230,
"unread": 13
},
"1232" : {
"name" : "MyBlueLabel",
"attributes" : {
"order" : "6",
"color" : "blue",
...
},
...
}
Metadata
Metadata
Assignees
Labels
No labels