---
title: "Generate Share Links"
method: POST
path: "/shares/generate"
---

# Generate Share Links

`POST /shares/generate`

## Request

- Base URL: `https://api.pavoot.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pavoot.com/shares/generate`
- Auth: none declared

Generates one or multiple share links based on person IDs and folder names.

Logic:
- Person images: images where image_faces.person_id matches
- folderNames: tag values (uncategorized folders, brands, custom options — not only project_folders).
  Images: tagged with that name AND "Highlights" (general). Locked tags on images are excluded
  on the share page/download unless unlocked for that link (sharelink_unlocked_tags).
- Final set: personMedia ∪ tagMedia (deduplicated)

If mode="per_person": creates one share per personId with label=person.name
If mode="all_in_one": creates one share with all selected persons + folders
If no people and customTagLinkMode="per_option" with 2+ custom tag options selected:
one share per option; each share includes the same folders/brands plus that option.
Labels use labelStrategyCustomFolder (e.g. category_option → "Category - Option").

## Request body

- GenerateShareLinksRequest
  - `projectId` integer, required
  - `personIds` string[]
  - `mode` 'per_person' | 'all_in_one'
  - `folderNames` string[]
  - `folderCategories` object
  - `expiresInDays` integer, nullable
  - `password` string, nullable
  - `creatorDisplay` string, nullable
  - `labelStrategyPeople` 'name_only' | 'category_name' | 'name_category', nullable
  - `labelStrategyBrands` 'name_only' | 'brand_prefix', nullable
  - `labelStrategyCustomFolder` 'name_only' | 'category_option', nullable
  - `category` string, nullable
  - `linkLabel` string, nullable
  - `customTagLinkMode` 'combined' | 'per_option', nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pavoot/apis/pavoot-api.md) - [All operations](https://skmtc.dev/pavoot/apis/pavoot-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pavoot/apis/pavoot-api/revisions/8c0cd91c2a05?raw)
