---
title: Compliance Actions
slug: epmm/v2-api-guide/compliance-actions
createdAt: 2026-10-06T08:06:41.730Z
---

## List all compliance actions

Gets a list of existing compliance actions.

### Required roles

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

| Required Roles                                                                               |
| -------------------------------------------------------------------------------------------- |
| **Category:** Compliance Policy Management<br />**Role Description:** View compliance policy |

### HTTP method

GET

### Request URI

api/v2/compliance\_action

### Request parameters

| Parameter          | Description                                                                                                       | Sample Value |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator. | 1            |

### Response fields

| **Field**                                                             | **Description** |
| --------------------------------------------------------------------- | --------------- |
| results                                                               |                 |
| <font color="#000000">        </font>id                               |                 |
| <font color="#000000">        </font>name                             |                 |
| <font color="#000000">        </font>localCompliancefalse             |                 |
| <font color="#000000">        </font>createdAt                        |                 |
| <font color="#000000">        </font>modifiedAt                       |                 |
| <font color="#000000">        </font>tiers                            |                 |
| <font color="#000000">                </font>delay                    |                 |
| <font color="#000000">                </font>complianceSettings       |                 |
| <font color="#000000">                    </font>wipe                 |                 |
| <font color="#000000">                    </font>quarantine           |                 |
| <font color="#000000">                    </font>block                |                 |
| <font color="#000000">                    </font>alert                |                 |
| <font color="#000000">                </font>quarantineSettings       |                 |
| <font color="#000000">                    </font>removeWifi           |                 |
| <font color="#000000">                    </font>removeConfigurations |                 |
| <font color="#000000">                    </font>excludeWifiOnly      |                 |
| <font color="#000000">                    </font>removeApps           |                 |
| totalCount                                                            |                 |
| resultCount                                                           |                 |

### Sample request

curl -k -sS -u \<userName>:\<password> -XGET 'https\://\[Ivanti EPMM]/api/v2/compliance\_action?adminDeviceSpaceId=1'

### Sample response

\{

    "results": \[

        \{

            "id": 2,

            "name": "Block Email, AppConnect apps, and Send Alert",

            "localCompliance": false,

            "createdAt": 0,

            "modifiedAt": 0,

            "tiers": \[

                \{

                    "delay": "PT0S",

                    "complianceSettings": \{

                        "wipe": false,

                        "quarantine": false,

                        "block": true,

                        "alert": true

                    },

                    "quarantineSettings": \{

                        "removeWifi": false,

                        "removeConfigurations": false,

                        "excludeWifiOnly": false,

                        "removeApps": false

                    }

                }

            ]

        },

        \{

            "id": 1,

            "name": "Send Alert",

            "localCompliance": false,

            "createdAt": 0,

            "modifiedAt": 0,

            "tiers": \[

                \{

                    "delay": "PT0S",

                    "complianceSettings": \{

                        "wipe": false,

                        "quarantine": false,

                        "block": false,

                        "alert": true

                    },

                    "quarantineSettings": \{

                        "removeWifi": false,

                        "removeConfigurations": false,

                        "excludeWifiOnly": false,

                        "removeApps": false

                    }

                }

            ]

        }

    ],

    "totalCount": 2,

    "resultCount": 2

}

## Create a compliance action

Creates a compliance action. With this call, you specify the name of the compliance action and then the data for the tiers, including any enforcement delays.

### Required roles

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

| Required Roles                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Category:** Compliance Policy Management<br />**Roles Description:** View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels |

### HTTP method

POST

### Request URI

api/v2/compliance\_action

### Request parameters

