---
title: "Update organization pattern configurations"
method: PATCH
path: "/orgs/{org}/secret-scanning/pattern-configurations"
tags: ["secret-scanning"]
---

# Update organization pattern configurations

`PATCH /orgs/{org}/secret-scanning/pattern-configurations`

Updates the secret scanning pattern configurations for an organization.

Personal access tokens (classic) need the `write:org` scope to use this endpoint.

## Path parameters

- `org` string, required

## Request body

- object
  - `pattern_config_version` string, nullable — The version of the entity. This is used to confirm you're updating the current version of the entity and mitigate unintentionally overriding someone else's update.
  - `provider_pattern_settings` object[] — Pattern settings for provider patterns.
    - `token_type` string — The ID of the pattern to configure.
    - `push_protection_setting` 'not-set' | 'disabled' | 'enabled' — Push protection setting to set for the pattern.
  - `custom_pattern_settings` object[] — Pattern settings for custom patterns.
    - `token_type` string — The ID of the pattern to configure.
    - `custom_pattern_version` string, nullable — The version of the entity. This is used to confirm you're updating the current version of the entity and mitigate unintentionally overriding someone else's update.
    - `push_protection_setting` 'disabled' | 'enabled' — Push protection setting to set for the pattern.

## Response `200`

Response

- object
  - `pattern_config_version` string — The updated pattern configuration version.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Resource not found
- `409` — Conflict
- `422` — Validation failed, or the endpoint has been spammed.

---

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