# OrganizationApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getOrganization**](#getorganization) | **GET** /organization | Get the organization profile|
|[**getOrganizationMembership**](#getorganizationmembership) | **GET** /organization/users/{userId} | Get a user\&#39;s organization membership|
|[**getOrganizationSystemLog**](#getorganizationsystemlog) | **GET** /organization/system-logs/{logId} | Get a single organization system log|
|[**getOrganizationSystemLogs**](#getorganizationsystemlogs) | **GET** /organization/system-logs | List organization system event logs|
|[**searchOrganization**](#searchorganization) | **GET** /organization/search | Search across the organization|
|[**updateOrganization**](#updateorganization) | **PUT** /organization | Update the organization\&#39;s profile|
|[**updateOrganizationIntegrations**](#updateorganizationintegrations) | **PUT** /organization/integrations | Update the organization\&#39;s Ghost CMS integration|
|[**updateOrganizationMembership**](#updateorganizationmembership) | **PUT** /organization/users/{userId} | Update a team member\&#39;s organization permissions|
|[**upsertLinkPreview**](#upsertlinkpreview) | **PUT** /organization/link-preview | Generate or refresh a link preview|

# **getOrganization**
> GetOrganization200Response getOrganization()

Returns the current organization\'s profile; open to any authenticated caller with no specific permission required.

### Example

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

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

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

### Parameters
This endpoint does not have any parameters.


### Return type

**GetOrganization200Response**

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

# **getOrganizationMembership**
> AddOrganizationUser200Response getOrganizationMembership()

Returns the organization membership record for the given user ID, requiring the \"read\" permission on both \"org\" and \"users\".

### Example

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

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

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

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **userId** | [**string**] | The user identifier | defaults to undefined|


### Return type

**AddOrganizationUser200Response**

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

# **getOrganizationSystemLog**
> GetOrganizationSystemLog200Response getOrganizationSystemLog()

Returns a single system event log entry by ID for the organization, requiring the \"read\" permission on both \"org\" and \"logs\".

### Example

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

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

let logId: string; //The log identifier (default to undefined)

const { status, data } = await apiInstance.getOrganizationSystemLog(
    logId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **logId** | [**string**] | The log identifier | defaults to undefined|


### Return type

**GetOrganizationSystemLog200Response**

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

# **getOrganizationSystemLogs**
> GetOrganizationSystemLogs200Response getOrganizationSystemLogs()

Returns a paginated list of system event logs for the organization, filterable by status and trigger in addition to page, pageSize, orderBy, and search, and requiring the \"read\" permission on both \"org\" and \"logs\".

### Example

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

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

let status: SystemEventLogStatus; //Filter by status (optional) (default to undefined)
let trigger: string; //Filter by trigger (optional) (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.getOrganizationSystemLogs(
    status,
    trigger,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **status** | **SystemEventLogStatus** | Filter by status | (optional) defaults to undefined|
| **trigger** | [**string**] | Filter by trigger | (optional) 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

**GetOrganizationSystemLogs200Response**

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

# **searchOrganization**
> SearchOrganization200Response searchOrganization()

Performs a fuzzy, org-wide search using the given search term and optional filters, returning matching records (e.g. accounts, events) as search fields; available to any authenticated user of the organization.

### Example

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

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

let filters: SearchOrganizationFilters; //Filter by filters (optional) (default to undefined)

const { status, data } = await apiInstance.searchOrganization(
    filters
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **filters** | **SearchOrganizationFilters** | Filter by filters | (optional) defaults to undefined|


### Return type

**SearchOrganization200Response**

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

# **updateOrganization**
> GetOrganization200Response updateOrganization(organizationUpdateInputs)

Updates the current organization\'s core profile fields (such as name, contact details, and locales) and returns the updated organization record; requires update permission on the organization.

### Example

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

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

let organizationUpdateInputs: OrganizationUpdateInputs; //

const { status, data } = await apiInstance.updateOrganization(
    organizationUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **organizationUpdateInputs** | **OrganizationUpdateInputs**|  | |


### Return type

**GetOrganization200Response**

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

# **updateOrganizationIntegrations**
> CreateAccountInvitations200Response updateOrganizationIntegrations(updateOrganizationIntegrationsRequest)

Enables or disables the organization\'s Ghost blog integration and stores its connection settings (site URL, admin API key, content API key) so published Ghost content can be surfaced in the platform.

### Example

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

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

let updateOrganizationIntegrationsRequest: UpdateOrganizationIntegrationsRequest; //

const { status, data } = await apiInstance.updateOrganizationIntegrations(
    updateOrganizationIntegrationsRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **updateOrganizationIntegrationsRequest** | **UpdateOrganizationIntegrationsRequest**|  | |


### Return type

**CreateAccountInvitations200Response**

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

# **updateOrganizationMembership**
> AddOrganizationUser200Response updateOrganizationMembership(organizationMembershipUpdateInputs)

Updates the module-by-module read/create/update/delete permissions for a user\'s membership in the organization, requires organization read and users update permissions.

### Example

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

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

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

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **organizationMembershipUpdateInputs** | **OrganizationMembershipUpdateInputs**|  | |
| **userId** | [**string**] | The user identifier | defaults to undefined|


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

# **upsertLinkPreview**
> UpsertLinkPreview200Response upsertLinkPreview(upsertLinkPreviewRequest)

Fetches (or returns a cached, up to 7 days old) title, description, image, and site metadata for the given URL, storing the result so it can be reused when rendering link previews.

### Example

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

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

let upsertLinkPreviewRequest: UpsertLinkPreviewRequest; //

const { status, data } = await apiInstance.upsertLinkPreview(
    upsertLinkPreviewRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **upsertLinkPreviewRequest** | **UpsertLinkPreviewRequest**|  | |


### Return type

**UpsertLinkPreview200Response**

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

