# ps.module.VoicemailApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**apiVersionOwnerIdVoicemailAllDelete**](VoicemailApi.md#apiVersionOwnerIdVoicemailAllDelete) | **DELETE** /api/{version}/{ownerId}/voicemail/all | Delete all voicemail
[**apiVersionOwnerIdVoicemailDelete**](VoicemailApi.md#apiVersionOwnerIdVoicemailDelete) | **DELETE** /api/{version}/{ownerId}/voicemail | Delete Voicemail
[**apiVersionOwnerIdVoicemailGet**](VoicemailApi.md#apiVersionOwnerIdVoicemailGet) | **GET** /api/{version}/{ownerId}/voicemail | List Voicemail
[**apiVersionOwnerIdVoicemailIdGet**](VoicemailApi.md#apiVersionOwnerIdVoicemailIdGet) | **GET** /api/{version}/{ownerId}/voicemail/{id} | Get Voicemail
[**apiVersionOwnerIdVoicemailIdPut**](VoicemailApi.md#apiVersionOwnerIdVoicemailIdPut) | **PUT** /api/{version}/{ownerId}/voicemail/{id} | Update Voicemail
[**apiVersionOwnerIdVoicemailUnreadcountGet**](VoicemailApi.md#apiVersionOwnerIdVoicemailUnreadcountGet) | **GET** /api/{version}/{ownerId}/voicemail/unreadcount | Get Voicemail Unread Count

<a name="apiVersionOwnerIdVoicemailAllDelete"></a>
# **apiVersionOwnerIdVoicemailAllDelete**
> apiVersionOwnerIdVoicemailAllDelete(ownerIdversion)

Delete all voicemail

### 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.VoicemailApi();
let ownerId = "ownerId_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ownerId** | **String**|  | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreVoicemailsDeleteAllVoicemailQuery**](PhoneSpeakServiceCoreVoicemailsDeleteAllVoicemailQuery.md)| Delete voicemail parameter | [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="apiVersionOwnerIdVoicemailDelete"></a>
# **apiVersionOwnerIdVoicemailDelete**
> apiVersionOwnerIdVoicemailDelete(ownerIdversion)

Delete Voicemail

### 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.VoicemailApi();
let ownerId = "ownerId_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ownerId** | **String**|  | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreVoicemailsDeleteVoicemailQuery**](PhoneSpeakServiceCoreVoicemailsDeleteVoicemailQuery.md)| Delete voicemail parameter | [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="apiVersionOwnerIdVoicemailGet"></a>
# **apiVersionOwnerIdVoicemailGet**
> apiVersionOwnerIdVoicemailGet(ownerId, version, opts)

List Voicemail

### 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.VoicemailApi();
let ownerId = "ownerId_example"; // String | 
let version = "version_example"; // String | 
let opts = { 
  'fromDate': new Date("2013-10-20T19:20:30+01:00"), // Date | 
  'sortBy': "sortBy_example", // String | 
  'direction': new ps.module.PhoneSpeakEntitiesEnumsListDirection(), // PhoneSpeakEntitiesEnumsListDirection | 
  'limit': 56, // Number | 
  'pageNum': 56 // Number | 
};
apiInstance.apiVersionOwnerIdVoicemailGet(ownerId, version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ownerId** | **String**|  | 
 **version** | **String**|  | 
 **fromDate** | **Date**|  | [optional] 
 **sortBy** | **String**|  | [optional] 
 **direction** | [**PhoneSpeakEntitiesEnumsListDirection**](.md)|  | [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="apiVersionOwnerIdVoicemailIdGet"></a>
# **apiVersionOwnerIdVoicemailIdGet**
> apiVersionOwnerIdVoicemailIdGet(ownerId, id, version)

Get Voicemail

### 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.VoicemailApi();
let ownerId = "ownerId_example"; // String | Owner of the voicemail
let id = "id_example"; // String | Unique identifier of voicemail
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ownerId** | **String**| Owner of the voicemail | 
 **id** | **String**| Unique identifier of voicemail | 
 **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="apiVersionOwnerIdVoicemailIdPut"></a>
# **apiVersionOwnerIdVoicemailIdPut**
> apiVersionOwnerIdVoicemailIdPut(ownerIdidversion)

Update Voicemail

### 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.VoicemailApi();
let ownerId = "ownerId_example"; // String | 
let id = "id_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **ownerId** | **String**|  | 
 **id** | **String**|  | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreVoicemailsUpdateVoicemailQuery**](PhoneSpeakServiceCoreVoicemailsUpdateVoicemailQuery.md)| Update voicemail query | [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="apiVersionOwnerIdVoicemailUnreadcountGet"></a>
# **apiVersionOwnerIdVoicemailUnreadcountGet**
> apiVersionOwnerIdVoicemailUnreadcountGet(ownerId, version)

Get Voicemail Unread Count

### 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.VoicemailApi();
let ownerId = "ownerId_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

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

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

