---
title: "Add an exclude path to a code repo"
method: POST
path: "/repositories/code/{code_repo_id}/exclude-path"
---

# Add an exclude path to a code repo

`POST /repositories/code/{code_repo_id}/exclude-path`

Add an exclude path to a code repo

## Path parameters

- `code_repo_id` integer, required

## Request body

- object
  - `path` string, required — The path to exclude
  - `reason` string — Optional reason for excluding this path

## Response `200`

The code repository exclude path has been added.

- object
  - `excluded_path_id` integer — The internal ID of the excluded path

---

[API](https://skmtc.dev/aikido/apis/authorization.md) · [All operations](https://skmtc.dev/aikido/apis/authorization/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aikido/authorization/revisions/5445e7c21137/schema)
