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 Authorization header.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://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_id outside that hierarchy with a 422 and nothing is deleted.

Rate limit

  • No rate limit.

Request body

  • Body:
FieldTypeRequiredDescription
report_idintegeryesMust be an existing report within the caller's account hierarchy.
{
  "report_id": 42
}

Response

  • data.status (string) — success.
  • data.response (string) — message Report has been deleted successfully!. If the report is already gone it falls into the catch and returns the default error response.

200 OK · 200

{
  "data": {
    "status": "success",
    "response": "Report has been deleted successfully!"
  }
}

422 Validation error · 422

{
  "message": "The selected report id is invalid.",
  "errors": {
    "report_id": ["The selected report id is invalid."]
  }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
422Validation error
500Unexpected 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}'

Did this page help you?