Skip to main content
POST
/
compliance
/
alert-rules
Create or upsert a compliance alert rule
curl --request POST \
  --url https://api.getprimo.com/compliance/alert-rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "nonCompliantStatus": []
}
'
{
  "rule": {
    "id": "<string>",
    "nonCompliantStatus": [],
    "config": {},
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.getprimo.com/llms.txt

Use this file to discover all available pages before exploring further.

Key: Write Scope: Company

Authorizations

Authorization
string
header
required

Use your Primo API key in the Authorization header as Bearer <API_KEY>.

Body

application/json
type
enum<string>
required

Type of compliance rule (e.g. MDM_ENROLLMENT, MDM_ONLINE, MDM_CONTROL_ENCRYPTION). Each (company, type) pair is unique — creating a rule for an existing type overwrites it.

Available options:
MDM_CONTROL_MALWAREBYTES,
MDM_CONTROL_RECOVERY_OS,
MDM_CONTROL_ENCRYPTION,
MDM_CONTROL_OS_UPDATE,
MDM_CONTROL_SOFTWARE_UPDATE,
MDM_CONTROL_WIFI,
MDM_CONTROL_ADMIN_USER_MANAGEMENT,
MDM_CONTROL_ADMIN_USER_PASSWORD_ROTATION,
MDM_CONTROL_DEVICE_NAMING,
MDM_CONTROL_GOOGLE_CHROME,
MDM_CONTROL_FIREWALL,
MDM_CONTROL_USB_BLOCKING,
MDM_CONTROL_ENTRA_SSO,
MDM_CONTROL_OKTA_SSO,
MDM_CONTROL_CUSTOM_FILE,
MDM_CONTROL_PASSWORD_POLICY,
MDM_CONTROL_SENTINEL_ONE,
MDM_CONTROL_RUSTDESK,
MDM_CONTROL_APP_BLOCKING,
MDM_CONTROL_DISABLE_PROFILES_PANE,
MDM_CONTROL_DISABLE_AIRDROP,
MDM_CONTROL_SCREEN_CAPTURE,
MDM_CONTROL_AIR_PRINT,
MDM_ENROLLMENT,
MDM_ONLINE,
MDM_ICLOUD_LOCK_STATUS,
PRIMO_REQUIREMENT
nonCompliantStatus
enum<string>[]
required

Non-compliant device statuses that should trigger an alert for this rule. Only non-compliant statuses are accepted (compliant statuses like SUCCESS, ONLINE, ENCRYPTED, etc. are rejected). Pass an empty array to disable alerts.

Available options:
ACTIVE,
NOT_PROTECTED,
OFFLINE_7_DAYS,
PENDING,
PROTECTED,
FAILED,
NOT_ENCRYPTED,
MISSING_RECOVERY_KEY,
ENCRYPTED,
ACTION_REQUIRED,
GRACE_PERIOD,
UP_TO_DATE,
NOT_UP_TO_DATE,
ENFORCED,
ERROR,
CREATION_PENDING,
DEMOTION_PENDING,
CREATED,
CREATION_FAILED,
SUCCESS,
INSTALLED,
MDM_ON,
MDM_OFF,
MDM_ON_IN_ANOTHER_MDM,
READY_ZTD,
MISSING_AGENT,
ONLINE,
OFFLINE,
ENABLED,
DISABLED,
MISSING_BYPASS_CODE,
MEETS_REQUIREMENTS,
BELOW_MINIMUM_VERSION,
UNSUPPORTED_OS_EDITION

Response

default - application/json
rule
object
required