# Replace the account condition enforcement configuration

Replaces your organization's account condition enforcement configuration with
the configuration you send. Any rule you don't include is deleted.
A rule with an `id` updates the existing rule with that `id`. A rule without
an `id` is created. Rules are evaluated in the order you send them, and the
first rule that matches wins.
To change part of the configuration, retrieve it first, apply your changes,
and send the complete configuration back.

Endpoint: PUT /v1/controls/accountConditionEnforcement/configuration
Version: v1
Security: x-api-key

## Security:

  - `x-api-key` (unknown)
    apiKey in header x-api-key

## Request body:

  - `application/json` (unknown)
    The complete configuration to save.

## Request fields (application/json):

  - `globals` (object)
    Reserved for control-wide settings. Empty for this control.
    Example: {}

  - `rules` (array, required)
    Complete list of Account Condition Enforcement rules.

  - `rules.id` (string)
    The rule's unique identifier.
    Example: c478966c-f927-411c-b919-179832d3d50c

  - `rules.name` (string, required)
    A short name to help you recognise the rule.
    Example: Block personal accounts where a password login is observed.

  - `rules.enabled` (boolean, required)
    Whether the rule is active.
    Example: true

  - `rules.mode` (string, required)
    What happens when an account matches the rule.
    Enum: "OFF", "MONITOR", "WARN", "BLOCK"

  - `rules.title` (string)
    Heading of the page shown to the user. Required when mode is WARN or BLOCK, and must be omitted for MONITOR and OFF.
    Example: Account blocked

  - `rules.subtext` (string)
    Message of the page shown to the user. Markdown is supported. Required when mode is WARN or BLOCK, and must be omitted for MONITOR and OFF.
    Example: Logging into this app with a personal email address is not permitted.

  - `rules.terminateButtonText` (string)
    Text of the button that terminates the session. Required when mode is WARN or BLOCK, and must be omitted for MONITOR and OFF.
    Example: Terminate session

  - `rules.continueButtonText` (string)
    Text of the button that continues the session. Required when mode is WARN, and must be omitted for every other mode.
    Example: Continue session

  - `rules.criteria` (object, required)
    Restrict the rule to apply only under the specified conditions.

  - `rules.criteria.employeeIds` (object)
    Match specific employees by their employee identifier.
    Example: {"matches":["8c4f1d2e-9a0b-4c1d-8e2f-3a4b5c6d7e8f"]}

  - `rules.criteria.employeeIds.matches` (array, required)
    One or more values to match.

  - `rules.criteria.employeeIds.action` (string)
    Apply the rule to the matched values (INCLUDE) or to everything except them (EXCLUDE). Defaults to INCLUDE when omitted.
    Enum: "INCLUDE", "EXCLUDE"

  - `rules.criteria.employeeGroups` (object)
    Match employees by the groups they belong to.
    Example: {"matches":["Finance","Engineering"]}

  - `rules.criteria.appTypes` (object)
    Match accounts by the app they belong to.
    Example: {"matches":["MICROSOFT_COPILOT","GOOGLE_GEMINI","ANTHROPIC_CLAUDE","OPENAI_CHATGPT","GROK","DEEPSEEK","PERPLEXITY","FIGMA"]}

  - `rules.criteria.appTypes.matches` (array)
    One or more values to match.

  - `rules.criteria.loginDomains` (object)
    Match by the domain of the email used to log in. Required when domainScope is SPECIFIC_DOMAINS, and must be omitted otherwise.
    Example: {"matches":["personal-mail.com"]}

  - `rules.criteria.loginTypes` (object)
    Match by the login method used. Each value must be one of PASSWORD_LOGIN, OIDC or FEDCM.
    Example: {"matches":["PASSWORD_LOGIN"]}

  - `rules.criteria.browserTypes` (object)
    Match by the browser the login happens in. Each value must be one of ARC, ATLAS, BRAVE, CHROME, COMET, DIA, EDGE, FIREFOX, ISLAND, OPERA, PRISMA_ACCESS, or SAFARI.
    Example: {"matches":["CHROME"]}

  - `rules.criteria.domainScope` (object, required)
    Match by whether the login email's domain is one of your company's domains. Required on every rule.

  - `rules.criteria.domainScope.matches` (array, required)
    A single value: COMPANY_DOMAINS (logins with your company domains), NON_COMPANY_DOMAINS (logins outside your company domains), or SPECIFIC_DOMAINS (exactly the domains listed in loginDomains).
    Example: ["SPECIFIC_DOMAINS"]

  - `rules.criteria.profileScope` (object)
    Match by the profile in use on the browser. If omitted, defaults to ALL.

  - `rules.criteria.profileScope.matches` (array, required)
    A single value: ALL (any logged in profile), COMPANY_DOMAIN (profiles for your company domains), or NON_COMPANY_DOMAIN (profiles outside your company domains).
    Example: ["ALL"]

