---
title: create
slug: campaign/docs/create-mailingws
docTags: 
createdAt: 2026-07-02T19:01:47.121Z
---

You must invoke the [setContent](docId\:My1UiPR0RfwNq-6II96h-) and [setSubject](docId\:jVJTsmMSWilBXnnrh5LaA)  etc. methods afterwards to create a valid and meaningful mailing. The following default values are assumed:

- [Content](docId\:My1UiPR0RfwNq-6II96h-): empty (text and HTML)
- [Subject](docId\:jVJTsmMSWilBXnnrh5LaA): empty
- [Open tracking](docId\:MABedLUCGvzIIxI1HCtD0): disabled
- [Click tracking](docId\:SXJv-Yigi8QPYZ68cizD9): disabled
- [Attachments](#): none

**Type**: long

**Parameters**

| Name              | Type     | Value                                                                                                                                                 |
| ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| sessionId         | String   | ID of the session                                                                                                                                     |
| mailingType       | String   | Type of the mailing (regular, event, confirmation, template)                                                                                          |
| Name              | String   | Name of the mailing                                                                                                                                   |
| mimeType          | String   | MIME type of the mailing (text/plain, text/html, multipart/alternative)                                                                               |
| recipientListIds  | long\[ ] | IDs of the recipient lists used for the mailing                                                                                                       |
| senderEmailPrefix | String   | The given value is prefixed to the sending domain configured for this client.<br /><br />Examples: info, newsletter or john.                          |
| senderName        | String   | Name of the sender<br /><br />Examples: My Company, John Doe, Newsletter                                                                              |
| charset           | String   | Character set to be used for all contents (subject + body) in ISO names<br /><br />If set to null, the client's default (usually ISO-8859-1) is used. |

**Return values**

ID of the created mailing

**Code structure**

```java
long create(String sessionId, String mailingType, String name, String mimeType, long[] recipientListIds, String senderEmailPrefix, String senderName, String charset)
```