| Parameter                                                 | Description                                                                                                                                                                   | Sample Value                         |
| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId                                        | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                             | 1                                    |
| name                                                      | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Text<br />Name of the tiered compliance action.                                                        | Three tiers 12 hour then 1 day delay |
| localCompliance                                           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false. Specifies whether Ivanti EPMM enforces the first tier on the device if possible.      | true                                 |
| tiers                                                     | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Container for the tiers data.                                                                          | n/a                                  |
| <font color="#000000">    </font>delay                    | **Parameter Type:** Request body<br />**Data Type:** text.<br />Specifies the delay time. Formatted as [ISO8601 durations](https://en.wikipedia.org/wiki/ISO_8601#Durations). | PT12H                                |
| <font color="#000000">    </font>complianceSettings       | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Container for the compliance settings data.                                                            | n/a                                  |
| <font color="#000000">        </font>quarantine           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                       | true                                 |
| <font color="#000000">        </font>wipe<br />           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.<br />Only for Android devices on which the custom ROM setting is enabled.             | true                                 |
| <font color="#000000">        </font>block<br />          | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                       | true                                 |
| <font color="#000000">        </font>alert<br />          | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                       | true                                 |
| <font color="#000000">    </font>quarantineSettings       | **Parameter Type:** Request body<br />**Data Type:** Container for the quarantine settings data.                                                                              | n/a                                  |
| <font color="#000000">        </font>removeConfigurations | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                       | true                                 |
| <font color="#000000">        </font>excludeWifiOnly      | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                       | true                                 |
| <font color="#000000">        </font>removeWifi           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                       | true                                 |
| <font color="#000000">        </font>removeApps           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                       | true                                 |

### Response fields

| **Field**                                             | **Description**              |
| ----------------------------------------------------- | ---------------------------- |
| results                                               | Container for results        |
| messages                                              | Container for messages       |
| <font color="#000000">        </font>messageKey       | Key for the returned message |
| <font color="#000000">        </font>localizedMessage | Text of the returned message |
| totalCount                                            | How many records found       |
| resultCount                                           | How many records displayed   |

### Sample request

curl -k -sS -u \<userName>:\<password> -H "Content-Type: application/json" --data '\{

    "name": "Three tiers 12 hour then 1 day delay",

    "localCompliance": false,

    "tiers": \[

      \{

        "complianceSettings": \{

          "quarantine": false,

          "wipe": false,

          "block": false,

          "alert": true

        },

        "quarantineSettings": \{

          "removeConfigurations": false,

          "excludeWifiOnly": false,

          "removeWifi": false,

          "removeApps": false

        }

      },

      \{

        "delay": "PT12H",

        "complianceSettings": \{

          "quarantine": false,

          "wipe": false,

          "block": true,

          "alert": false

        },

        "quarantineSettings": \{

          "removeConfigurations": false,

          "excludeWifiOnly": false,

          "removeWifi": false,

          "removeApps": false

        }

      },

      \{

        "delay": "P1D",

        "complianceSettings": \{

          "quarantine": true,

          "wipe": false,

          "block": false,

          "alert": false

        },

        "quarantineSettings": \{

          "removeConfigurations": true,

          "excludeWifiOnly": true,

          "removeWifi": true,

          "removeApps": false

        }

      }

    ]

  }' -XPOST 'https\://\[Ivanti EPMM]/api/v2/compliance\_action?adminDeviceSpaceId=1'

### Sample response

\{

   "results":9,

   "messages":\[

      \{

         "type":"Info",

         "messageKey":"com.mobileiron.vsp.rest.controllers.ComplianceActionController.Messages.CREATE\_SUCCESS",

         "localizedMessage":"Compliance action created successfully."

      }

   ],

   "totalCount":1,

   "resultCount":1

}

## Update a compliance action

Updates a compliance action.

### Required roles

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

| Required Roles                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Category:** Compliance Policy Management<br />**Roles Description:** View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels |

### HTTP method

PUT

### Request URI

