# EventsSponsorsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addEventSponsorAccount**](#addeventsponsoraccount) | **POST** /events/{eventId}/sponsors/accounts/{accountId} | Add an account as an event sponsor|
|[**getEventSponsorAccounts**](#geteventsponsoraccounts) | **GET** /events/{eventId}/sponsors/accounts | List an event\&#39;s sponsor accounts|
|[**getEventSponsors**](#geteventsponsors) | **GET** /events/{eventId}/sponsors | List an event\&#39;s sponsor accounts|
|[**removeEventSponsorAccount**](#removeeventsponsoraccount) | **DELETE** /events/{eventId}/sponsors/accounts/{accountId} | Remove an account as an event sponsor|

# **addEventSponsorAccount**
> CreateEvent200Response addEventSponsorAccount()

Connects the specified account to the event as a sponsor, returning the updated event; requires the update permission on both events and accounts.

### Example

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

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

let eventId: string; //The event identifier (default to undefined)
let accountId: string; //The account identifier (default to undefined)

const { status, data } = await apiInstance.addEventSponsorAccount(
    eventId,
    accountId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | The event identifier | defaults to undefined|
| **accountId** | [**string**] | The account identifier | defaults to undefined|


### Return type

**CreateEvent200Response**

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

# **getEventSponsorAccounts**
> GetAccounts200Response getEventSponsorAccounts()

Returns the paginated list of accounts sponsoring the given event, optionally filtered by a search term matching the account\'s name, email, or ID; requires read permission on events and accounts.

### Example

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

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

let eventId: string; //The event 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.getEventSponsorAccounts(
    eventId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | The event 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

**GetAccounts200Response**

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

# **getEventSponsors**
> GetAccounts200Response getEventSponsors()

Returns a paginated list of accounts that are sponsoring the given event, supporting search and ordering; requires read permission on events and accounts.

### Example

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

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

let eventId: string; //The event 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.getEventSponsors(
    eventId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | The event 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

**GetAccounts200Response**

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

# **removeEventSponsorAccount**
> CreateEvent200Response removeEventSponsorAccount()

Disconnects the specified account from the event\'s sponsors, returning the updated event; requires the update permission on both events and accounts.

### Example

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

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

let eventId: string; //The event identifier (default to undefined)
let accountId: string; //The account identifier (default to undefined)

const { status, data } = await apiInstance.removeEventSponsorAccount(
    eventId,
    accountId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | The event identifier | defaults to undefined|
| **accountId** | [**string**] | The account identifier | defaults to undefined|


### Return type

**CreateEvent200Response**

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

