---
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`

## Request

- Base URL: `https://api.tiro.ooo`
- URL: `https://api.tiro.ooo/v1/external/notes/{noteGuid}/share-link`
- Auth: HTTP bearer

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.dev/tiro/apis/tiro-api-2.md) · [All operations](https://skmtc.dev/tiro/apis/tiro-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/tiro/apis/tiro-api-2/revisions/dc1a260c6771?raw)
