---
title: "Update the Component based on the specified Component Id"
method: PATCH
path: "/components/{component_id}"
tags: ["components"]
---

# Update the Component based on the specified Component Id

`PATCH /components/{component_id}`

You need `tenants.component.edit_access` permission to access this resource

This resource allows you to perform the next actions:
1. Change component's access level from `team` to `tenant`. (Please note, that this action is irreversible i.e. API does not allow to change `access` back to `team`.)
2. Change component's whitelisted contract ids

A component may have one of the following access level:
- ``team`` – no sharing. Only team members can use the component.
- ``tenant`` – component could be used by the other clients in the tenant.
- ``global`` – special mode for components from the standard set of components of the Platform (e.g. ``Timer``, ``Webhook`` etc). Any user of the platform can use ``global`` components.

You can edit whitelisted contracts only for components with `tenant` or `global` access

## Path parameters

- `component_id` string, required

## Request body

- object
  - `data` object, required
    - `type` 'component', required
    - `attributes` object, required
      - `access` 'tenant' — A value should be `tenant` for increasing access from `team` level
      - `whitelisted_contract_ids` string[] — List of Contracts where this components is available for full Workspaces

## Response `200`

OK

- object
  - `data` object, required
    - `id` string, required
    - `type` 'component', required
    - `links` object, required
      - `self` string, required
    - `attributes` object, required
      - `name` string, required — Repository name
      - `icon` string — Component icon as base64 string
      - `team_name` string — Developer Team name
      - `access` 'team' | 'tenant' | 'global'
      - `whitelisted_contract_ids` string[] — List of Contracts where this components is available for full Workspaces
      - `docker_repo_name` string — String representing component’s name in docker registry. Available only if team supports docker registry
      - `docker_target_tag` string — String representing component’s tag in docker registry. Available only if team supports docker registry
    - `relationships` object, required
      - `versions` object, required
        - `links` object, required
          - `related` string, required
  - `meta` object, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict

---

[API](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2.md) · [All operations](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/elastic-io-rest-api-documentation-v2/revisions/411f9f98c01e/schema)
