Direct-to-company email

Overview

Record an internal customer_comment tied to an Email or SMS review request (looked up by unique_code). Then emails the resolved recipients (store owner and/or configured manager/other-manager addresses, based on direct_to_option) using the DIRECT_TO_COMPANY template. Customer-facing feedback path.

Prerequisites

  • No authentication — this endpoint is public.

Base URL

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

Endpoint

POST /api/v1/campaign/direct-to-company-email

Authentication

  • No bearer token required.

  • Public — no bearer token (route sits in the unauthenticated campaign group; The endpoint marks the item noauth). Reached by end customers via the review-request link. The unique_code is the only identifier that scopes the write to a store.

Rate limit

  • 30 requests/min per IP (public).

Request body

FieldTypeRequiredDescription
unique_codestringRequiredmax 50. Email or SMS request unique code; resolves the target store.
direct_to_optionstringRequiredone of owner, manager, customer. Picks the recipient set.
emailstringRequiredemail:rfc,dns, max 100. Customer's email.
first_namestringRequiredmax 100.
last_namestringRequiredmax 100.
phonestringRequiredmin 7, max 20.
commentsstringRequiredmax 255.
g_recaptcha_responsestringRequiredGoogle reCAPTCHA token; verified server-side via siteverify.
{
  "unique_code": "<emailRequestUniqueCode>",
  "direct_to_option": "owner",
  "email": "[email protected]",
  "first_name": "Jane",
  "last_name": "Doe",
  "phone": "+15551234567",
  "comments": "I had an issue with my recent visit and would like to discuss it.",
  "g_recaptcha_response": "03AGdBq24..."
}

How it works

  • 200 { status: "success", message } (".sent directly to the {owner|manager|customer}.").
  • 400 (badRequestResponse) "Email or SMS request not found" when unique_code resolves to neither an email nor an SMS request.
  • 500 (errorResponse) "Mail not sent! {Option} Email is not available" when no recipient address can be resolved, or "Failed to add customer comment" on save failure.
  • 422 on validation failure (including an invalid reCAPTCHA token).

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "message": "Thank you for your feedback! Your message has been sent directly to the owner."
  }
}

400 Request not found · 400

{
  "status": "error",
  "message": "Bad Request",
  "errors": "Email or SMS request not found"
}

422 Validation · 422

{
  "message": "The g recaptcha response field is required.",
  "errors": {
    "g_recaptcha_response": [
      "The g recaptcha response field is required."
    ]
  }
}

Errors

StatusMeaning
400Request not found
422Validation
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/campaign/direct-to-company-email" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"unique_code": "<emailRequestUniqueCode>", "direct_to_option": "owner", "email": "[email protected]", "first_name": "Jane", "last_name": "Doe", "phone": "+15551234567", "comments": "I had an issue with my recent visit and would like to discuss it.", "g_recaptcha_response": "03AGdBq24..."}'

Did this page help you?