# Replace the clipboard blocking configuration

Replaces your organization's clipboard blocking configuration with the
configuration you send. Any rule you don't include is deleted, and
`globals.customContentPatterns` replaces your entire custom-pattern list —
send the complete set you want to keep, or an empty array to clear it.
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/clipboardBlocking/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, required)
    Control-wide settings that apply across every rule.

  - `globals.customContentPatterns` (array)
    Your organization's custom content patterns for matching clipboard content, available to every rule alongside the Push-defined pattern catalogue.
    Example: [{"enum":"CUSTOM_INCIDENT_TICKET","name":"Incident ticket","regex":"INC-\\d{6}"}]

  - `globals.customContentPatterns.enum` (string)
    Identifier that rules use to reference the pattern in criteria.regexPatterns. Derived automatically from the name.
    Example: CUSTOM_INCIDENT_TICKET

  - `globals.customContentPatterns.name` (string, required)
    A short name to help you recognise the pattern.
    Example: Incident ticket

  - `globals.customContentPatterns.regex` (string, required)
    The regular expression to match clipboard content against.
    Example: INC-\d{6}

  - `rules` (array, required)
    Complete list of Clipboard Blocking 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: Warn when copying incident tickets

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

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

  - `rules.operation` (string, required)
    Which clipboard operation the rule applies to.
    Enum: "COPY", "PASTE"

  - `rules.contentCapture` (boolean, required)
    Whether the matching clipboard content is captured on the resulting events.
    Example: true

  - `rules.maskPii` (boolean)
    Whether personally identifiable information is masked in captured content. Required when contentCapture is true, and ignored when it is false.
    Example: true

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

  - `rules.subtext` (string)
    Message of the banner shown to the user. Markdown is supported. Required when mode is WARN or BLOCK, and must be omitted for MONITOR and OFF.
    Example: Copying incident tickets outside company applications is not permitted.

  - `rules.copyRedactedButtonText` (string)
    Text of the banner button that copies a redacted version of the content. Required when mode is WARN or BLOCK and the rule matches regex patterns, and must be omitted when it does not.
    Example: Copy redacted

  - `rules.copyOriginalButtonText` (string)
    Text of the banner button that proceeds with the original content. Required when mode is WARN, and must be omitted for every other mode.
    Example: Copy anyway

  - `rules.acknowledgeButtonText` (string)
    Text of the banner button that dismisses the banner. Required when mode is BLOCK and the rule matches no regex patterns, and must be omitted otherwise.
    Example: Understood

  - `rules.criteria` (object, required)
    Restrict the rule to apply only under the specified conditions. At least one of urlPatterns or regexPatterns is required.

  - `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.urlPatterns` (object)
    Match by the URL of the page the clipboard operation happens on. Each value must be a `*://`-prefixed URL pattern.
    Example: {"matches":["*://*.example.com/"]}

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

  - `rules.criteria.regexPatterns` (object)
    Match the clipboard content against regex patterns, referenced by enum. Each value must resolve to a pattern in the Push catalogue or in globals.customContentPatterns.
    Example: {"matches":["JWT","CUSTOM_INCIDENT_TICKET"]}

  - `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: ["COMPANY_DOMAIN"]

## Request examples:

  - `Remove all rules and clear custom content patterns` (unknown)

  - `Warn when incident tickets are copied on company profiles` (unknown)

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `globals` (object, required)
    Control-wide settings that apply across every rule.

  - `globals.customContentPatterns` (array)
    Your organization's custom content patterns for matching clipboard content, available to every rule alongside the Push-defined pattern catalogue.
    Example: [{"enum":"CUSTOM_INCIDENT_TICKET","name":"Incident ticket","regex":"INC-\\d{6}"}]

  - `globals.customContentPatterns.enum` (string)
    Identifier that rules use to reference the pattern in criteria.regexPatterns. Derived automatically from the name.
    Example: CUSTOM_INCIDENT_TICKET

  - `globals.customContentPatterns.name` (string, required)
    A short name to help you recognise the pattern.
    Example: Incident ticket

  - `globals.customContentPatterns.regex` (string, required)
    The regular expression to match clipboard content against.
    Example: INC-\d{6}

  - `rules` (array, required)
    Complete list of Clipboard Blocking 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: Warn when copying incident tickets

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

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

  - `rules.operation` (string, required)
    Which clipboard operation the rule applies to.
    Enum: "COPY", "PASTE"

  - `rules.contentCapture` (boolean, required)
    Whether the matching clipboard content is captured on the resulting events.
    Example: true

  - `rules.maskPii` (boolean)
    Whether personally identifiable information is masked in captured content. Required when contentCapture is true, and ignored when it is false.
    Example: true

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

  - `rules.subtext` (string)
    Message of the banner shown to the user. Markdown is supported. Required when mode is WARN or BLOCK, and must be omitted for MONITOR and OFF.
    Example: Copying incident tickets outside company applications is not permitted.

  - `rules.copyRedactedButtonText` (string)
    Text of the banner button that copies a redacted version of the content. Required when mode is WARN or BLOCK and the rule matches regex patterns, and must be omitted when it does not.
    Example: Copy redacted

  - `rules.copyOriginalButtonText` (string)
    Text of the banner button that proceeds with the original content. Required when mode is WARN, and must be omitted for every other mode.
    Example: Copy anyway

  - `rules.acknowledgeButtonText` (string)
    Text of the banner button that dismisses the banner. Required when mode is BLOCK and the rule matches no regex patterns, and must be omitted otherwise.
    Example: Understood

  - `rules.criteria` (object, required)
    Restrict the rule to apply only under the specified conditions. At least one of urlPatterns or regexPatterns is required.

  - `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.urlPatterns` (object)
    Match by the URL of the page the clipboard operation happens on. Each value must be a `*://`-prefixed URL pattern.
    Example: {"matches":["*://*.example.com/"]}

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

  - `rules.criteria.regexPatterns` (object)
    Match the clipboard content against regex patterns, referenced by enum. Each value must resolve to a pattern in the Push catalogue or in globals.customContentPatterns.
    Example: {"matches":["JWT","CUSTOM_INCIDENT_TICKET"]}

  - `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: ["COMPANY_DOMAIN"]

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 403:

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

## Response 404:

  - `404` (unknown)
    Not Found

