# Mail API ## Viewing Emails via Mail API This is a `python` example using the `requests` library to view emails. ```python limit = 10 offset = 0 res = requests.get( f"https:///api/mails?limit={limit}&offset={offset}", headers={ "Authorization": f"Bearer {your-JWT-password}", # "x-custom-auth": "", # If custom password is enabled "Content-Type": "application/json" } ) ``` ## Admin Mail API Supports `address` filter ```python import requests url = "https:///admin/mails" querystring = { "limit":"20", "offset":"0", # address is optional parameter "address":"xxxx@awsl.uk" } headers = {"x-admin-auth": ""} response = requests.get(url, headers=headers, params=querystring) 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. ## User Mail API Supports `address` filter ```python import requests url = "https:///user_api/mails" querystring = { "limit":"20", "offset":"0", # address is optional parameter "address":"xxxx@awsl.uk" } headers = {"x-admin-auth": ""} response = requests.get(url, headers=headers, params=querystring) 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.