Email report delete
Overview
Delete an email report and all of its associated rows (recipients, store links, user links, account links) plus the report itself, inside a DB transaction.
Prerequisites
- A bearer token in the
Authorizationheader.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
DELETE /api/v1/email-report/delete
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
Mounted under the role-agnostic
account/*group, so any signed-in user may call it. -
The report must belong to the caller's own account, or to an account beneath it in the caller's hierarchy.
-
The endpoint rejects a
report_idoutside that hierarchy with a422and nothing is deleted.
Rate limit
- No rate limit.
Request body
- Body:
| Field | Type | Required | Description |
|---|---|---|---|
report_id | integer | yes | Must be an existing report within the caller's account hierarchy. |
{
"report_id": 42
}Response
data.status(string) —success.data.response(string) — messageReport has been deleted successfully!. If the report is already gone it falls into the catch and returns the default error response.
200 OK · 200
200{
"data": {
"status": "success",
"response": "Report has been deleted successfully!"
}
}422 Validation error · 422
422{
"message": "The selected report id is invalid.",
"errors": {
"report_id": ["The selected report id is invalid."]
}
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
422 | Validation error |
500 | Unexpected server error |
Example request
curl --request DELETE \
--url "https://production-api.shoutaboutus.com/api/v1/email-report/delete" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"report_id": 42}'Updated 11 days ago
Did this page help you?
