Skip to main content

Object Properties

Properties specific to Object types (Note, Article, Image, etc.).

Content Properties

PropertyTypeRequiredDescription
contentStringRecommendedMain body (HTML)
contentMapObjectLocalized content
sourceObjectOriginal format
mediaTypeStringContent MIME type

Example Note

{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Note",
"id": "https://example.com/notes/123",
"content": "<p>Hello Fediverse!</p>",
"mediaType": "text/html",
"source": {
"content": "Hello Fediverse!",
"mediaType": "text/plain"
}
}

Reply Threading

PropertyTypeDescription
inReplyToURLParent object
repliesCollectionReply collection
contextURLConversation thread
{
"type": "Note",
"inReplyTo": "https://other.example/notes/456",
"content": "<p>Great point!</p>",
"replies": {
"type": "Collection",
"first": "https://example.com/notes/123/replies"
}
}

Visibility & Sensitivity

PropertyTypeDescription
sensitiveBooleanContent warning flag
summaryStringCW text if sensitive
{
"type": "Note",
"sensitive": true,
"summary": "Spoilers for latest episode",
"content": "<p>The ending was amazing!</p>"
}

Media Objects

Image

{
"type": "Image",
"mediaType": "image/jpeg",
"url": "https://example.com/photo.jpg",
"name": "Alt text description",
"width": 1920,
"height": 1080,
"blurhash": "LEHV6nWB2yk8pyo0adR*.7kCMdnj"
}

Video

{
"type": "Video",
"mediaType": "video/mp4",
"url": [
{
"type": "Link",
"mediaType": "video/mp4",
"href": "https://example.com/video.mp4",
"width": 1920,
"height": 1080
}
],
"duration": "PT5M30S"
}

Audio

{
"type": "Audio",
"mediaType": "audio/mpeg",
"url": "https://example.com/podcast.mp3",
"duration": "PT45M"
}

Document

{
"type": "Document",
"mediaType": "application/pdf",
"url": "https://example.com/file.pdf",
"name": "Report.pdf"
}

Attachments

{
"type": "Note",
"content": "<p>Check out these photos!</p>",
"attachment": [
{
"type": "Image",
"mediaType": "image/jpeg",
"url": "https://example.com/photo1.jpg",
"name": "Beach sunset"
},
{
"type": "Image",
"mediaType": "image/jpeg",
"url": "https://example.com/photo2.jpg",
"name": "Mountain view"
}
]
}

Tags and Mentions

TypePurposeExample
HashtagTopic tag#fediverse
MentionUser mention@user@domain
EmojiCustom emoji:blobcat:
{
"tag": [
{
"type": "Hashtag",
"name": "#ActivityPub",
"href": "https://example.com/tags/activitypub"
},
{
"type": "Mention",
"name": "@alice@example.com",
"href": "https://example.com/users/alice"
},
{
"type": "Emoji",
"name": ":blobcat:",
"icon": {
"type": "Image",
"url": "https://example.com/emoji/blobcat.png"
}
}
]
}

Article vs Note

PropertyNoteArticle
nameOptionalRequired (title)
contentShort textLong-form
Length~500 charsUnlimited
Use caseMicroblogBlog post

Article Example

{
"type": "Article",
"name": "Introduction to ActivityPub",
"content": "<p>ActivityPub is a protocol...</p>",
"published": "2024-01-15T10:00:00Z",
"attributedTo": "https://example.com/users/alice"
}

See Also