Reset an email to the default
Overview
Discard your override and go back to the default template.
Use this to start over.
You'll need the type.
The default is restored: your header, body, footer, signature and subject are cleared. Your on/off, logo and delivery settings stay, and so do template_mode and a saved full-HTML version (custom_html).
Prerequisites
- A bearer token. See Authentication.
- The account's id (
company_id), with the email templates section turned on. - The email
type, from List email types.
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/restore-default
Authentication
Partner or Account token
company_idmust be inside your own account tree. A Partner token can use any account under the partner; an Account token only its own account.- An account outside your tree, or one that doesn't exist, is rejected with
422. - The email templates section must be turned on for the account's partner (
email_templates_enabledin Get branding). When it's off, every email template call for that account returns403withThe email template section is disabled for this account. - Types managed centrally by the platform return
403(This template is managed centrally and cannot be edited here.).
Rate limit
This endpoint has no rate limit.
Request parameters
None.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
company_id | integer | Yes | The account. Must exist and be inside your account tree. |
type | string | Yes | The email type, from List email types. |
Request payload
{
"company_id": 5994,
"type": "user_welcome"
}Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
message | string | Template restored to default. |
Response payload
{
"data": {
"status": "success",
"message": "Template restored to default."
}
}Examples
Success payload
See Response payload.
Error payload
403 Email templates section is off
{
"message": "The email template section is disabled for this account.",
"status": "error",
"errors": []
}403 Type managed centrally
{
"message": "This template is managed centrally and cannot be edited here.",
"status": "error",
"errors": []
}422 type is missing
{
"message": "The type field is required.",
"errors": {
"type": [
"The type field is required."
]
}
}422 type isn't a known email type
{
"message": "The selected type is invalid.",
"errors": {
"type": [
"The selected type is invalid."
]
}
}422 Account outside your tree
{
"message": "The selected company id does not belong to your company hierarchy.",
"errors": {
"company_id": [
"The selected company id does not belong to your company hierarchy."
]
}
}| Status | Meaning |
|---|---|
200 | The default was restored. |
401 | The token is missing, expired or invalid. |
403 | The email templates section is off for this account, or the type is managed centrally. |
422 | company_id or type is missing or invalid, or the account is outside your tree. |
500 | Unexpected server error. |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/account/white-label/email-templates/restore-default" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"company_id": 5994, "type": "user_welcome"}'Updated 17 days ago
Did this page help you?
