Mail

Add or remove labels

Labels are free-form tags on a message (for example needs-reply or invoice), stored by the mail server as IMAP keywords so they are visible to mail apps too. Names are lowercase: up to 64 letters, digits, dots, dashes or underscores. Returns the labels the message carries afterwards. Requires scope mail:write.

post/mailboxes/{address}/messages/{uid}/labels

Request

  • Base URL: https://faivelo.com/api/v1
  • URL: https://faivelo.com/api/v1/mailboxes/{address}/messages/{uid}/labels
  • Auth: HTTP bearer

Path parameters

addressstring required

Full mailbox address, e.g. user@yourdomain.com

integer required
OR
string required

The message: its IMAP UID (an integer, as returned by the list endpoint; relative to folder), or the permanent message_id from a message.received / message.sent webhook, which stays the same when the message moves. Add ?id=permanent to force the second reading of an all-digit id.

Query parameters

folderstring

IMAP folder name (defaults to INBOX)

Request body

addstring[]
removestring[]

Example request

{
  "add": [
    "needs-reply"
  ],
  "remove": [
    "new"
  ]
}

Response

Labels updated

successboolean

Example response

{
  "success": true,
  "data": {
    "labels": [
      "needs-reply"
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.