---
schema_version: "1"
id: b015c76bf6d1042e6fdb5756f5bbf9dc6fa109671eab0492b9242c125270ddf6
title: POST /messaging/v1/securityHeaders
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/securityHeaders-update.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_security/securityHeaders-update.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5a92284edfee38b3a43fecda65b9cc4469b360000751ceeaca62f82b45ffcfb9
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# 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](#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.

```json
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

- [HTTP Security Headers Overview](https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_security/securityHeaders-overview.md)
- [Get All HTTP Security Headers](https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_security/securityHeaders-get-all.md)
- [Get HTTP Security Headers](https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_security/securityHeaders-read.md)
- [Delete HTTP Security Headers](https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_security/securityHeaders-delete.md)
