---
title: "Update the site protection rule"
method: PATCH
path: "/v2/sites/{site_id}/site_protection_rule/"
tags: ["site protection rule"]
---

# Update the site protection rule

`PATCH /v2/sites/{site_id}/site_protection_rule/`

Update the site protection rule

## Path parameters

- `site_id` string, required — Unique identifier for a resource

## Request body

- object
  - `metadata` SiteProtectionRuleResourceMetadata — Metadata allowed when updating a site protection rule
    - `rule_type` 'allow' | 'deny' — Determines whether listed `countries` are included or excluded from viewing content
    - `countries` string[] — List of countries that are applicable to the protection rule Countries are specified using two-letter country codes as defined in ISO 3166.

## Response `200`

Resource successfully updated

- SiteProtectionRuleResourceRead — Resource for managing the site protection rule
  - `schema` string
  - `id` string — Unique identifier for a resource
  - `created` string — Date and time at which the resource was created
  - `last_modified` string — Date and time at which the resource was most recently modified
  - `type` string — Name of the type of resource.
  - `relationships` object — Ancilliary resources associated to the primary resource being read
  - `metadata` SiteProtectionRuleResourceMetadata — Metadata allowed when updating a site protection rule
    - `rule_type` 'allow' | 'deny' — Determines whether listed `countries` are included or excluded from viewing content
    - `countries` string[] — List of countries that are applicable to the protection rule Countries are specified using two-letter country codes as defined in ISO 3166.

## Other responses

- `400` — Bad Request The request either lacks certain attributes or contains malformed/invalid attributes.

---

[API](https://skmtc.net/jwplayer/apis/management-api-v2.md) · [All operations](https://skmtc.net/jwplayer/apis/management-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jwplayer/management-api-v2/revisions/180db7cada27/schema)
