---
title: setMimeType
slug: campaign/docs/setmimetype-attachments
docTags: 
createdAt: 2026-07-02T19:01:45.097Z
---

**Type**: void

**Parameters**

| Name         | Type   | Value                                                                                            |
| ------------ | ------ | ------------------------------------------------------------------------------------------------ |
| sessionId    | String | ID of the session                                                                                |
| attachmentId | long   | ID of the attachment                                                                             |
| mimeType     | String | Corresponding MIME type of the file<br /><br />Example: image/gif or text/comma-separated-values |

**Return values**

- **Code structure**

```java
void setMimeType(String sessionId, long attachmentId, String mimeType)
```
