# PowerIAM.InvitationApi

All URIs are relative to *http://localhost:9000*

Method | HTTP request | Description
------------- | ------------- | -------------
[**acceptInvitation**](InvitationApi.md#acceptInvitation) | **PUT** /v2/accept-invitation | 
[**invite**](InvitationApi.md#invite) | **POST** /v2/invite | 

<a name="acceptInvitation"></a>
# **acceptInvitation**
> &#x27;String&#x27; acceptInvitation(opts)



Accept an invitation.

### Example
```javascript
import {PowerIAM} from '@poweriam/sdk';
let defaultClient = PowerIAM.ApiClient.instance;

// Configure API key authorization: JWT Token
let JWT Token = defaultClient.authentications['JWT Token'];
JWT Token.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT Token.apiKeyPrefix = 'Token';

let apiInstance = new PowerIAM.InvitationApi();
let opts = { 
  'invitationId': "invitationId_example" // String | 
};
apiInstance.acceptInvitation(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **invitationId** | **String**|  | [optional] 

### Return type

**&#x27;String&#x27;**

### Authorization

[JWT Token](../README.md#JWT Token)

### HTTP request headers

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

<a name="invite"></a>
# **invite**
> InvitationV2 invite(body)



Invite a user to a realm with a role.

### Example
```javascript
import {PowerIAM} from '@poweriam/sdk';
let defaultClient = PowerIAM.ApiClient.instance;

// Configure API key authorization: JWT Token
let JWT Token = defaultClient.authentications['JWT Token'];
JWT Token.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT Token.apiKeyPrefix = 'Token';

let apiInstance = new PowerIAM.InvitationApi();
let body = new PowerIAM.InviteCommandV2(); // InviteCommandV2 | 

apiInstance.invite(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**InviteCommandV2**](InviteCommandV2.md)|  | 

### Return type

[**InvitationV2**](InvitationV2.md)

### Authorization

[JWT Token](../README.md#JWT Token)

### HTTP request headers

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

