Skip to content

Publish Activity Works

given: "Alice" created an actor on "banach" called "Alice" with username "Alice"

send.Alice.request.create_actor
{
  "base_url": "http://banach",
  "preferred_username": "Alice",
  "profile": {},
  "automatically_accept_followers": null,
  "name": null
}
receive.Alice.response.create_actor
{
  "attachment": null,
  "published": "2026-03-20T15:19:13.434483",
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers"
    }
  ],
  "publicKey": {
    "id": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw#legacy-key-1",
    "owner": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz6/eGCfB7jdRabZR7D4k\n0Es2Qm0Ks+9/X7IhPycfV7kC7kqt42BNNQvV38WliTS3aQM8l4ZdDEmXsFQ5EBO+\nh9ci5xJ3kKcAOerN4S2eQlxrNL/jPPFkQ53IFCKCPvi63lNP88wFHyK92XgOOBiE\ns4S0b5oQxRLMLh4a67/BsK1sW5nM1WlkDsobj5sxOtaBGCpIq8mjomwbQ/JKtWBa\nPGKSSajzuwZLMQZp7qoH/PEOhBd9bOs4PuzXTUcC2ED28h/C1Y73lHRx4oKY4ogU\nbbb/MSMPJFaxweEeilQjnIzGcLW2wy9oCU3gH9HUfHcNwCa8iM8qS8iPShTzTrYG\n2wIDAQAB\n-----END PUBLIC KEY-----\n"
  },
  "id": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
  "type": "Person",
  "inbox": "http://banach/inbox/oZ2CmrNg26BJw3wYlclQLQ",
  "outbox": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw/outbox",
  "followers": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw/followers",
  "following": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw/following",
  "preferredUsername": "Alice",
  "name": "Alice",
  "identifiers": [
    "acct:Alice@banach",
    "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw"
  ],
  "endpoints": {
    "sharedInbox": "http://banach/shared_inbox"
  },
  "manuallyApprovesFollowers": true
}

given: "Bob" created an actor on "abel" called "Bob" with username "Bob"

send.Bob.request.create_actor
{
  "base_url": "http://abel",
  "preferred_username": "Bob",
  "profile": {},
  "automatically_accept_followers": null,
  "name": null
}
receive.Bob.response.create_actor
{
  "attachment": null,
  "published": "2026-03-20T15:19:14.006243",
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers"
    }
  ],
  "publicKey": {
    "id": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig#legacy-key-1",
    "owner": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyPc/VHOoVxxw7LSlzPiA\ndzZYMlPpIjuv47sawfsf9NfFuo7Lhc8dSXgguAJTQM+iG9g+lyTluWkT6q7nfmNO\n2fNF2PUh4LtJypqomUZeYKKnrZeDeJ4Mnw8evavYypKgvOsTUGv9i5J2MHCOiB3e\nnguVd7WnyvJ0E6acK/O94/5PQzTpveY2hpjfU8EUXphWPJYe4lUcHKXHTmPo/SKo\npH0iV3hnyh5JmGxE1dQnO5InAi7YeIYApHEh/z8k244CEE2BiSyCFRF4i80eLRwN\nspldfEp2qczGnJoOhHb31L2RumUceOZt0Fj7Y4qFoKq8CrHjLPRbfr5FqcRICgwN\nIQIDAQAB\n-----END PUBLIC KEY-----\n"
  },
  "id": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
  "type": "Person",
  "inbox": "http://abel/inbox/9N2iSW33Q6QTKHeIJ3VdPw",
  "outbox": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig/outbox",
  "followers": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig/followers",
  "following": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig/following",
  "preferredUsername": "Bob",
  "name": "Bob",
  "identifiers": [
    "acct:Bob@abel",
    "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig"
  ],
  "endpoints": {
    "sharedInbox": "http://abel/shared_inbox"
  },
  "manuallyApprovesFollowers": true
}

when: "Bob" sends "Alice" a Follow Activity

