Skip to main content

Verified against AS2 Core & Vocabulary (W3C REC 2017), the published AS2 JSON-LD context, ActivityPub REC, Mastodon v4.7.3 source (context_helper.rb, account.rb, json_ld_helper.rb), mastodon.social /actor (fetched 2026-10-15) on 2026-10-15.

Actor Types

Actors are the entities that perform activities in ActivityPub. They represent users, organizations, bots, and services that can create content and interact with others.

Actor Types Overviewโ€‹

ACTOR TYPESPersonHuman userGroupCommunitiesOrganizationBusinessApplicationBotsServiceAutomated๐Ÿ‘ค Person: Individual accounts๐Ÿ‘ฅ Group: Lemmy communities, PeerTube channels๐Ÿค– Application/Service: Bots, relays, system actors

Personโ€‹

Represents an individual human user.

{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"type": "Person",
"id": "https://example.com/users/alice",
"preferredUsername": "alice",
"name": "Alice",
"summary": "<p>Software developer and fediverse enthusiast</p>",
"inbox": "https://example.com/users/alice/inbox",
"outbox": "https://example.com/users/alice/outbox",
"followers": "https://example.com/users/alice/followers",
"following": "https://example.com/users/alice/following",
"liked": "https://example.com/users/alice/liked",
"icon": {
"type": "Image",
"mediaType": "image/png",
"url": "https://example.com/avatars/alice.png"
},
"image": {
"type": "Image",
"mediaType": "image/jpeg",
"url": "https://example.com/headers/alice.jpg"
},
"publicKey": {
"id": "https://example.com/users/alice#main-key",
"owner": "https://example.com/users/alice",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
},
"endpoints": {
"sharedInbox": "https://example.com/inbox"
}
}

Used by: All social platforms for user accounts

Groupโ€‹

Represents a collection of actors, often used for communities.

{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"type": "Group",
"id": "https://lemmy.example/c/technology",
"preferredUsername": "technology",
"name": "Technology",
"summary": "<p>A community for tech discussion</p>",
"inbox": "https://lemmy.example/c/technology/inbox",
"outbox": "https://lemmy.example/c/technology/outbox",
"followers": "https://lemmy.example/c/technology/followers",
"attributedTo": "https://lemmy.example/c/technology/moderators",
"publicKey": {
"id": "https://lemmy.example/c/technology#main-key",
"owner": "https://lemmy.example/c/technology",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
}
}

Used by:

  • Lemmy (communities)
  • PeerTube (channels)
  • Groups in various platforms

Organizationโ€‹

Represents a company, institution, or organization.

{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"type": "Organization",
"id": "https://example.com/orgs/acme",
"preferredUsername": "acme",
"name": "ACME Corporation",
"summary": "<p>Building better products</p>",
"inbox": "https://example.com/orgs/acme/inbox",
"outbox": "https://example.com/orgs/acme/outbox",
"url": "https://acme.example.com",
"publicKey": {
"id": "https://example.com/orgs/acme#main-key",
"owner": "https://example.com/orgs/acme",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
}
}

Used by: Business accounts, official accounts

Applicationโ€‹

Represents a software application. AS2 doesn't say what it's for; in practice it is used for bots and instance actors. Mastodon treats both Application and Service actors as bots (AUTOMATED_ACTOR_TYPES in account.rb).

{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"type": "Application",
"id": "https://example.com/bots/newsbot",
"preferredUsername": "newsbot",
"name": "News Bot",
"summary": "<p>Automated news aggregator</p>",
"inbox": "https://example.com/bots/newsbot/inbox",
"outbox": "https://example.com/bots/newsbot/outbox",
"publicKey": {
"id": "https://example.com/bots/newsbot#main-key",
"owner": "https://example.com/bots/newsbot",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
}
}

Used by: Bots, automated accounts

Serviceโ€‹

Represents a service or daemon process.

{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"type": "Service",
"id": "https://relay.example/actor",
"preferredUsername": "relay",
"name": "Fediverse Relay",
"summary": "<p>ActivityPub relay service</p>",
"inbox": "https://relay.example/inbox",
"outbox": "https://relay.example/outbox",
"publicKey": {
"id": "https://relay.example/actor#main-key",
"owner": "https://relay.example/actor",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
}
}

Used by: Relay servers, system accounts

Required Actor Propertiesโ€‹

ActivityPub requires id and type on every object (AP ยง3.1) and inbox and outbox on every actor (AP ยง4.1):

