---
title: "Share components with users. WARNING: Authoritative; deletes/overwrites all pre-existing shares for the given components"
method: PUT
path: "/componentmetadata/shares"
tags: ["component-metadata - shares"]
---

# Share components with users. WARNING: Authoritative; deletes/overwrites all pre-existing shares for the given components

`PUT /componentmetadata/shares`

## Request body

- SharedComponent
  - `componentType` string
  - `componentId` string
  - `shares` Share[]
    - `id` integer — the share id
    - `shareToId` integer — the id of the user/group the component is shared with
    - `shareToType` string — the type of entity shared with (user/group/all)
    - `shareToDisplayName` string — full name of the entity shared with
    - `componentType` string — the type of component being shared
    - `componentId` string — the id of the component being shared
    - `accessLevel` string — Level of rights shared with entity. (for projects only)

## Response `200`

successful operation

- SharedComponent
  - `componentType` string
  - `componentId` string
  - `shares` Share[]
    - `id` integer — the share id
    - `shareToId` integer — the id of the user/group the component is shared with
    - `shareToType` string — the type of entity shared with (user/group/all)
    - `shareToDisplayName` string — full name of the entity shared with
    - `componentType` string — the type of component being shared
    - `componentId` string — the id of the component being shared
    - `accessLevel` string — Level of rights shared with entity. (for projects only)

## Other responses

- `500` — Unexpected server error while trying to update shares

## Changes

- **2022-05-10** `dcd4514630c4` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/adobe/apis/adobe-analytics-apis/changes/componentmetadata/shares/put.md)

---

[API](https://skmtc.dev/adobe/apis/adobe-analytics-apis.md) · [All operations](https://skmtc.dev/adobe/apis/adobe-analytics-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/adobe/adobe-analytics-apis/revisions/dcd4514630c4/schema)
