> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.docs.modulards.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server.

# Hide or show a component's update notice

PATCH https://api.modulards.com/api/public/v1/components/{component}/visibility
Content-Type: application/json

Hides or shows the update notice of one plugin, theme or WordPress version on the websites you list in `sites`. A hidden item is left out of site item listings and totals unless you ask for hidden items, and requests that act on the component skip it. The change is immediate: nothing runs on the websites and their connection is not checked, so there is nothing to follow up.

The answer lists the items that changed. Websites that cannot be processed are reported in `meta.skipped`, each with a `reason_code` and a message, and do not fail the call. A website is skipped as `NOT_FOUND` when the component is not installed on it, as `ALREADY_APPLIED` when it already has the requested state, and as `PERMISSION_DENIED` when you have no access to it.

**Body**
- `sites` (array of integers, required): ids of the websites to act on, 1 to 50.
- `is_hidden` (boolean, required): `true` hides the update notice, `false` shows it again. It sets the state and never flips it.

**Errors**
- **404**: the component is not installed on any of your websites.
- **422**: `sites` is invalid, or `is_hidden` is missing or not a boolean.

Reference: https://api.docs.modulards.com/modular-ds-public-api/updater/components/hide-or-show-a-component-s-update-notice

## Authentication

- `Authorization` header (bearer token, required) — Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.

## Request

### Path parameters

- `component` (string, required)

### Body (application/json)

This endpoint expects an object.

- `is_hidden` (boolean, optional)
- `sites` (list of double, optional)

## Response

### 200

200 - One website hidden, one already hidden

- `jsonapi` (ApiPublicV1ComponentsComponentVisibilityPatchResponsesContentApplicationJsonSchemaJsonapi, optional)
- `meta` (ApiPublicV1ComponentsComponentVisibilityPatchResponsesContentApplicationJsonSchemaMeta, optional)

## Types

### ApiPublicV1ComponentsComponentVisibilityPatchResponsesContentApplicationJsonSchemaJsonapi

- `version` (string, optional)

### ApiPublicV1ComponentsComponentVisibilityPatchResponsesContentApplicationJsonSchemaMeta

- `skipped` (list of ApiPublicV1ComponentsComponentVisibilityPatchResponsesContentApplicationJsonSchemaMetaSkippedItems, optional)
- `status` (enum, optional) — applied when at least one website changed, skipped when none did.
  - Allowed values: `applied`, `skipped`
- `updated` (list of ApiPublicV1ComponentsComponentVisibilityPatchResponsesContentApplicationJsonSchemaMetaUpdatedItems, optional)

### ApiPublicV1ComponentsComponentVisibilityPatchResponsesContentApplicationJsonSchemaMetaSkippedItems

- `message` (string, optional) — Human-readable explanation of the reason.
- `reason_code` (string, optional) — Why the website was skipped: NOT_FOUND, ALREADY_APPLIED or PERMISSION_DENIED.
- `site_id` (integer, optional) — Id of the website that was skipped.
- `site_item_id` (any, optional, nullable) — Always null: no site item was changed.
- `site_name` (string, optional, nullable) — Name of the website; null when you have no access to it.

### ApiPublicV1ComponentsComponentVisibilityPatchResponsesContentApplicationJsonSchemaMetaUpdatedItems

- `site_id` (integer, optional) — Id of the website where the update notice changed.
- `site_item_id` (integer, optional) — Id of the site item whose update notice changed.
- `site_name` (string, optional) — Name of that website.

## Examples

### 200 - One website hidden, one already hidden

**Response**

```json
{
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "skipped": [
      {
        "message": "WooCommerce is already hidden on this website.",
        "reason_code": "ALREADY_APPLIED",
        "site_id": 13,
        "site_item_id": null,
        "site_name": "Blog"
      }
    ],
    "status": "applied",
    "updated": [
      {
        "site_id": 12,
        "site_item_id": 301,
        "site_name": "Shop"
      }
    ]
  }
}
```

**SDK Code**

```python 200 - One website hidden, one already hidden
import requests

url = "https://api.modulards.com/api/public/v1/components/component/visibility"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript 200 - One website hidden, one already hidden
const url = 'https://api.modulards.com/api/public/v1/components/component/visibility';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 200 - One website hidden, one already hidden
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modulards.com/api/public/v1/components/component/visibility"

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 200 - One website hidden, one already hidden
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/components/component/visibility")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java 200 - One website hidden, one already hidden
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.modulards.com/api/public/v1/components/component/visibility")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 200 - One website hidden, one already hidden
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.modulards.com/api/public/v1/components/component/visibility', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp 200 - One website hidden, one already hidden
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/components/component/visibility");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 200 - One website hidden, one already hidden
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/components/component/visibility")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Hide or show a component's update notice

**Request**

```json
{
  "is_hidden": true,
  "sites": [
    12
  ]
}
```

**Response**

```json
{
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "skipped": [
      {
        "message": "WooCommerce is already hidden on this website.",
        "reason_code": "ALREADY_APPLIED",
        "site_id": 13,
        "site_item_id": null,
        "site_name": "Blog"
      }
    ],
    "status": "applied",
    "updated": [
      {
        "site_id": 12,
        "site_item_id": 301,
        "site_name": "Shop"
      }
    ]
  }
}
```

**SDK Code**

```python Hide or show a component's update notice
import requests

url = "https://api.modulards.com/api/public/v1/components/component/visibility"

payload = {
    "is_hidden": True,
    "sites": [12]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Hide or show a component's update notice
const url = 'https://api.modulards.com/api/public/v1/components/component/visibility';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"is_hidden":true,"sites":[12]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Hide or show a component's update notice
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modulards.com/api/public/v1/components/component/visibility"

	payload := strings.NewReader("{\n  \"is_hidden\": true,\n  \"sites\": [\n    12\n  ]\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Hide or show a component's update notice
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/components/component/visibility")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"is_hidden\": true,\n  \"sites\": [\n    12\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Hide or show a component's update notice
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.modulards.com/api/public/v1/components/component/visibility")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"is_hidden\": true,\n  \"sites\": [\n    12\n  ]\n}")
  .asString();
```

```php Hide or show a component's update notice
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.modulards.com/api/public/v1/components/component/visibility', [
  'body' => '{
  "is_hidden": true,
  "sites": [
    12
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Hide or show a component's update notice
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/components/component/visibility");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"is_hidden\": true,\n  \"sites\": [\n    12\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Hide or show a component's update notice
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "is_hidden": true,
  "sites": [12]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/components/component/visibility")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```