---
title: "Exclude inherited item"
method: POST
path: "/v1/environments/{environment_id}/exclusions"
tags: ["Environments"]
---

# Exclude inherited item

`POST /v1/environments/{environment_id}/exclusions`

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/environments/{environment_id}/exclusions`
- Auth: HTTP bearer

Hides an inherited item from this environment and its forks. `DELETE` on an inherited variable, file, MCP, skill, or registry through this environment does the same. Locked variables can't be excluded (`409`).

## Path parameters

- `environment_id` string, required

## Headers

- `X-Replicas-Api-Version` '2026-10-07'

## Request body

- InheritanceKeyRequest
  - `kind` 'variable' | 'file' | 'mcp' | 'skill' | 'skills_registry' | 'plugin' | 'integration', required
  - `key` string, required: Variable key, file path, MCP name, skill slug, registry URL, plugin id, or `doppler`/`infisical`.

## Response `200`

Excluded

- SuccessResponse: Generic success response.
  - `success` boolean, required

## Other responses

- `400`: Bad request - Missing or invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - The authenticated account cannot access this resource
- `404`: Resource not found
- `409`: Conflict - Resource already exists or operation conflicts with current state
- `500`: Internal server error

---

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