Skip to main content

Properties Reference

This is a comprehensive reference of all properties defined in ActivityStreams 2.0.

Core Properties​

@context​

JSON-LD context definition.

{
"@context": "https://www.w3.org/ns/activitystreams"
}

Can be an array for multiple contexts:

{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
{
"toot": "http://joinmastodon.org/ns#",
"sensitive": "as:sensitive"
}
]
}

type​

The object type(s).

{ "type": "Note" }
{ "type": ["Note", "Object"] }

id​

Globally unique identifier (URI).

{ "id": "https://example.com/notes/12345" }

Object Properties​

name​

Human-readable name/title.

{ "name": "My Blog Post" }

nameMap​

Localized names.

{
"nameMap": {
"en": "Hello",
"de": "Hallo",
"ja": "こんにちは"
}
}

content​

Text content (typically HTML).

{ "content": "<p>Hello, world!</p>" }

contentMap​

Localized content.

{
"contentMap": {
"en": "<p>Hello, world!</p>",
"es": "<p>¡Hola, mundo!</p>"
}
}

summary​

Brief description or content warning.

{ "summary": "Discussion of spoilers" }

mediaType​

MIME type of content.

{ "mediaType": "text/html" }
{ "mediaType": "text/markdown" }

source​

Original source format.

{
"content": "<p><strong>Hello</strong></p>",
"source": {
"content": "**Hello**",
"mediaType": "text/markdown"
}
}

Temporal Properties​

published​

When the object was created.

{ "published": "2024-01-15T10:30:00Z" }

updated​

When the object was last modified.

{ "updated": "2024-01-15T14:45:00Z" }

startTime​

Start time for events or activities.

{ "startTime": "2024-02-01T18:00:00Z" }

endTime​

End time for events.

{ "endTime": "2024-02-01T21:00:00Z" }

duration​

Duration in ISO 8601 format.

{ "duration": "PT2H30M" }

Attribution Properties​

attributedTo​

Who created the object.

{ "attributedTo": "https://example.com/users/alice" }

Multiple authors:

{
"attributedTo": [
"https://example.com/users/alice",
"https://example.com/users/bob"
]
}

generator​

Application that created the object.

{
"generator": {
"type": "Application",
"name": "MyApp",
"url": "https://myapp.example"
}
}

Addressing Properties​

to​

Primary recipients (public).

{ "to": ["https://www.w3.org/ns/activitystreams#Public"] }

cc​

Secondary recipients (public).

{ "cc": ["https://example.com/users/alice/followers"] }

bto​

Blind primary recipients (hidden).

{ "bto": ["https://example.com/users/admin"] }

bcc​

Blind secondary recipients (hidden).

{ "bcc": ["https://example.com/users/moderator"] }

audience​

Target audience.

{ "audience": "https://lemmy.example/c/technology" }

Relationship Properties​

inReplyTo​

What this object is replying to.

{ "inReplyTo": "https://example.com/notes/123" }

replies​

Collection of replies.

{
"replies": {
"type": "Collection",
"totalItems": 5,
"first": "https://example.com/notes/123/replies?page=1"
}
}

tag​

Associated tags (mentions, hashtags, emoji).

{
"tag": [
{ "type": "Mention", "href": "https://example.com/users/bob", "name": "@bob" },
{ "type": "Hashtag", "href": "https://example.com/tags/fedi", "name": "#fedi" }
]
}

attachment​

Attached media or documents.

{
"attachment": [
{
"type": "Document",
"mediaType": "image/jpeg",
"url": "https://example.com/image.jpg"
}
]
}

Activity Properties​

actor​

Who performed the activity.

{ "actor": "https://example.com/users/alice" }

object​

What the activity is about.

{ "object": "https://example.com/notes/123" }

target​

Indirect object/destination.

{
"type": "Add",
"object": "https://example.com/notes/123",
"target": "https://example.com/collections/favorites"
}

result​

Outcome of the activity.

{
"type": "Create",
"result": {
"type": "Note",
"id": "https://example.com/notes/456"
}
}

origin​

Where the object came from.

{
"type": "Move",
"origin": "https://old.example/users/alice"
}

instrument​

Tool used to perform the activity.

{
"instrument": {
"type": "Application",
"name": "Mobile App"
}
}

Collection Properties​

totalItems​