## Request examples:

  - `Remove all rules` (unknown)

  - `Block password logins to specific personal domains` (unknown)

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `globals` (object)
    Reserved for control-wide settings. Empty for this control.
    Example: {}

  - `rules` (array, required)
    Complete list of Account Condition Enforcement rules.

  - `rules.id` (string)
    The rule's unique identifier.
    Example: c478966c-f927-411c-b919-179832d3d50c

  - `rules.name` (string, required)
    A short name to help you recognise the rule.
    Example: Block personal accounts where a password login is observed.

  - `rules.enabled` (boolean, required)
    Whether the rule is active.
    Example: true

  - `rules.mode` (string, required)
    What happens when an account matches the rule.
    Enum: "OFF", "MONITOR", "WARN", "BLOCK"

  - `rules.title` (string)
    Heading of the page shown to the user. Required when mode is WARN or BLOCK, and must be omitted for MONITOR and OFF.
    Example: Account blocked

  - `rules.subtext` (string)
    Message of the page shown to the user. Markdown is supported. Required when mode is WARN or BLOCK, and must be omitted for MONITOR and OFF.
    Example: Logging into this app with a personal email address is not permitted.

  - `rules.terminateButtonText` (string)
    Text of the button that terminates the session. Required when mode is WARN or BLOCK, and must be omitted for MONITOR and OFF.
    Example: Terminate session

  - `rules.continueButtonText` (string)
    Text of the button that continues the session. Required when mode is WARN, and must be omitted for every other mode.
    Example: Continue session

  - `rules.criteria` (object, required)
    Restrict the rule to apply only under the specified conditions.

  - `rules.criteria.employeeIds` (object)
    Match specific employees by their employee identifier.
    Example: {"matches":["8c4f1d2e-9a0b-4c1d-8e2f-3a4b5c6d7e8f"]}

  - `rules.criteria.employeeIds.matches` (array, required)
    One or more values to match.

  - `rules.criteria.employeeIds.action` (string)
    Apply the rule to the matched values (INCLUDE) or to everything except them (EXCLUDE). Defaults to INCLUDE when omitted.
    Enum: "INCLUDE", "EXCLUDE"

  - `rules.criteria.employeeGroups` (object)
    Match employees by the groups they belong to.
    Example: {"matches":["Finance","Engineering"]}

  - `rules.criteria.appTypes` (object)
    Match accounts by the app they belong to.
    Example: {"matches":["MICROSOFT_COPILOT","GOOGLE_GEMINI","ANTHROPIC_CLAUDE","OPENAI_CHATGPT","GROK","DEEPSEEK","PERPLEXITY","FIGMA"]}

  - `rules.criteria.appTypes.matches` (array)
    One or more values to match.

  - `rules.criteria.loginDomains` (object)
    Match by the domain of the email used to log in. Required when domainScope is SPECIFIC_DOMAINS, and must be omitted otherwise.
    Example: {"matches":["personal-mail.com"]}

  - `rules.criteria.loginTypes` (object)
    Match by the login method used. Each value must be one of PASSWORD_LOGIN, OIDC or FEDCM.
    Example: {"matches":["PASSWORD_LOGIN"]}

  - `rules.criteria.browserTypes` (object)
    Match by the browser the login happens in. Each value must be one of ARC, ATLAS, BRAVE, CHROME, COMET, DIA, EDGE, FIREFOX, ISLAND, OPERA, PRISMA_ACCESS, or SAFARI.
    Example: {"matches":["CHROME"]}

  - `rules.criteria.domainScope` (object, required)
    Match by whether the login email's domain is one of your company's domains. Required on every rule.

  - `rules.criteria.domainScope.matches` (array, required)
    A single value: COMPANY_DOMAINS (logins with your company domains), NON_COMPANY_DOMAINS (logins outside your company domains), or SPECIFIC_DOMAINS (exactly the domains listed in loginDomains).
    Example: ["SPECIFIC_DOMAINS"]

  - `rules.criteria.profileScope` (object)
    Match by the profile in use on the browser. If omitted, defaults to ALL.

  - `rules.criteria.profileScope.matches` (array, required)
    A single value: ALL (any logged in profile), COMPANY_DOMAIN (profiles for your company domains), or NON_COMPANY_DOMAIN (profiles outside your company domains).
    Example: ["ALL"]

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 403:

  - `403` (unknown)
    Forbidden (read-only API key)

## Response 404:

  - `404` (unknown)
    Not Found

