---
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`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/repositories/code/{code_repo_id}/exclude-path`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `repositories:write`

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/aikido-security-api-documentation.md) - [All operations](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/revisions/da8691338133?raw)
