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

**Type**: long

**Parameters**

| Name         | Type   | Value                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sessionId    | String | ID of the current session                                                                                                                                                                                                                                                                                                                                                                       |
| couponSource | String | Type of the coupon block:<br />- **static** – Contains static coupon codes. These must be added manually (see *add* or *addAll*).<br />- **generated** – Coupon codes are automatically generated when sending the mailing and are unique.<br />- **ean13barcode** – Bar code blocks convert a 13-digit code number into a machine-readable bar code and insert it as a graphic into a mailing. |
| Name         | String | Name of the coupon block                                                                                                                                                                                                                                                                                                                                                                        |

**Return values**

The ID of the newly created coupon block

**Code structure**

```javascript
long create(String sessionId, String couponSource, String name)
```
