WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function retrieves email delivery records.
Warning:
On most servers, this function returns a large amount of output. We strongly recommend that you filter and sort the output.
The following example uses the filter and sort options:
https://hostname.example.com:2087/cpsess##########/json-api/emailtrack_search?api.version=1&api.filter.enable=1&api.filter.a.field=sendunixtime&api.filter.a.arg0=1628889719&api.filter.a.type=gt&api.filter.b.field=sendunixtime&api.filter.b.arg0=1629847321&api.filter.b.type=lt&api.sort.enable=1&api.sort.a.field=sendunixtime&api.sort.a.reverse=0&api.chunk.enable=1&api.chunk.size=25&api.chunk.start=1&success=1
Whether to return delivery deferral events.
1— Return delivery deferral events.0— Do not return delivery deferral events.
The type of delivery records to retrieve.
all— Retrieve all delivery records.remote— Retrieve remote delivery records.local— Retrieve local delivery records.
Whether to return delivery failure events.
1— Return delivery failure events.0— Do not return delivery failure events.
Whether to return delivery attempts in progress.
1— Return delivery attempts in progress.0— Do not return delivery attempts in progress.
The number of results to return for each type.
Note
If you set this parameter to 0, the function returns unlimited results.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/emailtrack_search
- A server running WHM.
https://whm-server.tld:2087/json-api/emailtrack_search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/emailtrack_search?defer=0&deliverytype=all&failure=0&inprogress=0&max_results_by_type=3&success=0'{ "data": { "records": [ … ] }, "metadata": { "command": "emailtrack_search", "reason": "OK", "result": 1, "version": 1 } }
The type of delivery to query. If you do not specify a value, this function returns all types.
remoteremote-or-faildeferlocal
The end date of the search window. This parameter defaults to the current time.
Note
This parameter is an alias for endtime and is provided for backwards compatibility.
The end time of the search window. This parameter defaults to the current time.
Note
You can also call this the enddate parameter.
Whether to return the TOTALSIZE parameter.
- 1 — Do not return.
- 0 — Return.
Whether to return the SUCCESSCOUNT parameter.
- 1 — Do not return.
- 0 — Return.
The start date of the search window.
Note
This parameter is an alias for starttime and is provided for backwards compatibility.
The start time of the search window.
Note
You can also call this the startdate parameter.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/emailtrack_stats
- A server running WHM.
https://whm-server.tld:2087/json-api/emailtrack_stats
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/emailtrack_stats?deliverytype=remote&enddate=1471552781&endtime=1471552781&nosize=0&nosuccess=0&startdate=1371552781&starttime=1371552781&user=username'{ "data": { "records": [ … ] }, "metadata": { "command": "emailtrack_stats", "reason": "OK", "result": 1, "version": 1 } }
The type of delivery to query. If you do not specify a value, this function returns all types.
remoteremote-or-faildeferlocal
The end time of the search window.
The sender's email address. If you do not specify a value, this function returns entries for mail from all senders.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/emailtrack_user_stats
- A server running WHM.
https://whm-server.tld:2087/json-api/emailtrack_user_stats
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/emailtrack_user_stats?deliverytype=remote&endtime=1471552781&sender=username%40example.com&starttime=1371552781'{ "data": { "records": [ … ] }, "metadata": { "command": "emailtrack_user_stats", "reason": "OK", "result": 1, "version": 1 } }