---
title: "Upsert Share Link"
method: PUT
path: "/v1/external/notes/{noteGuid}/share-link"
tags: ["Note Share Link"]
---

# Upsert Share Link

`PUT /v1/external/notes/{noteGuid}/share-link`

Create or update a share link for a note.

- If no link exists, creates a new one. If it already exists, updates password settings.
- An empty body `{}` creates a link without a password.

### `usePassword` behavior

| `usePassword` | No existing link | Existing link |
|---|---|---|
| `null` (omit) | Create without password | Keep current state |
| `true` | Create with password | (Re)generate password |
| `false` | Create without password | Remove password |

> `sharePassword` is only included when `usePassword: true`. Store it immediately — it cannot be retrieved later.

## Path parameters

- `noteGuid` string, required

## Request body

- ShareLinkRequest
  - `usePassword` boolean, nullable — Controls the share link password. - `true` — Generate password (regenerate if one exists) - `false` — Remove password (or create without one) - `null` / omitted — Keep current password state

## Response `200`

Share link created or updated

- ShareLinkResponse
  - `shareId` string, required — Unique share link identifier
  - `shareUrl` string, uri, required — Full URL for accessing the shared note
  - `sharePassword` string, nullable — Share link password. - Only returned on PUT with `usePassword: true` - Always `null` in GET responses
  - `hasPassword` boolean, required — Whether the share link has a password

## Other responses

- `401` — Unauthorized
- `403` — Link sharing not allowed for this team
- `404` — Note not found

---

[API](https://skmtc.net/tiro/apis/tiro-api.md) · [All operations](https://skmtc.net/tiro/apis/tiro-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tiro/tiro-api/revisions/ae18d7961aa4/schema)