Total number of items.

{ "totalItems": 150 }

items​

Unordered items.

{ "items": ["https://example.com/1", "https://example.com/2"] }

orderedItems​

Ordered items.

{ "orderedItems": ["https://example.com/3", "https://example.com/2", "https://example.com/1"] }

first​

First page of collection.

{ "first": "https://example.com/collection?page=1" }

last​

Last page of collection.

{ "last": "https://example.com/collection?page=10" }

current​

Current page of collection.

{ "current": "https://example.com/collection?page=5" }

next / prev​

Pagination links.

{
"next": "https://example.com/collection?page=6",
"prev": "https://example.com/collection?page=4"
}

partOf​

Parent collection for pages.

{ "partOf": "https://example.com/collection" }

Actor Properties​

inbox​

URL to receive activities.

{ "inbox": "https://example.com/users/alice/inbox" }

outbox​

URL listing published activities.

{ "outbox": "https://example.com/users/alice/outbox" }

following​

Following collection.

{ "following": "https://example.com/users/alice/following" }

followers​

Followers collection.

{ "followers": "https://example.com/users/alice/followers" }

liked​

Liked items collection.

{ "liked": "https://example.com/users/alice/liked" }

preferredUsername​

The @handle part (ASCII, no spaces).

{ "preferredUsername": "alice" }

endpoints​

Service endpoints.

{
"endpoints": {
"sharedInbox": "https://example.com/inbox"
}
}

href​

Target URL.

{ "href": "https://example.com/resource" }

rel​

Link relation.

{ "rel": "self" }

hreflang​

Target language.

{ "hreflang": "en" }

height / width​

Dimensions for media.

{ "height": 1080, "width": 1920 }

Media Properties​

url​

Resource URL(s).

{ "url": "https://example.com/image.jpg" }

Multiple URLs:

{
"url": [
{ "type": "Link", "href": "https://example.com/image.jpg", "mediaType": "image/jpeg" },
{ "type": "Link", "href": "https://example.com/image.webp", "mediaType": "image/webp" }
]
}

icon​

Avatar/icon image.

{
"icon": {
"type": "Image",
"mediaType": "image/png",
"url": "https://example.com/avatar.png"
}
}

image​

Header/banner image.

{
"image": {
"type": "Image",
"mediaType": "image/jpeg",
"url": "https://example.com/header.jpg"
}
}

preview​

Preview of the object.

{
"preview": {
"type": "Image",
"url": "https://example.com/thumbnail.jpg"
}
}

Location Properties​

location​

Physical location.

{
"location": {
"type": "Place",
"name": "San Francisco",
"latitude": 37.7749,
"longitude": -122.4194
}
}

latitude / longitude​

Geographic coordinates.

{ "latitude": 37.7749, "longitude": -122.4194 }

altitude / accuracy / radius​

Location precision.

{ "altitude": 100, "accuracy": 10, "radius": 50 }

Special Properties​

sensitive​

Content contains sensitive material.

{ "sensitive": true }

formerType​

Original type of deleted object.

{
"type": "Tombstone",
"formerType": "Note",
"deleted": "2024-01-15T14:00:00Z"
}

deleted​

When the object was deleted.

{ "deleted": "2024-01-15T14:00:00Z" }

Mastodon Extensions​

discoverable​

Show in directory.

{ "discoverable": true }

manuallyApprovesFollowers​

Locked account.

{ "manuallyApprovesFollowers": true }

Pinned posts collection.

{ "featured": "https://example.com/users/alice/collections/featured" }

movedTo / alsoKnownAs​

Account migration.

{
"movedTo": "https://new.example/users/alice",
"alsoKnownAs": ["https://old.example/users/alice"]
}

publicKey​

RSA public key for signatures.

{
"publicKey": {
"id": "https://example.com/users/alice#main-key",
"owner": "https://example.com/users/alice",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
}
}

Property Quick Reference​

PropertyApplies ToTypeRequired
idAllURIYes*
typeAllString/ArrayYes
actorActivityURI/ObjectYes
objectActivityURI/ObjectUsually
inboxActorURIYes
outboxActorURIYes
contentObjectStringCommon
publishedObjectDateTimeCommon
toObject/ActivityArrayCommon
ccObject/ActivityArrayCommon

*Not required for transient objects

Next Steps​