# Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi

All URIs are relative to *https://api.newsletter2go.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**addRecipientToGroup**](RecipientApi.md#addRecipientToGroup) | **POST** /lists/{lid}/groups/{gid}/recipients/{id} | add single recipient to group
[**addRecipientsToGroup**](RecipientApi.md#addRecipientsToGroup) | **POST** /lists/{lid}/groups/{gid}/recipients | add all Recipients to the given group
[**createRecipient**](RecipientApi.md#createRecipient) | **POST** /recipients | create new recipient(s) or updates existing ones
[**deleteRecipient**](RecipientApi.md#deleteRecipient) | **DELETE** /lists/{lid}/recipients/{id} | delete the recipient
[**getRecipients**](RecipientApi.md#getRecipients) | **GET** /lists/{lid}/recipients | get all Recipients of selected list
[**getRecipientsByGroup**](RecipientApi.md#getRecipientsByGroup) | **GET** /lists/{lid}/groups/{gid}/recipients | get all Recipients of selected group
[**importRecipientsInit**](RecipientApi.md#importRecipientsInit) | **POST** /lists/{lid}/recipients/import/init | Initialize the import of recipients by file
[**importRecipientsSave**](RecipientApi.md#importRecipientsSave) | **POST** /lists/{lid}/recipients/import/save | Start the import recipients by file
[**importRecipientsStatistics**](RecipientApi.md#importRecipientsStatistics) | **GET** /import/{id}/info | Get statistics about the import by file
[**removeRecipientFromGroup**](RecipientApi.md#removeRecipientFromGroup) | **DELETE** /lists/{lid}/groups/{gid}/recipients/{id} | remove single recipient from group
[**removeRecipientsFromGroup**](RecipientApi.md#removeRecipientsFromGroup) | **DELETE** /lists/{lid}/groups/{gid}/recipients | remove all Recipients from given group
[**removeRecipientsFromList**](RecipientApi.md#removeRecipientsFromList) | **DELETE** /lists/{lid}/recipients | remove all Recipients from selected list
[**subscribeRecipient**](RecipientApi.md#subscribeRecipient) | **POST** /forms/submit/{code} | Creates a new recipient and sends a DOI-Mail
[**updateRecipient**](RecipientApi.md#updateRecipient) | **PATCH** /lists/{lid}/recipients/{id} | update the recipient.
[**updateRecipients**](RecipientApi.md#updateRecipients) | **PATCH** /lists/{lid}/recipients | update all Recipients in selected list


<a name="addRecipientToGroup"></a>
# **addRecipientToGroup**
> PatchResponse addRecipientToGroup(lid, gid, id)

add single recipient to group

add Recipient to Group

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var gid = "gid_example"; // String | the id of the group

var id = "id_example"; // String | the id of the recipient


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.addRecipientToGroup(lid, gid, id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **gid** | **String**| the id of the group | 
 **id** | **String**| the id of the recipient | 

### Return type

[**PatchResponse**](PatchResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="addRecipientsToGroup"></a>
# **addRecipientsToGroup**
> PatchResponse addRecipientsToGroup(lid, gid, opts)

add all Recipients to the given group

add all Recipients to the given group. Pay attention to the filter, if you forget to submit it, all recipients of the current list are getting added to the group!

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var gid = "gid_example"; // String | the id of the group

var opts = { 
  'filter': "filter_example", // String | a FIQL-Filter
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.addRecipientsToGroup(lid, gid, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **gid** | **String**| the id of the group | 
 **filter** | **String**| a FIQL-Filter | [optional] 

### Return type

[**PatchResponse**](PatchResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="createRecipient"></a>
# **createRecipient**
> ApiResponsePost createRecipient(recipient)

create new recipient(s) or updates existing ones

create new recipient(s).&lt;br&gt;If a custom attribute shall by saved for the new recipient just submit them in the json body by name.&lt;br&gt;If &lt;b&gt;multiple recipients&lt;/b&gt; shall by saved at once, submit multiple recipient-objects as a json array.&lt;br&gt;&lt;b&gt;In this case all objects must share the same attributes.&lt;/b&gt;&lt;br/&gt;If the e-mail-address exists already the existing recipient gets updated.

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var recipient = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientPost(); // RecipientPost | the data to save


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createRecipient(recipient, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **recipient** | [**RecipientPost**](RecipientPost.md)| the data to save | 

### Return type

[**ApiResponsePost**](ApiResponsePost.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="deleteRecipient"></a>
# **deleteRecipient**
> ApiResponseDelete deleteRecipient(lid, id)

delete the recipient

delete one recipient

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var id = "id_example"; // String | the id of the recipient


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteRecipient(lid, id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **id** | **String**| the id of the recipient | 

### Return type

[**ApiResponseDelete**](ApiResponseDelete.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getRecipients"></a>
# **getRecipients**
> RecipientResponse getRecipients(lid, opts)

get all Recipients of selected list

Get Recipients. If the API shall return custom attributes also, submit them in the _fields-Parameter by name.

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var opts = { 
  'filter': "filter_example", // String | a FIQL-Filter
  'limit': 50, // Integer | a limit for list-responses
  'offset': 0, // Integer | an offset for list-responses
  'expand': true, // Boolean | true if attributes should be returned or not
  'fields': ["fields_example"] // [String] | list of case-sensetive fields which should be returned.    Only needed if _expand is false or special attributes are needed
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getRecipients(lid, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **filter** | **String**| a FIQL-Filter | [optional] 
 **limit** | **Integer**| a limit for list-responses | [optional] [default to 50]
 **offset** | **Integer**| an offset for list-responses | [optional] [default to 0]
 **expand** | **Boolean**| true if attributes should be returned or not | [optional] 
 **fields** | [**[String]**](String.md)| list of case-sensetive fields which should be returned.    Only needed if _expand is false or special attributes are needed | [optional] 

### Return type

[**RecipientResponse**](RecipientResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getRecipientsByGroup"></a>
# **getRecipientsByGroup**
> RecipientResponse getRecipientsByGroup(lid, gid, opts)

get all Recipients of selected group

get Recipients

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var gid = "gid_example"; // String | the id of the group

var opts = { 
  'filter': "filter_example", // String | a FIQL-Filter
  'limit': 50, // Integer | a limit for list-responses
  'offset': 0, // Integer | an offset for list-responses
  'expand': true, // Boolean | true if attributes should be returned or not
  'fields': ["fields_example"] // [String] | list of case-sensetive fields which should be returned.    Only needed if _expand is false or special attributes are needed
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getRecipientsByGroup(lid, gid, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **gid** | **String**| the id of the group | 
 **filter** | **String**| a FIQL-Filter | [optional] 
 **limit** | **Integer**| a limit for list-responses | [optional] [default to 50]
 **offset** | **Integer**| an offset for list-responses | [optional] [default to 0]
 **expand** | **Boolean**| true if attributes should be returned or not | [optional] 
 **fields** | [**[String]**](String.md)| list of case-sensetive fields which should be returned.    Only needed if _expand is false or special attributes are needed | [optional] 

### Return type

[**RecipientResponse**](RecipientResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="importRecipientsInit"></a>
# **importRecipientsInit**
> InlineResponse200 importRecipientsInit(lid, file)

Initialize the import of recipients by file

Initialize the import recipients by file

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var file = "/path/to/file.txt"; // File | recipient file to upload


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.importRecipientsInit(lid, file, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **file** | **File**| recipient file to upload | 

### Return type

[**InlineResponse200**](InlineResponse200.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json

<a name="importRecipientsSave"></a>
# **importRecipientsSave**
> ApiResponsePost importRecipientsSave(lid, data)

Start the import recipients by file

Start the import recipients by file. The returned id can be used to fetch further statistics about the import.

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var data = new Newsletter2GoApi(https:ApiNewsletter2goCom).Data(); // Data | the data to start the import


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.importRecipientsSave(lid, data, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **data** | [**Data**](Data.md)| the data to start the import | 

### Return type

[**ApiResponsePost**](ApiResponsePost.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="importRecipientsStatistics"></a>
# **importRecipientsStatistics**
> ImportResponse importRecipientsStatistics(id)

Get statistics about the import by file

Get statistics about the import by file.

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var id = "id_example"; // String | the id of the import job


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.importRecipientsStatistics(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| the id of the import job | 

### Return type

[**ImportResponse**](ImportResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="removeRecipientFromGroup"></a>
# **removeRecipientFromGroup**
> PatchResponse removeRecipientFromGroup(lid, gid, id)

remove single recipient from group

remove Recipient to Group

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var gid = "gid_example"; // String | the id of the group

var id = "id_example"; // String | the id of the recipient


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.removeRecipientFromGroup(lid, gid, id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **gid** | **String**| the id of the group | 
 **id** | **String**| the id of the recipient | 

### Return type

[**PatchResponse**](PatchResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="removeRecipientsFromGroup"></a>
# **removeRecipientsFromGroup**
> PatchResponse removeRecipientsFromGroup(lid, gid, opts)

remove all Recipients from given group

remove all Recipients from given group. Pay attention to the filter, if you forget to submit it, all recipients are getting removed from the group!

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var gid = "gid_example"; // String | the id of the group

var opts = { 
  'filter': "filter_example", // String | a FIQL-Filter
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.removeRecipientsFromGroup(lid, gid, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **gid** | **String**| the id of the group | 
 **filter** | **String**| a FIQL-Filter | [optional] 

### Return type

[**PatchResponse**](PatchResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="removeRecipientsFromList"></a>
# **removeRecipientsFromList**
> PatchResponse removeRecipientsFromList(lid, opts)

remove all Recipients from selected list

remove Recipients from selected list. Pay attention to the filter, if you forget to submit it, all recipients of the current list are getting removed!

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var opts = { 
  'filter': "filter_example", // String | a FIQL-Filter
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.removeRecipientsFromList(lid, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **filter** | **String**| a FIQL-Filter | [optional] 

### Return type

[**PatchResponse**](PatchResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="subscribeRecipient"></a>
# **subscribeRecipient**
> RecipientSubscribeResponse subscribeRecipient(code, recipient)

Creates a new recipient and sends a DOI-Mail

Creates a new recipient and sends the corresponding DOI-Mail attached to the previously created subscribe-form. The recipient will be available as soon as the recipient has confirmed the DOI-Mail.

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var code = "code_example"; // String | the subscribe-code displayed when creating a subscribe-form

var recipient = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientSubscribe(); // RecipientSubscribe | the recipient to subscribe


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.subscribeRecipient(code, recipient, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **code** | **String**| the subscribe-code displayed when creating a subscribe-form | 
 **recipient** | [**RecipientSubscribe**](RecipientSubscribe.md)| the recipient to subscribe | 

### Return type

[**RecipientSubscribeResponse**](RecipientSubscribeResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="updateRecipient"></a>
# **updateRecipient**
> PatchResponse updateRecipient(lid, id, recipient)

update the recipient.

update one Recipient. If a value of a custom attribute shall by changed just submit it in the json body

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var id = "id_example"; // String | the id of the recipient

var recipient = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientPatch(); // RecipientPatch | the data to update


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateRecipient(lid, id, recipient, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **id** | **String**| the id of the recipient | 
 **recipient** | [**RecipientPatch**](RecipientPatch.md)| the data to update | 

### Return type

[**PatchResponse**](PatchResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="updateRecipients"></a>
# **updateRecipients**
> PatchResponse updateRecipients(lid, opts)

update all Recipients in selected list

Updates all recipients in the given list where the filter applies. If a value of a custom attribute shall by changed just submit it in the json body. Pay attention to the filter, if you forget to submit it, all recipients of the current list are getting updated!

### Example
```javascript
var Newsletter2GoApi(https:ApiNewsletter2goCom) = require('newsletter2-go-api-(https://api/newsletter2go/com)');
var defaultClient = Newsletter2GoApi(https:ApiNewsletter2goCom).ApiClient.default;

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

var apiInstance = new Newsletter2GoApi(https:ApiNewsletter2goCom).RecipientApi();

var lid = "lid_example"; // String | the id of the list

var opts = { 
  'filter': "filter_example", // String | a FIQL-Filter
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateRecipients(lid, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lid** | **String**| the id of the list | 
 **filter** | **String**| a FIQL-Filter | [optional] 

### Return type

[**PatchResponse**](PatchResponse.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

