﻿---
title: stack kb security-exceptions-api create-exception-list-item cli command
description: Create an exception list item Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4075/reference/elastic-cli/cli/stack/kb/security-exceptions-api/create-exception-list-item
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb security-exceptions-api create-exception-list-item cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb security-exceptions-api create-exception-list-item \
  --description <description> \
  --name <name> \
  --type <type> \
  --list-id <list-id> \
  [options]
```

Create an exception list item
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--description string required">
  </definition>
  <definition term="--name string required">
  </definition>
  <definition term="--type enum required">
    **Values:** simple
  </definition>
  <definition term="--list-id enum required">
    **Values:** endpoint_blocklists
  </definition>
  <definition term="--comments string[]">
    **Repeatable:** pass `--comments` multiple times to supply more than one value
  </definition>
  <definition term="--expire-time string">
  </definition>
  <definition term="--item-id string">
  </definition>
  <definition term="--meta string">
  </definition>
  <definition term="--namespace-type enum">
    **Values:** agnostic, single
  </definition>
  <definition term="--entries string[]">
    **Validation rules:**
    - Hash entries: up to 3 (one for each hash type: md5, sha1, sha256)
    - Path entry: only 1 allowed
    **Repeatable:** pass `--entries` multiple times to supply more than one value
  </definition>
  <definition term="--os-types string[]">
    macOS-only
    **Repeatable:** pass `--os-types` multiple times to supply more than one value
  </definition>
  <definition term="--tags string[]">
    **Repeatable:** pass `--tags` multiple times to supply more than one value
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>