Send a test email to yourself
Overview
Send a real test email (subject prefixed with [Test] ) to the authenticated user's own email address. It uses sample variable values and any posted draft regions. Bypasses the enable/suppression gates and writes an EmailDeliveryLog entry for every send.
Prerequisites
- A bearer token. Callable with Partner and Account tokens.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/account/white-label/email-templates/send-test
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
Who can call it: Partner and Account tokens.
-
Authentication plus an email-template feature check.
-
company_idis scoped by an ownership check. -
Platform-owned types are forbidden (403) for non-platform companies.
-
Recipient is always
request.user.email. Returns 400 if the authenticated account has no email. -
Only the reachable companies differ per role. Recipient is always the caller's own address.
Rate limit
- No rate limit.
Request body
- Body:
| Field | Type | Required | Description |
|---|---|---|---|
company_id | integer | Yes | Must be an existing account inside your own account tree. |
type | string | Yes | Valid EmailTemplateType value. |
header | string | No | nullable, base64 HTML, max:80000, token-validated. |
body | string | No | nullable, base64 HTML, max:80000, token-validated. |
footer | string | No | nullable, base64 HTML, max:80000, token-validated. |
signature | string | No | nullable, base64 HTML, max:80000, token-validated. |
subject_override | string | No | nullable, max:255, token-validated. Plain text. |
template_mode | string | No | nullable, regions or html. |
custom_html | string | No | nullable, base64 HTML, max:400000. |
show_logo | boolean | No | Not in rules; read by the controller to override logo visibility for this test send. |
{
"company_id": 1,
"type": "user_welcome",
"body": "PHA+SGVsbG8gW3JlY2lwaWVudE5hbWVdPC9wPg==",
"show_logo": true
}Response
data.status(string) —success.data.message(string) —Test email sent to <recipient>.
200 OK · 200
200{
"data": {
"status": "success",
"message": "Test email sent to [email protected]"
}
}400 Bad Request (no email on account) · 400
400{
"status": "error",
"message": "Your account has no email address to send a test to.",
"errors": []
}422 Validation Error · 422
422{
"message": "The selected type is invalid.",
"errors": {
"type": [
"The selected type is invalid."
]
}
}Errors
| Status | Meaning |
|---|---|
400 | Bad Request (no email on account) |
401 | The bearer token is missing, expired or invalid |
403 | The template type is platform-managed, or the email-template section is disabled for your account |
422 | Validation Error |
500 | Unexpected server error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/account/white-label/email-templates/send-test" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"company_id": 1, "type": "user_welcome", "body": "PHA+SGVsbG8gW3JlY2lwaWVudE5hbWVdPC9wPg==", "show_logo": true}'Updated 10 days ago
