curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "password_reset",
"subject": "Reset your password for Acme Bookings",
"html": "<!doctype html><html><body>Hi Alex, reset your password for Acme Bookings.</body></html>",
"authored_template_id": "68c1f0a2b3d4e5f6a7b8c9d0",
"authored_status": "live"
}Preview application email
Renders one of the app’s application emails as recipients get it, with sample values for their details.
Base44 sends four application emails for the app: password reset (password_reset), sign-up verification (email_verification), invitation (user_invite), and access approval (access_approved). They use the app’s brand automatically. An app can send its own version of each instead, created with Customize application email. The preview shows the app’s version whenever it’s the one sent.
This is limited to 20 requests per minute per app for each workspace’s personal API keys, so every key in a workspace shares one allowance. Some workspaces have a different limit.
curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/emails/system/{email_type}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "password_reset",
"subject": "Reset your password for Acme Bookings",
"html": "<!doctype html><html><body>Hi Alex, reset your password for Acme Bookings.</body></html>",
"authored_template_id": "68c1f0a2b3d4e5f6a7b8c9d0",
"authored_status": "live"
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
ID of the app the emails belong to.
The application email: password_reset, email_verification, user_invite, or access_approved.
Response
The rendered email.
An application email as the app sends it.
The application email.
password_reset, email_verification, user_invite, access_approved "password_reset"
The subject line recipients see.
"Reset your password for Acme Bookings"
The email as HTML, with sample values in place of the recipient's details, such as the name Alex and a sample code or link.
"<!doctype html><html><body>Hi Alex, reset your password for Acme Bookings.</body></html>"
ID of the app's own template for this email, or null when the app has none. Having one doesn't mean it's sent: for email_verification, authored_status says which version goes out. Delete it with Delete email template to go back to the Base44 version.
"68c1f0a2b3d4e5f6a7b8c9d0"
Only for email_verification, which goes to people who haven't signed up yet, so the app's own version has extra requirements. live when the app's own version is sent. Otherwise, the reason the Base44 version is sent instead: no_email_domain until the app sends from its own email domain, awaiting_screen while the app's version is being reviewed, which can take up to an hour, rejected when it didn't pass review, missing_code when it doesn't show the verification code, over_daily_budget when it reached today's sending limit, too_large when it's too large to send, and mjml when it's written in MJML rather than HTML. no_email_domain is reported even when the app has no version of its own. null for the other emails, and for email_verification when the app's plan doesn't include its own version, or when the app sends from its own email domain but has no version of its own.
live, no_email_domain, awaiting_screen, rejected, missing_code, over_daily_budget, too_large, mjml "live"
Was this page helpful?