---
title: "Create Share"
method: POST
path: "/share/albums/{album_id}"
tags: ["Share"]
---

# Create Share

`POST /share/albums/{album_id}`

## Request

- Base URL: `http://localhost:52123`
- URL: `http://localhost:52123/share/albums/{album_id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/aossie-org/apis/pictopy/docs/share/albums/:album_id/post.ts> (a function with typed inputs; its response is checked against the schema)

Issue a share token and make sure the network listener is up.

An album's local lock is deliberately not consulted: locking protects the
album inside PictoPy, while sharing carries its own authorization — the
optional password on this request, which is hashed and never read back.

## Path parameters

- `album_id` string, required

## Request body

- CreateShareRequest
  - `expires_in_minutes` integer, nullable
  - `password` string, nullable

## Response `200`

Successful Response

- CreateShareResponse
  - `success` boolean, required
  - `message` string, required
  - `data` Share, required
    - `token` string, required
    - `album_id` string, required
    - `album_name` string, required
    - `image_count` integer, required
    - `port` integer, required
    - `created_at` string, required
    - `expires_at` string, nullable
    - `is_protected` boolean, required
    - `urls` ShareUrl[], required
      - `interface` string, required
      - `ip` string, required
      - `url` string, required

## Other responses

- `404`: Not Found
- `422`: Validation Error
- `500`: Internal Server Error

## Changes

- **2026-09-16** `72c3038bc111`: 2 info
  - added the new optional request property `anyOf[subschema #1: CreateShareRequest]/password`
  - added the required property `data/is_protected` to the response with the `200` status
- **2026-08-06** `a6c11e6b42e4`: 1 breaking, 1 warning, 1 info
  - the request's body type changed from `object` to no type
  - removed the request property `expires_in_minutes`
  - added `#/components/schemas/CreateShareRequest, subschema #2` to the request body `anyOf` list
- **2026-08-06** `1f470deef917`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/aossie-org/apis/pictopy/changes/share/albums/:album_id/post.md)

---

[API](https://skmtc.dev/aossie-org/apis/pictopy.md) - [All operations](https://skmtc.dev/aossie-org/apis/pictopy/llms.txt) - [OpenAPI document](https://skmtc.dev/aossie-org/apis/pictopy/revisions/9fe895216588?raw)
