---
title: setHeader
slug: campaign/docs/setheader
docTags: 
createdAt: 2026-07-02T19:01:45.566Z
---

**Type**: void

**Parameters**

| Name      | Type   | Value                                                                                                           |
| --------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| sessionId | String | ID of the session                                                                                               |
| mailingId | long   | ID of the mailing                                                                                               |
| Name      | String | Field name<br /><br />Must be compliant with RFC822 (only 7bit US-ASCII characters are allowed).                |
| Value     | String | Value of the header field<br /><br />Must be compliant with RFC822 (only 7bit US-ASCII characters are allowed). |

**Return values**

- **Code structure**

```javascript
void setHeader(String sessionId, long mailingId, String name, String value)
```
