---
title: "Create Exclusion Rule"
method: POST
path: "/v1/config/ingestion/exclusions"
tags: ["Exclusions"]
---

# Create Exclusion Rule

`POST /v1/config/ingestion/exclusions`

## Request

- Base URL: `https://api.mezmo.com/v3`
- URL: `https://api.mezmo.com/v3/v1/config/ingestion/exclusions`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/mezmo/apis/pipeline-api/docs/v1/config/ingestion/exclusions/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new ingestion exclusion rule to help reduce log volume

## Request body

- StreamExclusionRequest
  - `hosts` Hosts[]
  - `apps` Apps[]
  - `title` string, required
  - `active` boolean
  - `indexonly` boolean
  - `query` string: Search query.
  - `id` string

## Response `200`

OK

- StreamExclusionRequest
  - `hosts` Hosts[]
  - `apps` Apps[]
  - `title` string, required
  - `active` boolean
  - `indexonly` boolean
  - `query` string: Search query.
  - `id` string

## Other responses

- `400`: Bad request. Query inside of exclusion rule failed to parse.
- `500`: An internal error occured when trying to create exclusion rule.

---

[API](https://skmtc.dev/mezmo/apis/pipeline-api.md) - [All operations](https://skmtc.dev/mezmo/apis/pipeline-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mezmo/apis/pipeline-api/revisions/fb2535545d90?raw)
