---
title: "Invite a user to an app"
method: POST
path: "/api/v1/apps/{appId}/shares"
tags: ["AppShares"]
---

# Invite a user to an app

`POST /api/v1/apps/{appId}/shares`

## Request

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

User-gated (`chrm_user_*` or session); owner only (`app:share`). Creates a pending invitation — `status: "pending"` for an existing account, `"invited"` for an email with no account yet. No access is granted until the grantee accepts.

## Path parameters

- `appId` string, uuid, required

## Request body

- object
  - `grantee` string, required: Handle or email of the invitee.
  - `role` 'collaborator' | 'end-user' | 'viewer'

## Response `201`

Invitation created.

- ShareInviteResponse: `pending` = an existing user must accept; `invited` = an email-keyed invitation that materializes when that address registers.
  - `ok` true, required
  - `status` 'pending' | 'invited', required

## Other responses

- `400`: Invalid body or app id.
- `401`: Sign-in required.
- `403`: Only the owner can manage shares.
- `404`: App not found, or no account for the grantee handle.
- `409`: Unshareable state (unclaimed app, self-share, existing access, or pending invitation).
- `429`: Share-lookup rate limit or invitation cap.

---

[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)
