---
title: "Detach configurations from repositories"
method: DELETE
path: "/orgs/{org}/code-security/configurations/detach"
tags: ["code-security"]
---

# Detach configurations from repositories

`DELETE /orgs/{org}/code-security/configurations/detach`

Detach code security configuration(s) from a set of repositories.
Repositories will retain their settings but will no longer be associated with the configuration.

The authenticated user must be an administrator or security manager for the organization to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.

## Path parameters

- `org` string, required

## Request body

- object
  - `selected_repository_ids` integer[], required — An array of repository IDs to detach from configurations. Up to 250 IDs can be provided.

## Response `204`

A header with no content is returned.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Resource not found
- `409` — Conflict

---

[API](https://skmtc.net/github/apis/github-v3-rest-api.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api/versions/a367f7028301/schema)
