Skip to content

既存のEメールテンプレートの更新

post

/templates/email/update

このエンドポイントを使用して、Brazeダッシュボードのメールテンプレートを更新します。

メールテンプレートのemail_template_id 、「テンプレートとメディア」ページからアクセスできます。メールテンプレートの作成エンドポイントは、email_template_id の参照も返します。

email_template_id 以外のフィールドはすべて任意ですが、更新するフィールドを少なくとも1つ指定する必要があります。

前提条件

このエンドポイントを使用するには、templates.email.update パーミッションを持つAPI キーが必要です。

レート制限

We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in API rate limits.

リクエスト本文

1
2
Content-Type: application/json
Authorization: Bearer YOUR_REST_API_KEY
1
2
3
4
5
6
7
8
9
10
{
  "email_template_id": (required, string) Your email template's API Identifier,
  "template_name": (optional, string) The name of your email template,
  "subject": (optional, string) The email template subject line,
  "body": (optional, string) The email template body that may include HTML,
  "plaintext_body": (optional, string) A plaintext version of the email template body,
  "preheader": (optional, string) The email preheader used to generate previews in some clients,
  "tags": (optional, array of Strings) Tags must already exist,
  "should_inline_css": (optional, Boolean) If `true`, the `inline_css` feature will be applied to the template.
}

リクエストパラメータ

パラメータ|必須|データ型|説明      
email_template_id |必須|文字列|メールテンプレートのAPI識別子      
template_name オプション 文字列 メールテンプレートの名前。
subject オプション 文字列 Eメールテンプレートの件名。
body オプション 文字列 HTMLを含むことができるメールテンプレートの本文。
plaintext_body オプション String メールテンプレート本文のプレーンテキストバージョン。
preheader オプション 文字列 一部のクライアントでプレビューを生成するために使用されるメールのプレヘッダー。
tags オプション[ ](/docs/ja/user_guide/administrative/app_settings/manage_app_group/tags/)文字列 タグはすでに存在していなければならない。
should_inline_css Optional Boolean テンプレートごとにinline_css 機能を有効または無効にする。提供されない場合、BrazeはAppGroupのデフォルト設定を使用します。truefalse

リクエスト例

1
2
3
4
5
6
7
8
9
10
11
12
curl --location --request POST 'https://rest.iad-01.braze.com/templates/email/update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_REST_API_KEY' \
--data-raw '{
  "email_template_id": "email_template_id",
  "template_name": "Weekly Newsletter",
  "subject": "This Week'\''s Styles",
  "body": "Check out this week'\''s digital lookbook to inspire your outfits. Take a look at https://www.braze.com/",
  "plaintext_body": "This is the updated text within my email body and here is a link to https://www.braze.com/.",
  "preheader": "We want you to have the best looks this summer",
  "tags": ["Tag1", "Tag2"]
}'

トラブルシューティング

次の表は、返される可能性のあるエラーと、該当する場合はそれに関連するトラブルシューティングの手順を示したものです。

トラブルシューティング
テンプレート名は必須です。
タグは配列でなければならない|タグは文字列の配列としてフォーマットされなければならない、例えば["marketing", "promotional", "transactional"]
タグはすべて文字列でなければなりません|タグが引用符 ("") で囲まれていることを確認してください。
メールテンプレート作成時にタグを追加するには、そのタグがBrazeに既に存在している必要があります。
should_inline_css の値が無効です。truefalse のいずれかが期待されていた|このパラメータはブーリアン値(trueまたはfalse)のみを受け付ける。should_inline_css の値が引用符 ("") で囲まれていないことを確認する。
「このページはどの程度役に立ちましたか?」
New Stuff!