---
title: assignFolder
slug: campaign/docs/assignfolder
docTags: 
createdAt: 2026-07-02T19:01:46.737Z
---

**Type**: void

**Parameters**

| Name              | Type   | Values                                                                                                                                                                                                             |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| sessionId         | String | ID of the current session                                                                                                                                                                                          |
| mailingOrFilterId | long   | ID of the mailing or target group to be assigned to the folder referenced by the parameter **folderId.**                                                                                                           |
| folderId          | long   | ID of the folder to which the mailing or target group is to be assigned.                                                                                                                                           |
| folderType        | String | The folderType parameter is used to indicate whether a folder contains mailings or target groups. So, the  value of this parameter can be mailing or filter.  The type must correspond to the item being assigned. |

**Return values**

- **Code structure**

```javascript
void assignFolder(String sessionId, long mailingOrFilterId, long folderId, String folderType)
```
