# OrganizationUsersApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addOrganizationUser**](#addorganizationuser) | **POST** /organization/users | Add a user to the organization|
|[**deleteOrganizationUser**](#deleteorganizationuser) | **DELETE** /organization/users/{userId} | Remove a user from the organization|
|[**getOrganizationUsers**](#getorganizationusers) | **GET** /organization/users | List organization member users|

# **addOrganizationUser**
> AddOrganizationUser200Response addOrganizationUser(addEventAccessUserRequest)

Looks up an existing platform user by email and creates an organization membership for them with default (no) permissions, granting them access as an admin team member; requires create permission on users.

### Example

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

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

let addEventAccessUserRequest: AddEventAccessUserRequest; //

const { status, data } = await apiInstance.addOrganizationUser(
    addEventAccessUserRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **addEventAccessUserRequest** | **AddEventAccessUserRequest**|  | |


### Return type

**AddOrganizationUser200Response**

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

# **deleteOrganizationUser**
> CreateAccountInvitations200Response deleteOrganizationUser()

Deletes the organization membership for the given user, revoking their admin access to the organization; a user cannot delete their own membership, and the caller needs delete permission on users.

### Example

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

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

let userId: string; //The user identifier (default to undefined)

const { status, data } = await apiInstance.deleteOrganizationUser(
    userId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **userId** | [**string**] | The user 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)

# **getOrganizationUsers**
> GetOrganizationUsers200Response getOrganizationUsers()

Returns a paginated list of users who are members of the organization, supporting page, pageSize, orderBy, and search, and requiring the \"read\" permission on both \"org\" and \"users\".

### Example

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

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

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.getOrganizationUsers(
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **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

**GetOrganizationUsers200Response**

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

