# ps.module.ContactApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**apiVersionContactGet**](ContactApi.md#apiVersionContactGet) | **GET** /api/{version}/contact | List all contact
[**apiVersionContactIdContactimagePut**](ContactApi.md#apiVersionContactIdContactimagePut) | **PUT** /api/{version}/contact/{id}/contactimage | Update existing contact image
[**apiVersionContactIdDelete**](ContactApi.md#apiVersionContactIdDelete) | **DELETE** /api/{version}/contact/{id} | Delete contact
[**apiVersionContactIdGet**](ContactApi.md#apiVersionContactIdGet) | **GET** /api/{version}/contact/{id} | Retrieves existing contact
[**apiVersionContactIdPut**](ContactApi.md#apiVersionContactIdPut) | **PUT** /api/{version}/contact/{id} | Update existing contact
[**apiVersionContactIdSettingPut**](ContactApi.md#apiVersionContactIdSettingPut) | **PUT** /api/{version}/contact/{id}/setting | Update existing contact setting
[**apiVersionContactPost**](ContactApi.md#apiVersionContactPost) | **POST** /api/{version}/contact | Create contact

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

List all contact

### 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.ContactApi();
let version = "version_example"; // String | 
let opts = { 
  'limit': 56, // Number | 
  'pageNum': 56, // Number | 
  'search': "search_example", // String | 
  'sortBy': "sortBy_example", // String | 
  'direction': new ps.module.PhoneSpeakEntitiesEnumsListDirection(), // PhoneSpeakEntitiesEnumsListDirection | 
  'thenBy': "thenBy_example", // String | 
  'thenDirection': new ps.module.PhoneSpeakEntitiesEnumsListDirection() // PhoneSpeakEntitiesEnumsListDirection | 
};
apiInstance.apiVersionContactGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

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

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

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

Update existing contact image

### 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.ContactApi();
let id = "id_example"; // String | The unique id of the contact
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the contact | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreContactsUpdateContactImageQuery**](PhoneSpeakServiceCoreContactsUpdateContactImageQuery.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="apiVersionContactIdDelete"></a>
# **apiVersionContactIdDelete**
> apiVersionContactIdDelete(id, version)

Delete contact

### 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.ContactApi();
let id = "id_example"; // String | The unique id of the contact
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the contact | 
 **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="apiVersionContactIdGet"></a>
# **apiVersionContactIdGet**
> apiVersionContactIdGet(id, version)

Retrieves existing contact

### 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.ContactApi();
let id = "id_example"; // String | The unique id of the contact
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the contact | 
 **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="apiVersionContactIdPut"></a>
# **apiVersionContactIdPut**
> apiVersionContactIdPut(idversion)

Update existing contact

### 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.ContactApi();
let id = "id_example"; // String | The unique id of the contact
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the contact | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreContactsUpdateContactQuery**](PhoneSpeakServiceCoreContactsUpdateContactQuery.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="apiVersionContactIdSettingPut"></a>
# **apiVersionContactIdSettingPut**
> apiVersionContactIdSettingPut(idversion)

Update existing contact setting

### 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.ContactApi();
let id = "id_example"; // String | The unique id of the contact
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the contact | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreContactsUpdateContactSettingQuery**](PhoneSpeakServiceCoreContactsUpdateContactSettingQuery.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="apiVersionContactPost"></a>
# **apiVersionContactPost**
> apiVersionContactPost(version)

Create contact

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

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreContactsCreateContactQuery**](PhoneSpeakServiceCoreContactsCreateContactQuery.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

