# UnboundCaspApi.ParticipantsApi

All URIs are relative to *https://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createParticipant**](ParticipantsApi.md#createParticipant) | **POST** /casp/api/v1.0/mng/accounts/{id}/participants | Create a new participant
[**deleteParticipant**](ParticipantsApi.md#deleteParticipant) | **DELETE** /casp/api/v1.0/mng/participants/{id} | Delete a participant
[**getAddMemberOperation**](ParticipantsApi.md#getAddMemberOperation) | **GET** /casp/api/v1.0/mng/operations/addmember/{operationid} | Status of add member operation
[**getParticipant**](ParticipantsApi.md#getParticipant) | **GET** /casp/api/v1.0/mng/participants/{id} | Get participant information
[**listParticipants**](ParticipantsApi.md#listParticipants) | **GET** /casp/api/v1.0/mng/accounts/{id}/participants | List participants per account
[**regenerateActivationCode**](ParticipantsApi.md#regenerateActivationCode) | **POST** /casp/api/v1.0/mng/participants/{id}/reactivate | Regenerate activation code for an existing participant
[**updateParticipant**](ParticipantsApi.md#updateParticipant) | **PUT** /casp/api/v1.0/mng/participants/{id} | Update an existing participant


<a name="createParticipant"></a>
# **createParticipant**
> InlineResponse2011 createParticipant(id, body)

Create a new participant

Create a new participant in the specified account

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

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

var apiInstance = new UnboundCaspApi.ParticipantsApi();

var id = "id_example"; // String | Account ID

var body = new UnboundCaspApi.Body2(); // Body2 | Create participant request

apiInstance.createParticipant(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| Account ID | 
 **body** | [**Body2**](Body2.md)| Create participant request | 

### Return type

[**InlineResponse2011**](InlineResponse2011.md)

### Authorization

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

### HTTP request headers

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

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

Delete a participant

Deletes a participant. A participant can be deleted only if it has no related vaults.

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

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

var apiInstance = new UnboundCaspApi.ParticipantsApi();

var id = "id_example"; // String | Participant ID

apiInstance.deleteParticipant(id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| Participant ID | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

<a name="getAddMemberOperation"></a>
# **getAddMemberOperation**
> InlineResponse2006 getAddMemberOperation(operationid)

Status of add member operation

Adding a new participant as a member in a quorum vault requires approval of the quorum. This request queries the status of such an asynchronous operation.

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

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

var apiInstance = new UnboundCaspApi.ParticipantsApi();

var operationid = "operationid_example"; // String | Operation ID

apiInstance.getAddMemberOperation(operationid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **operationid** | **String**| Operation ID | 

### Return type

[**InlineResponse2006**](InlineResponse2006.md)

### Authorization

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

### HTTP request headers

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

<a name="getParticipant"></a>
# **getParticipant**
> InlineResponse2003 getParticipant(id, opts)

Get participant information

Get details of a participant

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

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

var apiInstance = new UnboundCaspApi.ParticipantsApi();

var id = "id_example"; // String | Participant ID

var opts = { 
  'withVaults': true // Boolean | Get information on vaults that this participant is a member of
};
apiInstance.getParticipant(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| Participant ID | 
 **withVaults** | **Boolean**| Get information on vaults that this participant is a member of | [optional] 

### Return type

[**InlineResponse2003**](InlineResponse2003.md)

### Authorization

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

### HTTP request headers

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

<a name="listParticipants"></a>
# **listParticipants**
> [InlineResponse2003] listParticipants(id, opts)

List participants per account

List all participants in the account, which can be both humans and BOT&#39;s. An option is provided to include the deactivated participants.

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

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

var apiInstance = new UnboundCaspApi.ParticipantsApi();

var id = "id_example"; // String | Account ID

var opts = { 
  'withGlobal': true, // Boolean | Include participants which take part in this account vaults and belong to a different global account
  'withDeactivated': true // Boolean | Include deactivated participants
};
apiInstance.listParticipants(id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| Account ID | 
 **withGlobal** | **Boolean**| Include participants which take part in this account vaults and belong to a different global account | [optional] 
 **withDeactivated** | **Boolean**| Include deactivated participants | [optional] 

### Return type

[**[InlineResponse2003]**](InlineResponse2003.md)

### Authorization

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

### HTTP request headers

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

<a name="regenerateActivationCode"></a>
# **regenerateActivationCode**
> InlineResponse2011 regenerateActivationCode(id)

Regenerate activation code for an existing participant

Regenerate activation code for an existing participant. Used when the activation code was lost or the participant need to be reactivated.

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

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

var apiInstance = new UnboundCaspApi.ParticipantsApi();

var id = "id_example"; // String | Participant ID

apiInstance.regenerateActivationCode(id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| Participant ID | 

### Return type

[**InlineResponse2011**](InlineResponse2011.md)

### Authorization

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

### HTTP request headers

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

<a name="updateParticipant"></a>
# **updateParticipant**
> updateParticipant(id, body)

Update an existing participant

Update participant details. Participant name and other attributes can be changed. This service is also used to deactivate a participant by setting

### Example
```javascript
var UnboundCaspApi = require('unbound_casp_api');
var defaultClient = UnboundCaspApi.ApiClient.instance;

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

var apiInstance = new UnboundCaspApi.ParticipantsApi();

var id = "id_example"; // String | Participant ID

var body = new UnboundCaspApi.Body5(); // Body5 | Update participant request

apiInstance.updateParticipant(id, body).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| Participant ID | 
 **body** | [**Body5**](Body5.md)| Update participant request | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

