/customers/{customer_id}/emails
/customers/{customer_id}/emails
List all submitted emails for a given customer.
Returns a list of all emails submitted for the given customer id with the optional filters applied. The limit and offset parameters are used for stepping through blocks of emails / paging through the results. If the offset is greater than the amount of entries that exist then an empty array should be returned. If there are no emails associated with the given customer id, an empty array should be returned. All other parameters are used to filter the results and should be applied before the limit and offset parameters. e.g. if 300 emails exists and 200 are labelled as malicious then a request of limit=100 and only_malicious=true should return 100 emails. If limit=100, only_malicious=true, and offset=200 then the response should be 0 emails (an empty array). **The filters are additive and as such if the filter is not in the request then it should not be applied. e.g. if only_malicious=true is not in the request then all emails should be returned regardless of their malicious status. The exception to this is the limit and offset parameters which have defaults which are applied if they are not in the request.**
Curl Request Example
curl -X GET \
-H "Accept: application/json" \
"http://email.api.spamoverflow.com/api/v1/customers/{customer_id}/emails?limit=20&offset=0&start=2024-02-21T13:10:05Z&end=2024-02-21T14:10:05Z&from=no-reply@uq.edu.au&to=support@uq.edu.au&state=scanned&only_malicious=true"
Path parameters
Name | Description |
---|---|
customer_id* |
String
The customer identifier is a UUIDv4.
Required
|
Query parameters
Name | Description |
---|---|
limit |
Integer
Returns only this many results, 0 < limit <= 1000. **Default is 100**.
|
offset |
Integer
Skip this many results before returning, 0 <= offset. **Default is 0**.
|
start |
Date
(date-time)
Only return emails submitted from this date.
The date should be in RFC3339 format.
|
end |
Date
(date-time)
Only return emails submitted before this date.
The date should be in RFC3339 format.
|
from |
String
(email)
Only return emails submitted from this email address.
The email address should be in the format of user@domain.
|
to |
String
(email)
Only return emails submitted to this email address.
The email address should be in the format of user@domain.
|
state |
String
Only return emails with this state.
The state should be one of 'pending', 'scanned', 'failed'.
|
only_malicious |
Boolean
Only return emails that have been flagged as malicious.
|
Responses