mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-05 15:38:34 +08:00
feat: add admin mail detail API (#1099)
* feat: add admin mail detail API * docs: clarify admin mail detail response
This commit is contained in:
@@ -49,6 +49,27 @@ print(response.json())
|
||||
|
||||
**Note**: Keyword filtering has been removed from the backend API. If you need to filter emails by content, please use the frontend filter input in the UI, which filters the currently displayed page.
|
||||
|
||||
## Admin Get Mail API
|
||||
|
||||
Fetch a single mail by mail ID without a mailbox JWT. Authenticate with `x-admin-auth`.
|
||||
The response matches one entry returned by `/admin/mails`: gzip-compressed raw content is decompressed into `raw`, and `raw_blob` is excluded.
|
||||
|
||||
```python
|
||||
import requests
|
||||
|
||||
mail_id = 1
|
||||
url = f"https://<your-worker-address>/admin/mails/{mail_id}"
|
||||
|
||||
headers = {
|
||||
"x-admin-auth": "<your-Admin-password>",
|
||||
# "x-custom-auth": "<your-website-password>", # If private site password is enabled
|
||||
}
|
||||
|
||||
response = requests.get(url, headers=headers)
|
||||
|
||||
print(response.json())
|
||||
```
|
||||
|
||||
## Admin Delete Mail API
|
||||
|
||||
Delete a single mail by mail ID.
|
||||
|
||||
Reference in New Issue
Block a user