---
title: add
slug: campaign/docs/add-couponcode
docTags: 
createdAt: 2026-07-02T19:01:45.097Z
---

This method is only valid for static coupon blocks. Existing codes will not be deleted.

**Type**: boolean

**Parameters**

| Name      | Type   | Value                                                          |
| --------- | ------ | -------------------------------------------------------------- |
| sessionId | String | ID of the current session                                      |
| blockId   | long   | ID of the coupon block                                         |
| code      | String | The coupon code you want to add (e.g., 4LFSRKT-4LFSV67-SRTHMR) |

**Return values**

- true: Coupon code was successfully added
- false: Coupon code could not be added

**Code structure**

```javascript
boolean add(String sessionId, long blockId, String code)
```
