2024-08-13 15:59:25 +02:00
export const metadata = {
title: 'Delete',
description: 'Deletes are used to remove entities from the system',
}
# Delete
2024-12-10 17:44:51 +01:00
Signals the deletion of an entity. It is a [**Transient Entity**](/entities#transient-entities). {{ className: 'lead' }}
2024-08-13 15:59:25 +02:00
## Authorization
Implementations **must** ensure that the author of the `Delete` entity has the authorization to delete the target entity.
Having the authorization is defined as:
2024-08-23 16:43:37 +02:00
- The author is the creator of the target entity (including [delegation](/federation/delegation)).
2024-08-17 14:48:43 +02:00
- The author is the instance.
2024-08-13 15:59:25 +02:00
## Entity Definition
2025-05-05 14:08:20 +02:00
<Warning>
This entity is a [**Transient Entity**](/entities#transient-entities).
</Warning>
2024-08-13 15:59:25 +02:00
<Row>
<Col>
2024-12-24 14:01:09 +01:00
<Properties name="Delete">
2025-05-05 14:33:22 +02:00
<Property name="author" type="Reference | null" required={true} typeLink="/types#reference">
[Reference](/types#reference) to the `User` who is deleting the entity. [Can be set to `null` to represent the instance](/entities/instance-metadata#the-null-author).
2024-08-13 15:59:25 +02:00
</Property>
2024-08-22 21:58:16 +02:00
<Property name="deleted_type" type="string" required={true}>
2024-08-24 14:29:54 +02:00
Type of the entity being deleted.
2024-08-22 21:58:16 +02:00
</Property>
2025-05-05 14:33:22 +02:00
<Property name="deleted" type="Reference" required={true} typeLink="/types#reference">
[Reference](/types#reference) to the entity being deleted.
2024-08-13 15:59:25 +02:00
</Property>
</Properties>
</Col>
<Col sticky>
```jsonc {{ title: 'Example Delete' }}
{
"type": "Delete",
"created_at": "2021-01-01T00:00:00.000Z",
2025-04-21 18:17:45 +02:00
"author": "6e0204a2-746c-4972-8602-c4f37fc63bbe",
2025-05-05 14:08:20 +02:00
"deleted_type": "Note",
2025-04-21 18:17:45 +02:00
"deleted": "02e1e3b2-cb1f-4e4a-b82e-98866bee5de7"
2024-08-13 15:59:25 +02:00
}
```
</Col>
</Row>