---
title: "Change an existing share’s role"
method: PATCH
path: "/api/v1/apps/{appId}/shares/{shareId}"
tags: ["AppShares"]
---

# Change an existing share’s role

`PATCH /api/v1/apps/{appId}/shares/{shareId}`

## Request

- Base URL: `https://charm.ing`
- URL: `https://charm.ing/api/v1/apps/{appId}/shares/{shareId}`
- Auth: HTTP bearer

User-gated (`chrm_user_*` or session); requires `app:share`. Updates the grant or email invitation addressed by its opaque share id.

## Path parameters

- `appId` string, uuid, required
- `shareId` string, uuid, required

## Request body

- object
  - `role` 'collaborator' | 'end-user' | 'viewer', required

## Response `200`

Role changed.

- ShareRoleResponse
  - `ok` true, required
  - `role` 'collaborator' | 'end-user' | 'viewer', required

## Other responses

- `400`: Invalid app id, share id, or body.
- `401`: Sign-in required.
- `403`: The caller cannot manage shares.
- `404`: App or share not found.
- `409`: The app has no owner.

---

[API](https://skmtc.dev/charm/apis/charming-api.md) · [All operations](https://skmtc.dev/charm/apis/charming-api/llms.txt) · [OpenAPI document](https://skmtc.dev/charm/apis/charming-api/revisions/a9d06c419b3a?raw)
