This is one of many protocol behaviors described in ActivityPub.

Identifier

urn:uuid:64d00f29-b0f5-4407-963f-5dce7c7dae2e

Content

The undo activity and the activity being undone MUST both have the same actor.

Origin

prefix The Undo activity is used to undo a previous activity. See the Activity Vocabulary documentation on Inverse Activities and "Undo". For example, Undo may be used to undo a previous Like, Follow, or Block.

The undo activity and the activity being undone MUST both have the same actor.
 
suffix Side effects should be undone, to the extent possible. For example, if undoing a Like, any counter that had been incremented previously should be decremented appropriately.

https://www.w3.org/TR/activitypub/

JSON

{
  "id": "urn:uuid:64d00f29-b0f5-4407-963f-5dce7c7dae2e",
  "uuid": "64d00f29-b0f5-4407-963f-5dce7c7dae2e",
  "type": "Behavior",
  "content": "The undo activity and the activity being undone MUST both have the same actor.\n",
  "context": [
    "https://www.w3.org/TR/activitypub/",
    {
      "name": "6. Client to Server Interactions",
      "id": "https://www.w3.org/TR/activitypub/#client-to-server-interactions"
    },
    {
      "name": "6.10 Undo Activity",
      "id": "https://www.w3.org/TR/activitypub/#undo-activity-outbox"
    }
  ],
  "origin": {
    "source": "https://www.w3.org/TR/activitypub/",
    "section": {
      "id": "https://www.w3.org/TR/activitypub/#undo-activity-outbox",
      "name": "Undo Activity",
      "branch": [
        6,
        10
      ]
    },
    "selector": {
      "type": "TextQuoteSelector",
      "prefix": "The Undo activity is used to undo a previous activity. See the Activity Vocabulary documentation on Inverse Activities and \"Undo\". For example, Undo may be used to undo a previous Like, Follow, or Block. \n",
      "exact": "The undo activity and the activity being undone MUST both have the same actor.\n",
      "suffix": "Side effects should be undone, to the extent possible. For example, if undoing a Like, any counter that had been incremented previously should be decremented appropriately. \n"
    }
  },
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://socialweb.coop/ns/testing/context.json"
  ]
}