# delete a single post

`DELETE /posts/{id}.json`

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (path, integer, required)
  Type: integer

Request body: application/json

Type: any

- `force_destroy` (optional)
  Type: boolean
  
  The `SiteSetting.can_permanently_delete` needs to be
  enabled first before this param can be used. Also this endpoint
  needs to be called first without `force_destroy` and then followed
  up with a second call 5 minutes later with `force_destroy` to
  permanently delete.
  
  Example:
  
  ```json
  true
  ```

Additional properties: false

Responses:

- 200: success response

## Examples

### cURL

```bash
curl -X DELETE 'https://discourse.example.com/posts/0.json' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "force_destroy": true
}'
```

### JavaScript

```javascript
const body = `{
  "force_destroy": true
}`;

const response = await fetch('https://discourse.example.com/posts/0.json', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "force_destroy": true
}'''

response = requests.delete(
    'https://discourse.example.com/posts/0.json',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
