Delete a scheduled report

Overview

Stop a scheduled email report.

Use this when a report is no longer wanted.

You'll need the report_id.

The report stops. (A second endpoint, Delete an account email report, does the same for account-user reports.)

Prerequisites

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

DELETE /api/v1/email-report/delete

Authentication

Partner or Account token

  • The report must belong to your own account, or to an account beneath it in your tree.
  • A report_id outside your tree is rejected with 422 and nothing is deleted.

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredDescription
report_idintegerYesThe report to delete. Must exist and be in your own account or an account beneath it in your tree.

Request payload

{
  "report_id": 42
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
responsestringThe confirmation message, Report has been deleted successfully!.

Response payload

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

Examples

Success payload

See Response payload.

Error payload

422 Report doesn't exist or is outside your tree

{
  "message": "The selected report id is invalid. (and 1 more error)",
  "errors": {
    "report_id": [
      "The selected report id is invalid.",
      "The selected report id does not belong to your company hierarchy."
    ]
  }
}

422 report_id missing

{
  "message": "The report id field is required.",
  "errors": {
    "report_id": [
      "The report id field is required."
    ]
  }
}

500 Report already deleted

The report was already deleted:

{
  "message": "An unexpected error occurred. Please try again later or contact your account rep.",
  "status": "error",
  "errors": []
}
StatusMeaning
200The report is deleted.
401The token is missing, expired or invalid.
422report_id is missing, or the report doesn't exist or is outside your tree.
500The report was already deleted, or an 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}'

Did this page help you?