api/v2/compliance\_action/*id*

### Request parameters

| Parameter                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                             | Sample Value                |
| --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| adminDeviceSpaceId                                        | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                                                                                                                                                                                                       | 1                           |
| id                                                        | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />ID of the compliance action to update.                                                                                                                                                                                                                                                                                                                      | 9                           |
| name                                                      | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Text<br />Name of the tiered compliance action.                                                                                                                                                                                                                                                                                                                  | Three tiers 5 minute delays |
| localCompliance                                           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false. Specifies whether Ivanti EPMM enforces the first tier on the device if possible.                                                                                                                                                                                                                                                                | true                        |
| tiers                                                     | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Container for the tiers data.                                                                                                                                                                                                                                                                                                                                    | n/a                         |
| <font color="#000000">    </font>delay                    | **Parameter Type:** Request body<br />**Data Type:** text.<br />Specifies the delay time. Formatted as [ISO8601 durations](https://en.wikipedia.org/wiki/ISO_8601#Durations).<br />You cannot set delay time as less than 4 hours or greater than ninety days without adding the "compliance.restrict.delay.values" property in the mifs.properties file. This values can be changed within the allowed interval in the user interface. | PT5M                        |
| <font color="#000000">    </font>complianceSettings       | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Container for the compliance settings data.                                                                                                                                                                                                                                                                                                                      | n/a                         |
| <font color="#000000">        </font>quarantine           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                                                                                                                                                                                                                                                                                 | true                        |
| <font color="#000000">        </font>wipe<br />           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.<br />Only for Android devices on which the custom ROM setting is enabled.                                                                                                                                                                                                                                                                       | true                        |
| <font color="#000000">        </font>block<br />          | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                                                                                                                                                                                                                                                                                 | true                        |
| <font color="#000000">        </font>alert<br />          | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                                                                                                                                                                                                                                                                                 | true                        |
| <font color="#000000">    </font>quarantineSettings       | **Parameter Type:** Request body<br />**Data Type:** Container for the quarantine settings data.                                                                                                                                                                                                                                                                                                                                        | n/a                         |
| <font color="#000000">        </font>removeConfigurations | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                                                                                                                                                                                                                                                                                 | true                        |
| <font color="#000000">        </font>excludeWifiOnly      | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                                                                                                                                                                                                                                                                                 | true                        |
| <font color="#000000">        </font>removeWifi           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                                                                                                                                                                                                                                                                                 | true                        |
| <font color="#000000">        </font>removeApps           | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Can be true or false.                                                                                                                                                                                                                                                                                                                                                 | true                        |

### Response fields

| Field                                                 | Description                  |
| ----------------------------------------------------- | ---------------------------- |
| results                                               | Container for results        |
| messages                                              | Container for messages       |
| <font color="#000000">        </font>messageKey       | Key for the returned message |
| <font color="#000000">        </font>localizedMessage | Text of the returned message |
| totalCount                                            | How many records found       |
| resultCount                                           | How many records displayed   |

### Sample request

curl -k -sS -u \<userName>:\<password> -H "Content-Type: application/json" --data '\{

    "name": "Three tiers 5 minute delays",

    "localCompliance": false,

    "tiers": \[

      \{

        "complianceSettings": \{

          "quarantine": false,

          "wipe": false,

          "block": false,

          "alert": true

        },

        "quarantineSettings": \{

          "removeConfigurations": false,

          "excludeWifiOnly": false,

          "removeWifi": false,

          "removeApps": false

        }

      },

      \{

        "delay": "PT5M",

        "complianceSettings": \{

          "quarantine": false,

          "wipe": false,

          "block": true,

          "alert": false

        },

        "quarantineSettings": \{

          "removeConfigurations": false,

          "excludeWifiOnly": false,

          "removeWifi": false,

          "removeApps": false

        }

      },

      \{

        "delay": "PT5M",

        "complianceSettings": \{

          "quarantine": true,

          "wipe": false,

          "block": false,

          "alert": false

        },

        "quarantineSettings": \{

          "removeConfigurations": true,

          "excludeWifiOnly": true,

          "removeWifi": true,

          "removeApps": false

        }

      }

    ]

}' -XPUT 'https\://\[Ivanti EPMM]/api/v2/compliance\_action/9?adminDeviceSpaceId=1'

### Sample response

\{

   "results":9,

   "messages":\[

      \{

         "type":"Info",

         "messageKey":"com.mobileiron.vsp.rest.controllers.ComplianceActionController.Messages.UPDATE\_SUCCESS",

         "localizedMessage":"Compliance action updated successfully."

      }

   ],

   "totalCount":1,

   "resultCount":1

}

## Get information about a compliance action

Gets information about a specific compliance action.

### Required roles

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

| Required Roles                                                                               |
| -------------------------------------------------------------------------------------------- |
| **Category:** Compliance Policy Management<br />**Role Description:** View compliance policy |

### HTTP method

GET

### Request URI

api/v2/compliance\_action/*id*

### Request parameters

| Parameter          | Description                                                                                                                                        | Sample Value |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                  | 1            |
| id                 | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />ID of the compliance action for which information needs to be fetched. | 9            |

### Response fields

| **Field**                                                             | **Description** |
| --------------------------------------------------------------------- | --------------- |
| results                                                               |                 |
| <font color="#000000">        </font>id                               |                 |
| <font color="#000000">        </font>name                             |                 |
| <font color="#000000">        </font>localCompliancefalse             |                 |
| <font color="#000000">        </font>createdAt                        |                 |
| <font color="#000000">        </font>modifiedAt                       |                 |
| <font color="#000000">        </font>tiers                            |                 |
| <font color="#000000">                </font>delay                    |                 |
| <font color="#000000">                </font>complianceSettings       |                 |
| <font color="#000000">                    </font>wipe                 |                 |
| <font color="#000000">                    </font>quarantine           |                 |
| <font color="#000000">                    </font>block                |                 |
| <font color="#000000">                    </font>alert                |                 |
| <font color="#000000">                </font>quarantineSettings       |                 |
| <font color="#000000">                    </font>removeWifi           |                 |
| <font color="#000000">                    </font>removeConfigurations |                 |
| <font color="#000000">                    </font>excludeWifiOnly      |                 |
| <font color="#000000">                    </font>removeApps           |                 |
| totalCount                                                            |                 |
| resultCount                                                           |                 |

### Sample request

curl -k -sS -u \<userName>:\<password> -XGET 'https\://\[Ivanti EPMM]/api/v2/compliance\_action/1?adminDeviceSpaceId=1'

### Sample response

\{

   "results":\{

      "id":1,

      "name":"Send Alert",

      "localCompliance"\:false,

      "createdAt":0,

      "modifiedAt":0,

      "tiers":\[

         \{

            "delay":"PT0S",

            "complianceSettings":\{

               "wipe"\:false,

               "quarantine"\:false,

               "block"\:false,

               "alert"\:true

            },

            "quarantineSettings":\{

               "removeWifi"\:false,

               "removeConfigurations"\:false,

               "excludeWifiOnly"\:false,

               "removeApps"\:false

            }

         }

      ]

   },

   "totalCount":1,

   "resultCount":1

}

## Delete a compliance action

Deletes a compliance action.

### Required roles

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

| Required Roles                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Category:** Compliance Policy Management<br />**Roles Description:** View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels |

### HTTP method

DELETE

### Request URI

api/v2/compliance\_action/*id*

### Request parameters

| Parameter          | Description                                                                                                        | Sample Value |
| ------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.  | 1            |
| id                 | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />ID of the compliance action to delete. | 9            |

### Response fields

| **Field**                                                             | **Description** |
| --------------------------------------------------------------------- | --------------- |
| results                                                               |                 |
| <font color="#000000">        </font>id                               |                 |
| <font color="#000000">        </font>name                             |                 |
| <font color="#000000">        </font>localCompliancefalse             |                 |
| <font color="#000000">        </font>createdAt                        |                 |
| <font color="#000000">        </font>modifiedAt                       |                 |
| <font color="#000000">        </font>tiers                            |                 |
| <font color="#000000">                </font>delay                    |                 |
| <font color="#000000">                </font>complianceSettings       |                 |
| <font color="#000000">                    </font>wipe                 |                 |
| <font color="#000000">                    </font>quarantine           |                 |
| <font color="#000000">                    </font>block                |                 |
| <font color="#000000">                    </font>alert                |                 |
| <font color="#000000">                </font>quarantineSettings       |                 |
| <font color="#000000">                    </font>removeWifi           |                 |
| <font color="#000000">                    </font>removeConfigurations |                 |
| <font color="#000000">                    </font>excludeWifiOnly      |                 |
| <font color="#000000">                    </font>removeApps           |                 |
| totalCount                                                            |                 |
| resultCount                                                           |                 |

### Sample request

curl -k -sS -u \<username>:\<password> -XDELETE 'https\://\[Ivanti EPMM]/api/v2/compliance\_action/9?adminDeviceSpaceId=1'

### Sample response

\{

   "results":\[

      9

   ],

   "messages":\[

      \{

         "type":"Info",

         "messageKey":"com.mobileiron.vsp.rest.controllers.ComplianceActionController.Messages.DELETE\_SUCCESS",

         "localizedMessage":"Compliance action(s) deleted successfully."

      }

   ],

   "totalCount":1,

   "resultCount":1

}

## Get substitution variables

This call gets the available substitution variables for use when creating a compliance action message as described in [Create compliance action message](docId\:SiaQngmVBYQRMWZUGfw__).

### Required roles

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

| Required Roles                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Category:** Compliance Policy Management<br />**Roles Description:** View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels |

### HTTP method

GET

### Request URI

api/v2/substitution\_variables?adminDeviceSpaceId=*n*

### Request parameters

| Parameter          | Description                                                                                                       | Sample Value |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator. | 1            |

### Response fields

| **Field**                                        | **Description** |
| ------------------------------------------------ | --------------- |
| totalCount                                       |                 |
| resultCount                                      |                 |
| hasMore                                          |                 |
| results                                          |                 |
| <font color="#000000">        </font>name        |                 |
| <font color="#000000">        </font>description |                 |

### Sample request

curl -X GET \\

  'https\://\[Ivanti EPMM]/mifs/admin/rest/api/v2/substitution\_variables?page=1\&start=0\&limit=50\&adminDeviceSpaceId=1' \\

  -H 'authorization: Basic \<token>' \\

### Sample response

\{

    "totalCount": 40,

    "resultCount": 40,

    "hasMore": false,

    "results": \[

        \{

            "name": "$CN$",

            "description": "Built-in variable"

        },

        \{

            "name": "$CONFIG\_UUID$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_CLIENT\_ID$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_ID$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_IMEI$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_IMSI$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_MAC$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_PIVD\_ACTIVATION\_LINK$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_SN$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_UDID$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_UUID$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DEVICE\_UUID\_NO\_DASHES$",

            "description": "Built-in variable"

        },

        \{

            "name": "$DISPLAY\_NAME$",

            "description": "Built-in variable"

        },

        \{

            "name": "$EMAIL$",

            "description": "Built-in variable"

        },

        \{

            "name": "$EMAIL\_DOMAIN$",

            "description": "Built-in variable"

        },

        \{

            "name": "$EMAIL\_LOCAL$",

            "description": "Built-in variable"

        },

        \{

            "name": "$FIRST\_NAME$",

            "description": "Built-in variable"

        },

        \{

            "name": "$GOOGLE\_AUTOGEN\_PASSWORD$",

            "description": "Built-in variable"

        },

        \{

            "name": "$ICCID$",

            "description": "Built-in variable"

        },

        \{

            "name": "$LAST\_NAME$",

            "description": "Built-in variable"

        },

        \{

            "name": "$MI\_APPSTORE\_URL$",

            "description": "Built-in variable"

        },

        \{

            "name": "$MODEL$",

            "description": "Built-in variable"

        },

        \{

            "name": "$NULL$",

            "description": "Built-in variable"

        },

        \{

            "name": "$OU$",

            "description": "Built-in variable"

        },

        \{

            "name": "$PASSWORD$",

            "description": "Built-in variable"

        },

        \{

            "name": "$PHONE\_NUMBER$",

            "description": "Built-in variable"

        },

        \{

            "name": "$RANDOM\_16$",

            "description": "Built-in variable"

        },

        \{

            "name": "$RANDOM\_32$",

            "description": "Built-in variable"

        },

        \{

            "name": "$RANDOM\_64$",

            "description": "Built-in variable"

        },

        \{

            "name": "$REALM$",

            "description": "Built-in variable"

        },

        \{

            "name": "$SAM\_ACCOUNT\_NAME$",

            "description": "Built-in variable"

        },

        \{

            "name": "$TIMESTAMP\_MS$",

            "description": "Built-in variable"

        },

        \{

            "name": "$USER\_CUSTOM1$",

            "description": "Built-in variable"

        },

        \{

            "name": "$USER\_CUSTOM2$",

            "description": "Built-in variable"

        },

        \{

            "name": "$USER\_CUSTOM3$",

            "description": "Built-in variable"

        },

        \{

            "name": "$USER\_CUSTOM4$",

            "description": "Built-in variable"

        },

        \{

            "name": "$USER\_DN$",

            "description": "Built-in variable"

        },

        \{

            "name": "$USER\_LOCALE$",

            "description": "Built-in variable"

        },

        \{

            "name": "$USER\_UPN$",

            "description": "Built-in variable"

        },

        \{

            "name": "$USERID$",

            "description": "Built-in variable"

        }

    ]

}

## Create compliance action message

This call creates a compliance action message. You can use the substitution variables described in [Get substitution variables](docId\:SiaQngmVBYQRMWZUGfw__) to contruct your message.

### Required roles

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

| Required Roles                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Category:** Compliance Policy Management<br />**Roles Description:** View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels |

### HTTP method

POST

### Request URI

api/v2/compliance\_policy/rules/*ruleId*/messages?adminDeviceSpaceId=*n*

