---
title: Create a Policy
slug: jetstream-v3/create-a-policy
docTags: 
createdAt: 2024-01-23T15:40:26.741Z
---

## About

Add a policy to your Jetstream application for managing a device's configuration values (the configuration parameters are defined by the device’s definition). A policy may be added to a device to apply its configuration settings.

## Parameters

| **Property**                                                | **Location**                        | **Details**                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AccessKey**<br />string<br />Required<br />Unique         | Header                              | The access key for your user account.<br />This value is a 36-character GUID provided in your [user profile](docId\:BbIFQiuIXND5iAfMreBBi).                                                                                                                                                                                                  |
| **Id**<br />ulong<br />Unique                               | Body<br />*Response*                | The ID assigned to the newly created Policy.<br />This value is generated by Jetstream – do not define it in requests.                                                                                                                                                                                                                       |
| **Name**<br />string<br />Required<br />Unique              | Body<br />*Request*<br />*Response* | The name of the policy.<br />This value has a max length of 128 ASCII characters.<br />This value must adhere to this regular expression: ^\[a-zA-Z0-9-\_,. ]\*$                                                                                                                                                                             |
| **DeviceDefinition**<br />string<br />Required              | Body<br />*Request*<br />*Response* | The name of the device definition associated with the policy.<br />This value is one of the device definitions retrieved by the [Get All Device Definitions](docId\:ZrE5zpBxavj78EPZuxb84) request.<br />This value has a max length of 128 ASCII characters.<br />This value must adhere to this regular expression: ^\[a-zA-Z0-9-\_,. ]\*$ |
| **Parameters**<br />dictionary(string,string)<br />Required | Body<br />*Request*<br />*Response* | The parameters and values associated with the policy.<br />All parameters defined in the associated device definition must be defined.<br />All values defined must be of the type (e.g., int, bool, string, float, datetime) defined in the associated device definition.                                                                   |

## Example

### Request URL

**POST** https\://api.jetstreamrfid.com/3/policies


### Request Body

:::BlockQuote
\{
&#x20;   "Name": "MyPolicyName",
&#x20;   "DeviceDefinition":"TS032, Cabinet, US, UHF, GF, 7.9 cu ft",
&#x20;   "Parameters":\{
&#x20;       "aggregateeventscancount": 2,
&#x20;       "aggregateeventscantime": 10,
&#x20;       "antenna1rxsensitivity": 50,
&#x20;       "antenna1txpower": 30,
&#x20;       "antenna2rxsensitivity": 50,
&#x20;       "antenna2txpower": 30,
&#x20;       "antenna3rxsensitivity": 50,
&#x20;       "antenna3txpower": 30,
&#x20;       "antenna4rxsensitivity": 50,
&#x20;       "antenna4txpower": 30,
&#x20;       "commandpollinterval": 60,
&#x20;       "dns": "0.0.0.0",
&#x20;       "dooropentimelimit": 300,
&#x20;       "gateway": "0.0.0.0",
&#x20;       "ip": "0.0.0.0",
&#x20;       "jetstreamdeviceurl": "https\://usdevice.tersosolutions.com/v1.0/device/",
&#x20;       "lockdownhightemp": 127,
&#x20;       "lockdownonacpowerfailure": 0,
&#x20;       "lockdownonhightemp": 0,
&#x20;       "lockdownonreaderfailure": 0,
&#x20;       "logentryeventhightemp": 127,
&#x20;       "logentryeventlowtemp": -128,
&#x20;       "logentrylevel": "warning",
&#x20;       "numberofantennas": 4,
&#x20;       "objecteventscancount": 2,
&#x20;       "objecteventscantime": 10,
&#x20;       "subnet": "0.0.0.0"
&#x20;   }
}
:::

### Response Code

201 Created


### Response Body

:::BlockQuote
\{
&#x20;   "Id": 1,
&#x20;   "Name": "MyPolicyName",
&#x20;   "DeviceDefinition": "TS032, Cabinet, US, UHF, GF, 7.9 cu ft",
&#x20;   "Parameters": \{
&#x20;       "aggregateeventscancount": "2",
&#x20;       "aggregateeventscantime": "10",
&#x20;       "antenna1rxsensitivity": "50",
&#x20;       "antenna1txpower": "30",
&#x20;       "antenna2rxsensitivity": "50",
&#x20;       "antenna2txpower": "30",
&#x20;       "antenna3rxsensitivity": "50",
&#x20;       "antenna3txpower": "30",
&#x20;       "antenna4rxsensitivity": "50",
&#x20;       "antenna4txpower": "30",
&#x20;       "commandpollinterval": "60",
&#x20;       "dns": "0.0.0.0",
&#x20;       "dooropentimelimit": "300",
&#x20;       "gateway": "0.0.0.0",
&#x20;       "ip": "0.0.0.0",
&#x20;       "jetstreamdeviceurl": "https\://usdevice.tersosolutions.com/v1.0/device/",
&#x20;       "lockdownhightemp": "127",
&#x20;       "lockdownonacpowerfailure": "0",
&#x20;       "lockdownonhightemp": "0",
&#x20;       "lockdownonreaderfailure": "0",
&#x20;       "logentryeventhightemp": "127",
&#x20;       "logentryeventlowtemp": "-128",
&#x20;       "logentrylevel": "warning",
&#x20;       "numberofantennas": "4",
&#x20;       "objecteventscancount": "2",
&#x20;       "objecteventscantime": "10",
&#x20;       "subnet": "0.0.0.0"
&#x20;   },
}
:::

## Version Changes

Addition of the Id property.
