# ThreadsAccountsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addThreadAccounts**](#addthreadaccounts) | **POST** /threads/{threadId}/accounts | Add accounts to a thread|
|[**deleteThreadAccount**](#deletethreadaccount) | **DELETE** /threads/{threadId}/accounts/{threadAccountId} | Remove an account from a thread|
|[**getThreadAccounts**](#getthreadaccounts) | **GET** /threads/{threadId}/accounts | List a thread\&#39;s participant accounts|
|[**updateThreadAccount**](#updatethreadaccount) | **PUT** /threads/{threadId}/accounts/{threadAccountId} | Update a thread participant|

# **addThreadAccounts**
> AddThreadAccounts200Response addThreadAccounts(threadAccountsAddInputs)

Adds the given account IDs as participants of the thread identified by threadId, restoring any that previously left, up to a 32-participant limit; not allowed on direct message threads and requires update permission on threads.

### Example

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

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

let threadId: string; //The thread identifier (default to undefined)
let threadAccountsAddInputs: ThreadAccountsAddInputs; //

const { status, data } = await apiInstance.addThreadAccounts(
    threadId,
    threadAccountsAddInputs
);
```

### Parameters

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


### Return type

**AddThreadAccounts200Response**

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json
 - **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)

# **deleteThreadAccount**
> CreateAccountInvitations200Response deleteThreadAccount()

Soft-removes the participant identified by threadAccountId from the thread identified by threadId by marking them as having left, preserving their message history; requires update permission on threads.

### Example

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

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

let threadId: string; //The thread identifier (default to undefined)
let threadAccountId: string; //The threadAccount identifier (default to undefined)

const { status, data } = await apiInstance.deleteThreadAccount(
    threadId,
    threadAccountId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **threadId** | [**string**] | The thread identifier | defaults to undefined|
| **threadAccountId** | [**string**] | The threadAccount 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)

# **getThreadAccounts**
> GetThreadAccounts200Response getThreadAccounts()

Returns a paginated list of accounts participating in the given thread, supporting search and ordering; requires read permission on threads and accounts.

### Example

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

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

let threadId: string; //The thread identifier (default to undefined)
let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getThreadAccounts(
    threadId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **threadId** | [**string**] | The thread identifier | defaults to undefined|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetThreadAccounts200Response**

### 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)

# **updateThreadAccount**
> UpdateThreadAccount200Response updateThreadAccount(threadAccountUpdateInputs)

Updates participant-level metadata (such as notification preference or blocked status) for the thread account identified by threadAccountId within the thread identified by threadId; requires update permission on threads and accounts.

### Example

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

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

let threadId: string; //The thread identifier (default to undefined)
let threadAccountId: string; //The threadAccount identifier (default to undefined)
let threadAccountUpdateInputs: ThreadAccountUpdateInputs; //

const { status, data } = await apiInstance.updateThreadAccount(
    threadId,
    threadAccountId,
    threadAccountUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **threadAccountUpdateInputs** | **ThreadAccountUpdateInputs**|  | |
| **threadId** | [**string**] | The thread identifier | defaults to undefined|
| **threadAccountId** | [**string**] | The threadAccount identifier | defaults to undefined|


### Return type

**UpdateThreadAccount200Response**

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json
 - **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)

