# Provision Family plans via API

{% hint style="info" %}
Note: This API is for partners of Keeper and Enterprise customers deployed in the Keeper Security Government Cloud region.
{% endhint %}

## Overview

Keeper offers enterprise customers APIs to provision Family plans. Keeper provides [REST ](https://www.codecademy.com/article/what-is-rest)APIs that enable you to build custom applications and integration in provisioning Family plans.

## Capabilities of the API

Provision Family Plan API endpoint is for enterprise accounts & MSP partners to register Keeper Family licenses. This endpoint will create a **1 year license** with the following Product/Add-ons:

* Keeper Family
* BreachWatch (Dark Web Monitoring)
* 10GB File Storage

For the full list of Keeper Family License features, visit the following [page](https://www.keepersecurity.com/family-plan.html).

{% hint style="success" %}
In order to access this API, contact your support representative to request an API key, this will be shared in a Keeper record.
{% endhint %}

### API definition

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FCaJRKzPGRnaYYZ7Fwwun%2FFamilyPlan%20v2.yaml?alt=media&token=92eac47d-26ac-416b-95e6-1b2024d6265a>" path="/create-license" method="get" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FCaJRKzPGRnaYYZ7Fwwun%2FFamilyPlan%20v2.yaml?alt=media&token=92eac47d-26ac-416b-95e6-1b2024d6265a>
{% endopenapi %}

### Additional API details

#### API Parameters

For more information on the required parameters, visit:

{% content-ref url="../api-troubleshooting/api-parameters" %}
[api-parameters](https://docs.keeper.io/en/enterprise-guide/api-troubleshooting/api-parameters)
{% endcontent-ref %}

#### API Response codes

For more information on the response codes, visit:

{% content-ref url="../api-troubleshooting/api-response-codes" %}
[api-response-codes](https://docs.keeper.io/en/enterprise-guide/api-troubleshooting/api-response-codes)
{% endcontent-ref %}

#### API Explorer

If you wish to explore the APIs in another tool like postman or the [swagger editor](https://editor.swagger.io/), download the associated YAML definition of the APIs below

For more information on exploring the API with swagger, visit:

{% content-ref url="../api-troubleshooting/api-explorer-swagger" %}
[api-explorer-swagger](https://docs.keeper.io/en/enterprise-guide/api-troubleshooting/api-explorer-swagger)
{% endcontent-ref %}

{% hint style="info" %}
If you need support or have additional questions on the usage of these APIs, please contact support or your sales representative.
{% endhint %}

### Sample node.js script

Use the below sample so understand how you might implement this in your environment:

```
var request = require('request');
var CryptoJS = require('crypto-js');

var secret = 'PARTNER_SECRET';
var partner_name = 'PARTNER_NAME';
var email = 'EMAIL';
var hash = CryptoJS.SHA256(email + secret);
var transaction_id = 'TRANSACTION_ID';
var first_name = 'FIRST_NAME';
var last_name = 'LAST_NAME';

var options = {
  'method': 'GET',
  'url': 'https://keepersecurity.com/bi_api/v1/services/partner/create-license?transaction_id='+transaction_id+'&first_name='+first_name+'&last_name='+last_name+'&email='+email+'&hash='+hash+'&partner_name='+partner_name+'',
  'headers': {
      'Content-Type': 'application/json'
  }
  };

  request(options, function (error, response) {
      if (error) console.log("Error From the server: "+error);
      console.log("response body: "+response.body);
      console.log("response status: "+response.statusCode);
  });
```
