Mastodon uses the ActivityPub protocol to exchange data between instances. When you post a status, follow a user, or boost a message, Mastodon sends an ActivityPub activity to other servers. This article breaks down how each common Mastodon action translates into an ActivityPub activity type and what fields are included. You will learn the exact mapping between user-facing actions and the JSON objects sent over the wire.
Understanding this mapping helps you debug federation issues, write custom clients, or build bridges between Mastodon and other ActivityPub-compatible software. The protocol is based on the W3C ActivityPub standard, and Mastodon implements a subset of its activities. This walkthrough covers the most frequent activities: Create, Announce, Like, Follow, Accept, Undo, and Delete.
Each activity carries a context, actor, object, and target. Mastodon also adds custom extensions like the “Hashtag” property and the “to” and “cc” fields for audience targeting. By the end of this article, you will be able to read a raw ActivityPub message and identify which Mastodon feature triggered it.