# ThreadsMessagesImagesApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createThreadMessageImage**](#createthreadmessageimage) | **POST** /threads/{threadId}/messages/{messageId}/images/{imageId} | Attach an image to a thread message|
|[**deleteThreadMessageImage**](#deletethreadmessageimage) | **DELETE** /threads/{threadId}/messages/{messageId}/images/{imageId} | Remove an image from a thread message|
|[**getThreadMessageImages**](#getthreadmessageimages) | **GET** /threads/{threadId}/messages/{messageId}/images | List a thread message\&#39;s attached images|

# **createThreadMessageImage**
> CreateThreadMessage200Response createThreadMessageImage()

Connects an existing uploaded image, identified by imageId, to the thread message identified by messageId within the given threadId and returns the updated message; requires update permission on threads and storage.

### Example

```typescript
import {
    ThreadsMessagesImagesApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ThreadsMessagesImagesApi(configuration);

let threadId: string; //The thread identifier (default to undefined)
let messageId: string; //The message identifier (default to undefined)
let imageId: string; //The image identifier (default to undefined)

const { status, data } = await apiInstance.createThreadMessageImage(
    threadId,
    messageId,
    imageId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **threadId** | [**string**] | The thread identifier | defaults to undefined|
| **messageId** | [**string**] | The message identifier | defaults to undefined|
| **imageId** | [**string**] | The image identifier | defaults to undefined|


### Return type

**CreateThreadMessage200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteThreadMessageImage**
> CreateAccountInvitations200Response deleteThreadMessageImage()

Disconnects the image identified by imageId from the thread message identified by messageId within the given threadId, without deleting the underlying image; requires update permission on threads and storage.

### Example

```typescript
import {
    ThreadsMessagesImagesApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ThreadsMessagesImagesApi(configuration);

let threadId: string; //The thread identifier (default to undefined)
let messageId: string; //The message identifier (default to undefined)
let imageId: string; //The image identifier (default to undefined)

const { status, data } = await apiInstance.deleteThreadMessageImage(
    threadId,
    messageId,
    imageId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **threadId** | [**string**] | The thread identifier | defaults to undefined|
| **messageId** | [**string**] | The message identifier | defaults to undefined|
| **imageId** | [**string**] | The image identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getThreadMessageImages**
> GetThreadMessageImages200Response getThreadMessageImages()

Returns a paginated list of images attached to the given thread message, supporting search and ordering; requires read permission on threads and storage.

### Example

```typescript
import {
    ThreadsMessagesImagesApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new ThreadsMessagesImagesApi(configuration);

let threadId: string; //The thread identifier (default to undefined)
let messageId: string; //The message identifier (default to undefined)

const { status, data } = await apiInstance.getThreadMessageImages(
    threadId,
    messageId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **threadId** | [**string**] | The thread identifier | defaults to undefined|
| **messageId** | [**string**] | The message identifier | defaults to undefined|


### Return type

**GetThreadMessageImages200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

