Skip to main content

GET Reported Emails​

GET /companies/v1/reported-emails

Get a list of the company's reported emails grouped by current status.

➤ URL​

GET https://back-stg.whalemate.com/api/companies/v1/reported-emails

➤ Headers​

{
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}

➤ Filtering​

Filters can be applied to the route using the following structure:

filter[filter_name]=value

Each filter corresponds to a specific field and helps refine the query results. Below is an explanation of the available filters:

ParamTypeRequiredDescription
categorystringNoFilter by category
statusstringNoFilter by status
reported_bystringNoFilter by reporter
fromstringNoFilter by sender
subjectstringNoFilter by subject
from_datestring (YYYY-MM-DD)NoMinimum date (range)
to_datestring (YYYY-MM-DD)NoMaximum date (range)
searchstringNoGeneral text search

Example Usage​

Multiple filters can be combined in a single request to refine the search results. Example:

filter[from_date]=2025-01-01&filter[category]=spam,threat

This query will return reported emails between January 1, 2025, and today, whose category is "Spam" or "Threat".


➤ Pagination​

Pagination parameters allow controlling the number of results per page and navigating through pages.

ParamTypeRequiredDescriptionDefault Value
pageintegerNoCurrent page (standard pagination)
per_pageintegerNoAmount per page20

Example Usage​

filter[status]=resolved&per_page=25&page=2

This query will return the second page of results, with up to 25 reported emails per page, filtered by the "Resolved" status.


➤ Types​

{
status: string,
reported_emails: {
id: integer,
from: string,
email_from: string,
subject: string,
status: string,
reported_at: string, // datetime
reported_by: string,
category: string,
order: integer
}[]
}[]

➤ Response​

Example of successful response (200 OK)

[
{
status: "resolved",
reported_emails: [
{
id: 101,
from: "john.doe@example.com",
email_from: "example.com",
subject: "New Product Launch",
status: "resolved",
reported_at: "2025-11-14T09:30:00Z",
reported_by: "John Doe",
category: "clean",
order: 1
},
{
id: 102,
from: "support@example.com",
email_from: "example.com",
subject: "Security Update",
status: "received",
reported_at: "2025-11-14T10:15:00Z",
reported_by: "Support Account",
category: "unknown",
order: 2
}
]
}
]


➤ Common Errors​

CodeMessageCouse
401UnauthorizedAPI Key invalid or missing
400Bad RequestOne or more filters have an invalid format
429Too Many RequestsThe limit of requests was exceeded
500Internal Server ErrorUnexpected server error

➤ Test Request​