### Request parameters

| Parameter          | Description                                                                                                                            | Sample Value |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:&#x20;**&#x51;uery<br />**Data Type:** Number<br />Device space ID of the administrator.            | 1            |
| ruleId             | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />ID of the compliance action for which to create a message. | 2            |

### Response fields

| **Field**                                             | **Description** |
| ----------------------------------------------------- | --------------- |
| results                                               |                 |
| <font color="#000000">        </font>ruleId           |                 |
| <font color="#000000">        </font>languageId       |                 |
| <font color="#000000">        </font>message          |                 |
| messages                                              |                 |
| <font color="#000000">        </font>type             |                 |
| <font color="#000000">        </font>messageKey       |                 |
| <font color="#000000">        </font>localizedMessage |                 |
| totalCount                                            |                 |
| resultCount                                           |                 |

### Sample request

curl 'https\://\[Ivanti EPMM]/mifs/admin/rest/api/v2/compliance\_policy/rules/2/messages?adminDeviceSpaceId=1'  --data-binary '\{"messages":\{"0":"Dear $FIRST\_NAME$, your device is in the USA."}}' --compressed

### Sample response

\{

    "results": \[

        \{

            "ruleId": 2,

            "languageId": 0,

            "message": "Dear $FIRST\_NAME$, your device is in the USA."

        }

    ],

    "messages": \[

        \{

            "type": "Info",

            "messageKey": "com.mobileiron.vsp.rest.controllers.ComplianceRuleMessageController.Messages.REPLACE\_MESSAGES\_SUCCESS",

            "localizedMessage": "Compliance rule messages successfully replaced."

        }

    ],

    "totalCount": 1,

    "resultCount": 1

}
