---
title: Create device posture policy
canonical: https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/device-posture/create-device-posture-policy/
product: CloudConnexa Docs
---

# Create device posture policy

`POST /api/v1/device-postures`

Create a Device Posture policy to enforce security compliance rules for devices based on operating systems, antivirus presence, disk encryption, and certificates. Policies can be applied to user groups to ensure secure device configurations.

**Attributes**:

- **Windows**:
  - **Operating System Version**

    Devices must meet specified version requirements. Supported conditions:
    - GTE: Greater than or equal to the specified version.
    - LTE: Less than or equal to the specified version.
    - EQUAL: Matches the exact version.
  - **Antivirus**

    Devices must have at least one supported antivirus solution installed (e.g., Microsoft Defender, Avast, Bitdefender).
  - **Disk encryption**
    - **FULL\_DISK**: Requires full disk encryption.
    - **SPECIFIC\_VOLUME**: Validates encryption for a specific volume (e.g., C).
  - **Certificates** The policy can enforce validation by specifying the certificate content as a string.
- **macOS**:
  - **Operating System Version**

    Devices must meet specified version requirements using the same conditions as Windows.
  - **Antivirus**

    Supported antivirus software includes solutions like Bitdefender and Avast.
  - **Disk Enryption**

    Disk encryption must be enabled. Volume-specific encryption checks aren’t supported.
  - **Certificates**

    The policy can enforce validation by specifying the certificate as a string.
- **Linux, Android, and iOS**:
  - Compliance is based on general device allowance or denial criteria without detailed checks for antivirus, encryption, or certificates.

## Body parameter

```json
{
  "name": "string",
  "description": "string",
  "userGroupsIds": [
    "string"
  ],
  "windows": {
    "allowed": true,
    "version": {
      "version": "string",
      "condition": "GTE"
    },
    "antiviruses": [
      "AVAST"
    ],
    "diskEncryption": {
      "type": "FULL_DISK",
      "volume": "string"
    },
    "certificate": "string"
  },
  "macos": {
    "allowed": true,
    "version": {
      "version": "string",
      "condition": "GTE"
    },
    "antiviruses": [
      "AVAST"
    ],
    "diskEncrypted": true,
    "certificate": "string"
  },
  "linux": {
    "allowed": true
  },
  "android": {
    "allowed": true
  },
  "ios": {
    "allowed": true
  }
}
```

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | [DevicePostureRequest](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/deviceposturerequest.md) | true | none |
| » name | body | string | false | none |
| » description | body | string | false | none |
| » userGroupsIds | body | \[string\] | false | none |
| » windows | body | [WindowsRequest](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/windowsrequest.md) | false | none |
| »» allowed | body | boolean | false | none |
| »» version | body | [VersionPolicy](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/versionpolicy.md) | false | none |
| »»» version | body | string | false | none |
| »»» condition | body | string | false | none |
| »» antiviruses | body | \[string\] | false | none |
| »» diskEncryption | body | [DiskEncryption](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/diskencryption.md) | false | none |
| »»» type | body | string | false | none |
| »»» volume | body | string | false | none |
| »» certificate | body | string | false | none |
| » macos | body | [MacOSRequest](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/macosrequest.md) | false | none |
| »» allowed | body | boolean | false | none |
| »» version | body | [VersionPolicy](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/versionpolicy.md) | false | none |
| »» antiviruses | body | \[string\] | false | none |
| »» diskEncrypted | body | boolean | false | none |
| »» certificate | body | string | false | none |
| » linux | body | [LinuxRequest](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/linuxrequest.md) | false | none |
| »» allowed | body | boolean | false | none |
| » android | body | [AndroidRequest](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/androidrequest.md) | false | none |
| »» allowed | body | boolean | false | none |
| » ios | body | [IOSRequest](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/iosrequest.md) | false | none |
| »» allowed | body | boolean | false | none |

### Enumerated Values

| Parameter | Value |
| --- | --- |
| »»» condition | GTE |
| »»» condition | LTE |
| »»» condition | EQUAL |
| »» antiviruses | AVAST |
| »» antiviruses | AVG |
| »» antiviruses | AVIRA |
| »» antiviruses | BITDEFENDER |
| »» antiviruses | CROWDSTRIKE\_FALCON |
| »» antiviruses | ESET |
| »» antiviruses | MALWAREBYTES |
| »» antiviruses | MCAFEE |
| »» antiviruses | MICROSOFT\_DEFENDER |
| »» antiviruses | NORTON |
| »» antiviruses | SENTINEL\_ONE |
| »» antiviruses | SOPHOS |
| »» antiviruses | CORTEX\_XDR |
| »»» type | FULL\_DISK |
| »»» type | SPECIFIC\_VOLUME |
| »» antiviruses | AVAST |
| »» antiviruses | AVG |
| »» antiviruses | AVIRA |
| »» antiviruses | BITDEFENDER |
| »» antiviruses | CROWDSTRIKE\_FALCON |
| »» antiviruses | ESET |
| »» antiviruses | MALWAREBYTES |
| »» antiviruses | MCAFEE |
| »» antiviruses | MICROSOFT\_DEFENDER |
| »» antiviruses | NORTON |
| »» antiviruses | SENTINEL\_ONE |
| »» antiviruses | SOPHOS |

## Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [DevicePostureResponse](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/devicepostureresponse.md) |

To perform this operation, you must be authenticated by means of one of the following methods: oauth

---

Prev: [Get device posture policies](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/device-posture/get-device-posture-policies.md)
Next: [Device](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/device.md)
Index: https://openvpn.net/cloud-docs/llms.txt