PropertyDescription
idUnique, dereferenceable URL
typeOne of the actor types
inboxURL to receive activities
outboxURL listing published activities

followers and following are SHOULDs in the spec. Mastodon additionally rejects actors without preferredUsername (see Troubleshooting).

PropertyDescription
preferredUsernameThe @handle part
nameDisplay name
summaryBio/description (HTML)
urlProfile page URL
iconAvatar image
imageHeader/banner image
publicKeyRSA key for HTTP Signatures (Ed25519 and other keys go in assertionMethod โ€” see Keys and Identity)
endpoints.sharedInboxShared inbox URL
followersFollowers collection URL
followingFollowing collection URL

Mastodon-Specific Propertiesโ€‹

{
"type": "Person",
"discoverable": true,
"manuallyApprovesFollowers": false,
"featured": "https://example.com/users/alice/collections/featured",
"featuredTags": "https://example.com/users/alice/collections/tags",
"alsoKnownAs": [],
"attachment": [
{
"type": "PropertyValue",
"name": "Website",
"value": "<a href=\"https://alice.example\">alice.example</a>"
}
]
}
PropertyDescription
discoverableShow in directory/search
manuallyApprovesFollowersLocked account
featuredPinned posts collection
featuredTagsFeatured hashtags
movedToMigration target
alsoKnownAsAliases for migration
attachmentProfile fields
indexableOpt in to full-text search of the account's public posts
memorialAccount has been memorialized
attributionDomainsDomains allowed to credit this account as author of linked articles

These are extensions, not AS2 core, and they come from different namespaces. Per Mastodon's context_helper.rb:

  • as: (proposed AS2 extensions): manuallyApprovesFollowers, movedTo. (alsoKnownAs is also defined in the published AS2 context.)
  • toot: (http://joinmastodon.org/ns#): discoverable, indexable, memorial, featured, featuredTags, attributionDomains, suspended
  • schema: (http://schema.org#): PropertyValue and its value, used in attachment for profile fields

Profile Fieldsโ€‹

Mastodon uses attachment with PropertyValue type for profile fields:

{
"attachment": [
{
"type": "PropertyValue",
"name": "Website",
"value": "<a href=\"https://example.com\" rel=\"me\">example.com</a>"
},
{
"type": "PropertyValue",
"name": "Location",
"value": "San Francisco"
},
{
"type": "PropertyValue",
"name": "Pronouns",
"value": "she/her"
}
]
}

Mastodon marks a link field as verified when the linked page links back to the profile with rel="me". The verification happens on the server that displays the profile; nothing about it federates.

Public Key Structureโ€‹

Required for HTTP Signatures:

{
"publicKey": {
"id": "https://example.com/users/alice#main-key",
"owner": "https://example.com/users/alice",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----"
}
}
PropertyDescription
idKey identifier โ€” usually the actor URL plus #main-key, but it may be a separate URL (GoToSocial uses โ€ฆ/main-key)
ownerThe actor who owns this key
publicKeyPemPEM-encoded RSA public key

Instance Actorโ€‹

Servers often have a special instance-level actor:

{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"type": "Application",
"id": "https://example.com/actor",
"preferredUsername": "example.com",
"inbox": "https://example.com/actor/inbox",
"outbox": "https://example.com/actor/outbox",
"endpoints": {
"sharedInbox": "https://example.com/inbox"
},
"publicKey": {
"id": "https://example.com/actor#main-key",
"owner": "https://example.com/actor",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
}
}

This mirrors what mastodon.social serves at /actor (an Application whose preferredUsername is the domain).

Used for:

  • Sending Flag (report) activities
  • Following relays
  • Signing fetches when authorized fetch is on โ€” see Authorized Fetch

Actor Type Comparisonโ€‹

TypeUse CaseHas FollowersCreates Content
PersonUsersYesYes
GroupCommunitiesYesRedistributes
OrganizationCompaniesYesYes
ApplicationBots, instance actorsYesYes
ServiceBots, relays, system actorsSometimesSometimes

Content Negotiationโ€‹

Actors must be served with correct content type based on Accept header:

app.get('/users/:username', (req, res) => {
const accept = req.headers.accept || '';

// The same URL serves HTML and JSON, so tell caches to key on Accept
res.vary('Accept');

if (accept.includes('application/activity+json') ||
accept.includes('application/ld+json')) {
res.type('application/activity+json');
return res.json(getActor(req.params.username));
}

// Return HTML profile page
res.render('profile', { username: req.params.username });
});

Next Stepsโ€‹