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

**Type**: long

**Parameters**

| Name      | Type    | Value                                                                                             |
| --------- | ------- | ------------------------------------------------------------------------------------------------- |
| sessionId | String  | ID of the session                                                                                 |
| Name      | String  | Internal name of the attachment to be added                                                       |
| mimeType  | String  | Corresponding MIME type of the file<br /><br />Example: image/gif or text/comma-separated-values. |
| filename  | String  | File name to be used for the attachment                                                           |
| content   | byte\[] | Content of the attachment (in binary form)                                                        |

**Return values**

ID of the created attachment

**Code structure**

```java
long create(String sessionId, String name, String mimeType, String filename, byte[] content)
```
