POST /messaging/v1/securityHeaders

Update the security headers applied to a business unit’s SAP-branded view and click domains.

JSON Parameters 

NameTypeDescription
securityHeadersSecurityHeaders ObjectAn array of objects that specifies the security headers to include in the domain.
pageTypeStringThe type of page to apply security headers to. Possible values are view and click.

SecurityHeaders Object 

NameTypeDescription
idIntegerThe security header ID.
nameStringThe security header name.

Usage 

To update security headers, issue a POST request to the /messaging/v1/securityHeaders endpoint.

1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2POST /messaging/v1/securityHeaders
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5{
6  "securityHeaders": [
7    { "id": 6, "name": "Cache-control" },
8    { "id": 3, "name": "X-Content-Type-Options" }
9  ],
10  "pageType": "click"
11}

The response confirms the submitted request data and includes a request ID.

1HTTP/1.1 202
2{
3  "data": [
4    {
5      "securityHeaders": [],
6      "pageType": "view"
7    },
8    {
9      "securityHeaders": [
10        { "id": 6, "name": "Cache-control" },
11        { "id": 3, "name": "X-Content-Type-Options" }
12      ],
13      "pageType": "click"
14    }
15  ],
16  "requestId": "bf176537-995f-461e-a7f4-1476c5e90ed7"
17}

Related Items