---
title: prepareNewWave
slug: campaign-dev-docs/preparenewwave
createdAt: 2026-07-02T19:01:46.338Z
---

**Type**: long

**Parameters**

| Name              | Type   | Value                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sessionId         | String | ID of the session                                                                                                                                                                                                                                                                                                                                                                                                          |
| templateMailingId | long   | Mailing ID<br />This ID can be found in the mailing overview or can be retrieved by calling the MailingWebservice [getIds](https://docs.optimizely.com/campaign-dev-docs/getids-mailingws) or [getIdsInStatus](https://docs.optimizely.com/campaign-dev-docs/getidsinstatus) methods. This ID is also returned when creating a new mailing (see [create](https://docs.optimizely.com/campaign-dev-docs/create-mailingws)). |

**Return values**

**waveId** – This ID identifies the closed loop process and is used by other methods of this web service.

**Code structure**

```java
long prepareNewWave(String sessionId, long templateMailingId)
```
