Skip to content

Commit 0b49aa4

Browse files
committed
feat: add mail webhooks
Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
1 parent 24b218b commit 0b49aa4

1 file changed

Lines changed: 91 additions & 0 deletions

File tree

‎admin_manual/webhook_listeners/index.rst‎

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,97 @@ When the optional ``tables`` app is installed:
577577
"time": 1700054321,
578578
}
579579
580+
581+
Mail App Events
582+
~~~~~~~~~~~~~~~~~
583+
Mail events use different distinct payload formats, depending on the event.
584+
When the optional ``mail`` app is installed:
585+
586+
- ``NewMessageReceivedEvent``
587+
588+
.. code-block:: json
589+
590+
{
591+
"event": {
592+
"class": "OCA\\Mail\\Event\\NewMessageReceivedEvent",
593+
"accountId": 34,
594+
"inReplyToRfcMessageId": "5888857",
595+
"mailboxId": 10,
596+
"messageId": 108778,
597+
"messageUri": "89789789",
598+
"RfcMessageId": "897789",
599+
"sentAt": "1787826765",
600+
"subject": "Important data changes",
601+
"threadRootId": "9947988"
602+
},
603+
"user": {
604+
"uid": "carol",
605+
"displayName": "Carol"
606+
},
607+
"time": 1787826832,
608+
}
609+
610+
611+
- ``MessageSentEvent``
612+
613+
.. code-block:: json
614+
615+
{
616+
"event": {
617+
"class": "OCA\\Mail\\Event\\MessageSentEvent",
618+
"accountId": 34,
619+
"inReplyToRfcMessageId": "5888857",
620+
"sendAt": "1787826765",
621+
"subject": "Important data changes"
622+
},
623+
"user": {
624+
"uid": "carol",
625+
"displayName": "Carol"
626+
},
627+
"time": 1787826832,
628+
}
629+
630+
631+
- ``MessageFlaggedEvent``
632+
633+
.. code-block:: json
634+
635+
{
636+
"event": {
637+
"class": "OCA\\Mail\\Event\\MessageFlaggedEvent",
638+
"accountId": 34,
639+
"flag": "Spam",
640+
"mailboxId": 10,
641+
"messageId": 108778,
642+
"set": true,
643+
"uid": 897789
644+
},
645+
"user": {
646+
"uid": "carol",
647+
"displayName": "Carol"
648+
},
649+
"time": 1787826832,
650+
}
651+
652+
653+
- ``MessageDeletedEvent``
654+
655+
.. code-block:: json
656+
657+
{
658+
"event": {
659+
"class": "OCA\\Mail\\Event\\MessageDeletedEvent",
660+
"accountId": 34,
661+
"mailboxId": 10,
662+
"uid": 108778
663+
},
664+
"user": {
665+
"uid": "carol",
666+
"displayName": "Carol"
667+
},
668+
"time": 1787826832,
669+
}
670+
580671
.. note::
581672

582673
For filtering or automation, always check the actual payload you receive, as it matches

0 commit comments

Comments
 (0)