Skip to content

Mastodon-compatible webhooks

marcin mikołajczak requested to merge mkljczk/pleroma:webhooks_ into develop

Intended to work like the new Mastodon feature.

Webhooks would benefit automation through the moderation API by notifying applications about system events in real-time. They would also enable integrations with chat apps like Discord, IRC and Slack, helping moderator coordination.

Events currently supported:

  • report.created
  • account.created

The X-Hub-Signature header adopted from the WebSub spec can be optionally used to verify that the payloads are authentic.

The payload delivered to the webhook has the form of:

{
  "event": "report.created",
  "created_at": "2022-06-08T12:28:31.000Z",
  "object": {
    // The report entity would be here
  }
}

Mind that created_at at the top-level refers to the event itself, and not the object.

Edited by marcin mikołajczak

Merge request reports