---
title: "Creates a new exclusion for an account based on scope and environment."
method: POST
path: "/v1/accounts/{accountSid}/exclusions"
tags: ["Exclusions"]
---

# Creates a new exclusion for an account based on scope and environment.

`POST /v1/accounts/{accountSid}/exclusions`

## Request

- Base URL: `https://api.apitraffic.io`
- URL: `https://api.apitraffic.io/v1/accounts/{accountSid}/exclusions`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apitraffic/apis/apitraffic-api-documentation/docs/v1/accounts/:accountSid/exclusions/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `accountSid` string, required: accountSid

## Request body

- Exclusion20Creation20Payload (unresolved $ref)

## Response `200`

Successful

- Exclusion
  - `sid` string, required: Sid of the exclusion
  - `accountSid` string, required: accountSid
  - `description` string, nullable: A short description for the exclusion.
  - `criteria` string, required: The criteria that should be used to exclude requests.
  - `buckets` union: An array of bucketSids that this exclusion should apply to.
    - Buckets (unresolved $ref)
    - Model2 (unresolved $ref)
  - `environments` union: An array of environments to apply this to. This should be omitted to apply to all environments.
    - Environments (unresolved $ref)
    - Model4 (unresolved $ref)
  - `enabled` boolean: If the exclusion is currently enabled or not.
  - `createdAt` string, required
  - `updatedAt` string, nullable
  - `deletedAt` string, nullable

## Other responses

- `400`: Bad Request

---

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