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
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://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
campaigngroup; The endpoint marks the itemnoauth). Reached by end customers via the review-request link. Theunique_codeis the only identifier that scopes the write to a store.
Rate limit
- 30 requests/min per IP (public).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
unique_code | string | Required | max 50. Email or SMS request unique code; resolves the target store. |
direct_to_option | string | Required | one of owner, manager, customer. Picks the recipient set. |
email | string | Required | email:rfc,dns, max 100. Customer's email. |
first_name | string | Required | max 100. |
last_name | string | Required | max 100. |
phone | string | Required | min 7, max 20. |
comments | string | Required | max 255. |
g_recaptcha_response | string | Required | Google 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" whenunique_coderesolves 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
200{
"data": {
"status": "success",
"message": "Thank you for your feedback! Your message has been sent directly to the owner."
}
}400 Request not found · 400
400{
"status": "error",
"message": "Bad Request",
"errors": "Email or SMS request not found"
}422 Validation · 422
422{
"message": "The g recaptcha response field is required.",
"errors": {
"g_recaptcha_response": [
"The g recaptcha response field is required."
]
}
}Errors
| Status | Meaning |
|---|---|
400 | Request not found |
422 | Validation |
500 | Unexpected 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..."}'Updated 11 days ago
Did this page help you?
