POST /messaging/v1/securityHeaders

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

JSON Parameters

Name Type Description
securityHeaders SecurityHeaders Object An array of objects that specifies the security headers to include in the domain.
pageType String The type of page to apply security headers to. Possible values are view and click.

SecurityHeaders Object

Name Type Description
id Integer The security header ID.
name String The security header name.

Usage

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

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

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

HTTP/1.1 202
{
  "data": [
    {
      "securityHeaders": [],
      "pageType": "view"
    },
    {
      "securityHeaders": [
        { "id": 6, "name": "Cache-control" },
        { "id": 3, "name": "X-Content-Type-Options" }
      ],
      "pageType": "click"
    }
  ],
  "requestId": "bf176537-995f-461e-a7f4-1476c5e90ed7"
}

Related Items