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:
| Param | Type | Required | Description |
|---|---|---|---|
category | string | No | Filter by category |
status | string | No | Filter by status |
reported_by | string | No | Filter by reporter |
from | string | No | Filter by sender |
subject | string | No | Filter by subject |
from_date | string (YYYY-MM-DD) | No | Minimum date (range) |
to_date | string (YYYY-MM-DD) | No | Maximum date (range) |
search | string | No | General 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.
| Param | Type | Required | Description | Default Value |
|---|---|---|---|---|
page | integer | No | Current page (standard pagination) | |
per_page | integer | No | Amount per page | 20 |
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
| Code | Message | Couse |
|---|---|---|
| 401 | Unauthorized | API Key invalid or missing |
| 400 | Bad Request | One or more filters have an invalid format |
| 429 | Too Many Requests | The limit of requests was exceeded |
| 500 | Internal Server Error | Unexpected server error |