WoyraDocs
Get an API key

Mark a message read or unread, star it, or file it in another folder

PATCH/v1/mail/messages/{id}

Mailboxes · Requires an API key

Parameters

NameInDescription
idrequiredpath
mailboxqueryThe token's own mailbox. Any other address is refused with 403.

Body

FieldTypeDescription
unreadboolean
flaggedbooleanStar or unstar.
snoozedUntiltimestampSnooze until then, between a minute and a year ahead: the message moves to Archive and comes back to the Inbox, unread, at that time. null brings it back now.
folderstring
One of INBOX, ARCHIVE, SENT, TRASH, SPAM.

Example

curl -X PATCH https://api.woyra.io/v1/mail/messages/email_01J... \
  -H "Authorization: Bearer $WOYRA_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "unread": true,
    "flagged": true,
    "snoozedUntil": "<snoozedUntil>"
  }'

Response

200 The message as it now is.

FieldTypeDescription
idrequiredstring
folderrequiredstring
One of INBOX, ARCHIVE, SENT, TRASH, SPAM.
receivedAtrequiredtimestamp
fromrequiredstring
fromNamestring
torequiredarray of string
ccrequiredarray of string
subjectrequiredstring
snippetrequiredstring
unreadrequiredboolean
flaggedrequiredbooleanStarred.
snoozedUntiltimestampWhen a snoozed message comes back to the Inbox.
sendAttimestampWhen a message sent for later leaves. Absent once it has.
hasAttachmentsrequiredboolean
threadIdrequiredstringThe conversation; a message that starts none is its own.
sizeBytesrequiredinteger
verdictsrequiredobjectspf, dkim and dmarc as reported, e.g. PASS or FAIL.

Errors

StatusCodes
400invalid_request, unsupported_version
401authentication_required, invalid_api_key
404not_found, product_not_offered

Also in Mailboxes