# ps.module.CampaignApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**apiVersionCampaignGet**](CampaignApi.md#apiVersionCampaignGet) | **GET** /api/{version}/campaign | List Campaign
[**apiVersionCampaignIdDeactivatePut**](CampaignApi.md#apiVersionCampaignIdDeactivatePut) | **PUT** /api/{version}/campaign/{id}/deactivate | Deactivate Campaign
[**apiVersionCampaignIdDelete**](CampaignApi.md#apiVersionCampaignIdDelete) | **DELETE** /api/{version}/campaign/{id} | Delete Campaign
[**apiVersionCampaignIdGet**](CampaignApi.md#apiVersionCampaignIdGet) | **GET** /api/{version}/campaign/{id} | Get Campaign
[**apiVersionCampaignIdPut**](CampaignApi.md#apiVersionCampaignIdPut) | **PUT** /api/{version}/campaign/{id} | Update Campaign
[**apiVersionCampaignIdRevetPut**](CampaignApi.md#apiVersionCampaignIdRevetPut) | **PUT** /api/{version}/campaign/{id}/revet | Revet Campaign
[**apiVersionCampaignIdTnoptionsPost**](CampaignApi.md#apiVersionCampaignIdTnoptionsPost) | **POST** /api/{version}/campaign/{id}/tnoptions | Update Campaign Asociated Number (can be add or remove)
[**apiVersionCampaignPost**](CampaignApi.md#apiVersionCampaignPost) | **POST** /api/{version}/campaign | Create Campaign
[**apiVersionCampaignSyncGet**](CampaignApi.md#apiVersionCampaignSyncGet) | **GET** /api/{version}/campaign/sync | Campaign Sync From User (Required Identity Login)
[**apiVersionCampaignSyncdataGet**](CampaignApi.md#apiVersionCampaignSyncdataGet) | **GET** /api/{version}/campaign/syncdata | Campaign Sync Data From CloudFlare Require Key Access
[**apiVersionCampaignVettedGet**](CampaignApi.md#apiVersionCampaignVettedGet) | **GET** /api/{version}/campaign/vetted | List Campaign vetted only

<a name="apiVersionCampaignGet"></a>
# **apiVersionCampaignGet**
> apiVersionCampaignGet(version, opts)

List Campaign

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let version = "version_example"; // String | 
let opts = { 
  'tenantId': "tenantId_example", // String | 
  'brandId': "brandId_example", // String | 
  'telcoCampaignIdExist': true, // Boolean | 
  'skipStatus': new ps.module.PhoneSpeakEntitiesEnumsTelcoCampaignStatus(), // PhoneSpeakEntitiesEnumsTelcoCampaignStatus | 
  'disableSyncData': true, // Boolean | 
  'status': new ps.module.PhoneSpeakEntitiesEnumsTelcoCampaignStatus(), // PhoneSpeakEntitiesEnumsTelcoCampaignStatus | 
  'secondaryDcaSharingStatus': new ps.module.PhoneSpeakEntitiesEnumsTelcoSecondaryDcaSharingStatus(), // PhoneSpeakEntitiesEnumsTelcoSecondaryDcaSharingStatus | 
  'isVerified': true, // Boolean | 
  'sortBy': "sortBy_example", // String | 
  'direction': new ps.module.PhoneSpeakEntitiesEnumsListDirection(), // PhoneSpeakEntitiesEnumsListDirection | 
  'search': "search_example", // String | 
  'limit': 56, // Number | 
  'pageNum': 56 // Number | 
};
apiInstance.apiVersionCampaignGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **tenantId** | **String**|  | [optional] 
 **brandId** | **String**|  | [optional] 
 **telcoCampaignIdExist** | **Boolean**|  | [optional] 
 **skipStatus** | [**PhoneSpeakEntitiesEnumsTelcoCampaignStatus**](.md)|  | [optional] 
 **disableSyncData** | **Boolean**|  | [optional] 
 **status** | [**PhoneSpeakEntitiesEnumsTelcoCampaignStatus**](.md)|  | [optional] 
 **secondaryDcaSharingStatus** | [**PhoneSpeakEntitiesEnumsTelcoSecondaryDcaSharingStatus**](.md)|  | [optional] 
 **isVerified** | **Boolean**|  | [optional] 
 **sortBy** | **String**|  | [optional] 
 **direction** | [**PhoneSpeakEntitiesEnumsListDirection**](.md)|  | [optional] 
 **search** | **String**|  | [optional] 
 **limit** | **Number**|  | [optional] 
 **pageNum** | **Number**|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionCampaignIdDeactivatePut"></a>
# **apiVersionCampaignIdDeactivatePut**
> apiVersionCampaignIdDeactivatePut(id, version)

Deactivate Campaign

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionCampaignIdDeactivatePut(id, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionCampaignIdDelete"></a>
# **apiVersionCampaignIdDelete**
> apiVersionCampaignIdDelete(id, version)

Delete Campaign

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionCampaignIdDelete(id, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionCampaignIdGet"></a>
# **apiVersionCampaignIdGet**
> apiVersionCampaignIdGet(id, version)

Get Campaign

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionCampaignIdGet(id, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionCampaignIdPut"></a>
# **apiVersionCampaignIdPut**
> apiVersionCampaignIdPut(idversion)

Update Campaign

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionCampaignIdPut(idversion, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreCampaignsUpdateCampaignQuery**](PhoneSpeakServiceCoreCampaignsUpdateCampaignQuery.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

<a name="apiVersionCampaignIdRevetPut"></a>
# **apiVersionCampaignIdRevetPut**
> apiVersionCampaignIdRevetPut(idversion)

Revet Campaign

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionCampaignIdRevetPut(idversion, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreCampaignsRevetCampaignQuery**](PhoneSpeakServiceCoreCampaignsRevetCampaignQuery.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

<a name="apiVersionCampaignIdTnoptionsPost"></a>
# **apiVersionCampaignIdTnoptionsPost**
> apiVersionCampaignIdTnoptionsPost(idversion)

Update Campaign Asociated Number (can be add or remove)

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionCampaignIdTnoptionsPost(idversion, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreCampaignsUpdateCampaignTnOptionQuery**](PhoneSpeakServiceCoreCampaignsUpdateCampaignTnOptionQuery.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

<a name="apiVersionCampaignPost"></a>
# **apiVersionCampaignPost**
> apiVersionCampaignPost(version)

Create Campaign

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let version = "version_example"; // String | 

apiInstance.apiVersionCampaignPost(version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreCampaignsCreateCampaignQuery**](PhoneSpeakServiceCoreCampaignsCreateCampaignQuery.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

<a name="apiVersionCampaignSyncGet"></a>
# **apiVersionCampaignSyncGet**
> apiVersionCampaignSyncGet(version, opts)

Campaign Sync From User (Required Identity Login)

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let version = "version_example"; // String | 
let opts = { 
  'tenantId': "tenantId_example", // String | 
  'brandId': "brandId_example", // String | 
  'campaignId': "campaignId_example" // String | 
};
apiInstance.apiVersionCampaignSyncGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **tenantId** | **String**|  | [optional] 
 **brandId** | **String**|  | [optional] 
 **campaignId** | **String**|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionCampaignSyncdataGet"></a>
# **apiVersionCampaignSyncdataGet**
> apiVersionCampaignSyncdataGet(version, opts)

Campaign Sync Data From CloudFlare Require Key Access

### Example
```javascript
import ps.module from 'phonespeakv2_api';

let apiInstance = new ps.module.CampaignApi();
let version = "version_example"; // String | 
let opts = { 
  'tenantId': "tenantId_example", // String | 
  'brandId': "brandId_example", // String | 
  'campaignId': "campaignId_example" // String | 
};
apiInstance.apiVersionCampaignSyncdataGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **tenantId** | **String**|  | [optional] 
 **brandId** | **String**|  | [optional] 
 **campaignId** | **String**|  | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionCampaignVettedGet"></a>
# **apiVersionCampaignVettedGet**
> apiVersionCampaignVettedGet(version, opts)

List Campaign vetted only

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CampaignApi();
let version = "version_example"; // String | 
let opts = { 
  'tenantId': "tenantId_example", // String | 
  'sortBy': "sortBy_example", // String | 
  'direction': new ps.module.PhoneSpeakEntitiesEnumsListDirection(), // PhoneSpeakEntitiesEnumsListDirection | 
  'search': "search_example", // String | 
  'limit': 56, // Number | 
  'pageNum': 56 // Number | 
};
apiInstance.apiVersionCampaignVettedGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **tenantId** | **String**|  | [optional] 
 **sortBy** | **String**|  | [optional] 
 **direction** | [**PhoneSpeakEntitiesEnumsListDirection**](.md)|  | [optional] 
 **search** | **String**|  | [optional] 
 **limit** | **Number**|  | [optional] 
 **pageNum** | **Number**|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

