Email a problem to someone

Overview

Send the details of a problem by email, to your team or to the affected business owner.

Use this to hand a problem to whoever can fix it, for example the owner who needs to reconnect Google.

You'll need the notification id and the recipient: admin sends it to the location's configured recipients for response-posting errors, other to the address in email.

The email is sent, with the problem's alert content.

Prerequisites

Base URL

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

Endpoint

POST /api/v1/partner/error-notifications/send-email-notification

Authentication

Partner token

  • Use it only for your own partner's problems, from List open problems. A problem outside your account tree returns 404.

Rate limit

60 requests per minute, counted per user (the token’s user). See Rate limits.

Request parameters

None.

Request body

FieldTypeRequiredDescription
notification_idintegerYesThe problem's id. Must exist.
email_tostringYesadmin (the location's response-posting error recipients) or other (the address in email).
emailstringNoWho to send it to. Required when email_to is other. Must be a valid address on a domain that accepts mail (it's checked with a DNS lookup), so test domains like example.com are rejected with 422.

Request payload

{
  "notification_id": 1215,
  "email_to": "other",
  "email": "<recipient-email>"
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
messagestringEmail sent successfully!

Response payload

{
  "data": {
    "status": "success",
    "message": "Email sent successfully!"
  }
}

Examples

Success payload

See Response payload.

Error payload

400 Problem has no content

{
  "message": "Bad Request",
  "status": "error",
  "errors": "No notification is available"
}

400 No recipient

{
  "message": "Bad Request",
  "status": "error",
  "errors": "User does not exist."
}

404 Problem outside your account

{
  "message": "Notification not found.",
  "status": "error",
  "errors": []
}

422 Missing fields

{
  "message": "The notification id field is required. (and 1 more error)",
  "errors": {
    "notification_id": [
      "The notification id field is required."
    ],
    "email_to": [
      "The email to field is required."
    ]
  }
}

422 Invalid values

{
  "message": "The selected notification id is invalid. (and 1 more error)",
  "errors": {
    "notification_id": [
      "The selected notification id is invalid."
    ],
    "email": [
      "The email field must be a valid email address."
    ]
  }
}

429 Too many requests

{
  "message": "Too Many Attempts."
}
StatusMeaning
200The email was sent.
400The problem has no content (No notification is available), its location no longer exists (Location does not exist.), or there's no one to send it to (User does not exist.).
401The token is missing, expired or invalid.
404The problem isn't in your account tree.
422A field is missing or invalid, or notification_id doesn't exist.
429More than 60 requests in a minute from this user.
500Unexpected server error.

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/partner/error-notifications/send-email-notification" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"notification_id": 1215, "email_to": "other", "email": "<recipient-email>"}'

Did this page help you?