Update one email template
/account/emails/{kind}Costs 2 rate-limit points · Rate limits
Set the store's own subject and/or body for one email kind: invoice, quote, credit_note or payment_reminder. Liquid placeholders are allowed and checked. Sending the default text (or an empty string) returns that field to the default for the language. The text is only sent when custom_text is true (PATCH /account/emails); each template says in_use. Returns the emails section.
Used for every email of that kind from now on, as long as custom text is on (custom_text in PATCH /account/emails).
Also searched aschange the invoice email textedit email subjectedit the payment reminder emailcustomise the quote emailreset the email body to defaultset credit note email wording
Path parameters
kindstringRequiredinvoice, quote, credit_note or payment_reminder.
Request body
subjectstringThe email subject; Liquid placeholders such as {{order_number}} are allowed.
bodystringThe email body; Liquid placeholders are allowed.
Returns
localestringExample:encustom_textbooleanExample:falsetemplatesobjectShow 4 child attributesHide child attributes
invoiceobjectShow 4 child attributesHide child attributes
subjectstringExample:Invoice {{invoice_number}}bodystringExample:Thanks!customizedbooleanExample:truein_usebooleanExample:false
quoteobjectShow 4 child attributesHide child attributes
subjectstringExample:{{shop_name}} - Quote for your Order {{order_number}}bodystringExample:Hello, Thank you for shopping at {{shop_name}}. We have …customizedbooleanExample:falsein_usebooleanExample:false
credit_noteobjectShow 4 child attributesHide child attributes
subjectstringExample:{{shop_name}} - Credit Note {{order_number}}bodystringExample:Hello, Please find attached the credit note for your ord…customizedbooleanExample:falsein_usebooleanExample:false
payment_reminderobjectShow 4 child attributesHide child attributes
subjectstringExample:{{shop_name}} - Reminder for your Invoice {{order_number}}bodystringExample:Hello, Thank you for shopping at {{shop_name}}. This is …customizedbooleanExample:falsein_usebooleanExample:false
noticestringExample:Saved, but not used yet: emails send the default text unt…
Errors
Missing or unknown X-Auth-Token, or the shop uninstalled the app.
v3_required: the shop still runs the previous dashboard. paid_plan_required: API access needs a paid plan.
The resource does not exist for this shop, or no action is registered at this path.
The request failed validation. Nothing was saved.
Rate limited: cost-weighted per key (reads cost less than writes). Wait Retry-After seconds; see X-RateLimit-* headers.
Every error has the same shape: see Errors.
curl -X PATCH "https://app.invoicefalcon.com/api/v3/external/account/emails/{kind}" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "Your invoice {{invoice_number}} from {{shop_name}}"
}'const res = await fetch("https://app.invoicefalcon.com/api/v3/external/account/emails/{kind}", {
method: "PATCH",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"subject": "Your invoice {{invoice_number}} from {{shop_name}}"
}),
});
const data = await res.json();import os
import requests
res = requests.patch(
"https://app.invoicefalcon.com/api/v3/external/account/emails/{kind}",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={
"subject": "Your invoice {{invoice_number}} from {{shop_name}}"
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v3/external/account/emails/{kind}")
req = Net::HTTP::Patch.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {
subject: "Your invoice {{invoice_number}} from {{shop_name}}"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)curl -X PATCH "https://app.invoicefalcon.com/api/v3/external/account/emails/{kind}" \
-H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "Invoice for order {{order_number}}",
"body": "Hi {{customer_name}},\n\nYour invoice for order {{order_number}} is attached."
}'const res = await fetch("https://app.invoicefalcon.com/api/v3/external/account/emails/{kind}", {
method: "PATCH",
headers: {
"X-Auth-Token": process.env.INVOICE_FALCON_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"subject": "Invoice for order {{order_number}}",
"body": "Hi {{customer_name}},\n\nYour invoice for order {{order_number}} is attached."
}),
});
const data = await res.json();import os
import requests
res = requests.patch(
"https://app.invoicefalcon.com/api/v3/external/account/emails/{kind}",
headers={"X-Auth-Token": os.environ["INVOICE_FALCON_API_KEY"]},
json={
"subject": "Invoice for order {{order_number}}",
"body": "Hi {{customer_name}},\n\nYour invoice for order {{order_number}} is attached."
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.invoicefalcon.com/api/v3/external/account/emails/{kind}")
req = Net::HTTP::Patch.new(uri, "X-Auth-Token" => ENV["INVOICE_FALCON_API_KEY"], "Content-Type" => "application/json")
req.body = {
subject: "Invoice for order {{order_number}}",
body: "Hi {{customer_name}},\n\nYour invoice for order {{order_number}} is attached."
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"locale": "en",
"custom_text": false,
"templates": {
"invoice": {
"subject": "Invoice {{invoice_number}}",
"body": "Thanks!",
"customized": true,
"in_use": false
},
"quote": {
"subject": "{{shop_name}} - Quote for your Order {{order_number}}",
"body": "Hello,\n\nThank you for shopping at {{shop_name}}. We have attached the Quote for your Order {{order_number}} to this email.\n\nRegards,\nThe {{shop_name}} Team",
"customized": false,
"in_use": false
},
"credit_note": {
"subject": "{{shop_name}} - Credit Note {{order_number}}",
"body": "Hello,\n\nPlease find attached the credit note for your order to this email.\n\nRegards,\nThe {{shop_name}} Team",
"customized": false,
"in_use": false
},
"payment_reminder": {
"subject": "{{shop_name}} - Reminder for your Invoice {{order_number}}",
"body": "Hello,\n\nThank you for shopping at {{shop_name}}. This is a gentle reminder that your invoice {{invoice_number}} is past due.\n\nIf you have already paid this invoice, please disregard this message.\n\nBest,\nThe {{shop_name}} Team",
"customized": false,
"in_use": false
}
},
"notice": "Saved, but not used yet: emails send the default text until custom_text is true (PATCH /account/emails {\"custom_text\": true})."
}{
"errors": [
"Invalid API key"
],
"code": "unauthorized"
}{
"errors": [
"API access requires a paid plan"
],
"code": "paid_plan_required"
}{
"errors": [
"Resource not found"
],
"code": "not_found"
}{
"errors": [
"id is missing"
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited"
}