Skip to content

Headers are ignored for Pinpoint CreateEmailTemplateCommand and UpdateEmailTemplateCommand #6550

@Sin-

Description

@Sin-

Checkboxes for prior research

Describe the bug

I wrote a script that is going to create 250 email templates in Pinpoint.
Here is the input for the CreateEmailTemplateCommand that returns a "200 - Created" :

const input = {
        EmailTemplateRequest: {
          HtmlPart: '<p>Lorem Ipsum</p>',
          Subject: templateName,
          Headers: [
            {
              Name: 'List-Unsubscribe',
              Value:
                '<mailto:*****@***.***>,<https://**********/pinpoint/unsubscribe/{{Address}}>',
            },
            {
              Name: 'List-Unsubscribe-Post',
              Value: 'List-Unsubscribe=One-Click',
            },
          ],
        },
        TemplateName: templateName,
      };      

But when I go check in the console, everything is good with the templates, except they have no headers set.
I also tried to add them with an UpdateEmailTemplateCommand, with no success.

Am I missing something?

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/[email protected]

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

Node v20.17.0

Reproduction Steps

import { PinpointClient, CreateEmailTemplateCommand } from "@aws-sdk/client-pinpoint"; // ES Modules import
const client = new PinpointClient(config);
const input = {
        EmailTemplateRequest: {
          HtmlPart: '<p>Lorem Ipsum</p>',
          Subject: 'templateName',
          Headers: [
            {
              Name: 'List-Unsubscribe',
              Value:
                '<mailto:*****@***.***>,<https://*******.***/pinpoint/unsubscribe/{{Address}}>',
            },
            {
              Name: 'List-Unsubscribe-Post',
              Value: 'List-Unsubscribe=One-Click',
            },
          ],
        },
        TemplateName: 'templateName',
      };      
const command = new CreateEmailTemplateCommand(input);
const response = await client.send(command);

Observed Behavior

CreateEmailTemplate command worked and returned the Created message, but the Headers part of the query was ignored and no headers were set

Expected Behavior

Headers to be taken into account and set on the template

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.p3This is a minor priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions