# Delete

Tells other instances that an entity was deleted.

Signals the deletion of an entity.

> In ActivityPub, this is `Delete`. In Matrix, it is a redaction. See [Other Protocols](/other-protocols#concepts).

## Definition

- Type: `"Delete"`
- Lifetime: [Transient Entity](/entities#transient-entities)

**Fields**

- `author` (`Reference`): [Reference](/entities#reference) to the `User` who is deleting the entity. Left out if the instance itself is deleting it.
- `deleted_type` (`string`, required): Type of the entity being deleted.
- `deleted` (`Reference`, required): [Reference](/entities#reference) to the entity being deleted.

Inherited from [Entity](/entities):

- [`type`](/entities#entity-type) (`string`, required)
- [`created_at`](/entities#entity-created-at) (`RFC3339`, required)
- [`extensions`](/entities#entity-extensions) (`Extensions`)

```jsonc title="Example Delete"
{
    "type": "Delete",
    "created_at": "2021-01-01T00:00:00Z",
    "author": "example.com:033wv9k6n0007",
    "deleted_type": "pub.versia:social/Note",
    "deleted": "example.com:033qtdbdkj006"
}
```

## Behavior

### Authorization

A `Delete` **MUST** come from the instance hosting the entity it deletes, which is the domain in the `deleted` [Reference](/entities#reference). A receiver **MUST** [reject](/validation#authors-and-signers) any other `Delete`.

A receiver **MUST** ignore a `Delete` whose `deleted_type` differs from the type it has stored for the entity, and delete nothing.

Which of its users may delete what is up to that instance. With no `author`, the `Delete` comes from the instance that signed it.

### Fetching Deleted Entities

An instance **SHOULD** answer a request for an entity it has deleted with `410 Gone` if it remembers the entity, and `404 Not Found` otherwise.

A `404 Not Found` can also mean that the requesting instance [may not fetch the entity](/federation#access). So an instance **MUST NOT** delete its copy of an entity because of a `404`. Only a `Delete` entity or a `410 Gone` means the entity is gone.

Whether to keep a record of an entity after deleting it is up to the receiver.
