# ActivitiesScheduleApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**cancelActivitySchedule**](#cancelactivityschedule) | **DELETE** /activities/{activityId}/schedule | Cancel a scheduled activity|
|[**updateActivitySchedule**](#updateactivityschedule) | **PUT** /activities/{activityId}/schedule | Schedule an activity to publish later|

# **cancelActivitySchedule**
> CreateActivity200Response cancelActivitySchedule()

Cancels a pending future publish schedule for an activity, removing the scheduled send and leaving the activity unpublished; requires update permission on activities and fails if the activity is not currently scheduled or has already been sent.

### Example

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

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

let activityId: string; //The activity identifier (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **activityId** | [**string**] | The activity identifier | defaults to undefined|


### Return type

**CreateActivity200Response**

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

# **updateActivitySchedule**
> CreateActivity200Response updateActivitySchedule(body)

Sets or updates the future date and time at which an activity will automatically be published, creating the schedule if none exists or rescheduling an existing one; requires update permission on activities and the date must be in the future.

### Example

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

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

let activityId: string; //The activity identifier (default to undefined)
let body: object; //

const { status, data } = await apiInstance.updateActivitySchedule(
    activityId,
    body
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **body** | **object**|  | |
| **activityId** | [**string**] | The activity identifier | defaults to undefined|


### Return type

**CreateActivity200Response**

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

