---
title: "Create a new exclusion for a workspace"
method: POST
path: "/test/coverage/workspace/{workspace_id}/exclusions"
tags: ["Coverage"]
---

# Create a new exclusion for a workspace

`POST /test/coverage/workspace/{workspace_id}/exclusions`

Create a new exclusion for a workspace

## Path parameters

- `workspace_id` string, required

## Request body

- CoverageExclusion
  - `id` string — The ID of the coverage exclusion
  - `workspace_id` string — The ID of the workspace to which this exclusion applies
  - `host_pattern` string — The host name of the site to ignore
  - `path_patterns` string[] — The path/subpaths to ignore
  - `is_enabled` boolean — Whether the exclusion is in effect
  - `last_updated_time` integer — Time at which the exclusion was last updated
  - `last_updated_by_id` string — The ID of the user who last updated this exclusion
  - `created_time` integer — Time at which the exclusion was created
  - `created_by_id` string — The ID of the user who created this exclusion

## Response `200`

Results of the query

- CoverageExclusion
  - `id` string — The ID of the coverage exclusion
  - `workspace_id` string — The ID of the workspace to which this exclusion applies
  - `host_pattern` string — The host name of the site to ignore
  - `path_patterns` string[] — The path/subpaths to ignore
  - `is_enabled` boolean — Whether the exclusion is in effect
  - `last_updated_time` integer — Time at which the exclusion was last updated
  - `last_updated_by_id` string — The ID of the user who last updated this exclusion
  - `created_time` integer — Time at which the exclusion was created
  - `created_by_id` string — The ID of the user who created this exclusion

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — Invalid or missing workspace
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