send.Bob.trigger.send_message
{
  "actor": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Follow",
    "actor": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
    "to": [
      "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw"
    ],
    "id": "follow:7dcc0121-3bc1-4bf4-8b10-cbd69868344c",
    "published": "2026-03-20T15:19:14Z",
    "object": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw"
  }
}
receive.Bob.outgoing.Follow
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Follow",
      "actor": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
      "to": [
        "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw"
      ],
      "id": "follow:7dcc0121-3bc1-4bf4-8b10-cbd69868344c",
      "published": "2026-03-20T15:19:14Z",
      "object": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw"
    }
  },
  "actor": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
  "event_type": "outgoing",
  "history_id": null
}

when: "Alice" sends an Accept to this Follow Activity

receive.Alice.incoming.Follow
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Follow",
      "actor": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
      "to": [
        "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw"
      ],
      "id": "follow:7dcc0121-3bc1-4bf4-8b10-cbd69868344c",
      "published": "2026-03-20T15:19:14Z",
      "object": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw"
    }
  },
  "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
  "event_type": "incoming",
  "history_id": null
}
send.Alice.trigger.send_message
{
  "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Accept",
    "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
    "to": [
      "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig"
    ],
    "published": "2026-03-20T15:19:14Z",
    "object": "follow:7dcc0121-3bc1-4bf4-8b10-cbd69868344c",
    "id": "accept:deec877c-b7c0-4cc4-b68b-5249abd6ec59"
  }
}
receive.Alice.outgoing.Accept
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Accept",
      "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
      "to": [
        "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig"
      ],
      "published": "2026-03-20T15:19:14Z",
      "object": "follow:7dcc0121-3bc1-4bf4-8b10-cbd69868344c",
      "id": "accept:deec877c-b7c0-4cc4-b68b-5249abd6ec59"
    }
  },
  "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
  "event_type": "outgoing",
  "history_id": null
}

when: "Alice" publishes a "moo" animal sound to her followers

receive.Bob.incoming.Accept
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Accept",
      "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
      "to": [
        "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig"
      ],
      "published": "2026-03-20T15:19:14Z",
      "object": "follow:7dcc0121-3bc1-4bf4-8b10-cbd69868344c",
      "id": "accept:deec877c-b7c0-4cc4-b68b-5249abd6ec59"
    }
  },
  "actor": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
  "event_type": "incoming",
  "history_id": null
}
send.Alice.trigger.publish_activity
{
  "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "AnimalSound",
    "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public"
    ],
    "cc": [
      "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw/followers"
    ],
    "published": "2026-03-20T15:19:14Z",
    "content": "moo"
  }
}
receive.Alice.outgoing.AnimalSound
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "AnimalSound",
      "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
      "to": [
        "https://www.w3.org/ns/activitystreams#Public"
      ],
      "cc": [
        "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw/followers"
      ],
      "published": "2026-03-20T15:19:14Z",
      "content": "moo",
      "id": "http://banach/simple_storage/019d0bd4-4930-73d0-801e-c88796c1cb26"
    }
  },
  "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
  "event_type": "outgoing",
  "history_id": null
}
receive.Bob.incoming.AnimalSound
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "AnimalSound",
      "actor": "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw",
      "to": [
        "https://www.w3.org/ns/activitystreams#Public"
      ],
      "cc": [
        "http://banach/actor/Rk5g18-dSjxENDi0VGTEGw/followers"
      ],
      "published": "2026-03-20T15:19:14Z",
      "content": "moo",
      "id": "http://banach/simple_storage/019d0bd4-4930-73d0-801e-c88796c1cb26"
    }
  },
  "actor": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
  "event_type": "incoming",
  "history_id": null
}

then: "Bob" receives an activity

then: the received activity is of type "AnimalSound"

then: "Bob" can retrieve the activity

send.Bob.request.fetch
{
  "actor": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
  "uri": "http://banach/simple_storage/019d0bd4-4930-73d0-801e-c88796c1cb26"
}
receive.Bob.response.fetch
{
  "actor": "http://abel/actor/TF_j-0sCX-8JfXkSc7C4ig",
  "uri": "http://banach/simple_storage/019d0bd4-4930-73d0-801e-c88796c1cb26",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Tombstone",
    "id": "http://banach/simple_storage/019d0bd4-4930-73d0-801e-c88796c1cb26"
  }
}