Skip to content

Shared links API

Base URL: https://YOUR-SERVER/api. Send your API key in x-api-key where authentication is required. A key also needs the listed permission; your account's access rules still apply.

API guide · All endpoints · OpenAPI JSON

GET /api/shared-links

Retrieve a list of all shared links.

Authentication: API key. Permission: sharedLink.read.

Parameters

NameWhereRequiredDescription
albumIdqueryNoFilter by album ID
idqueryNoFilter by shared link ID
Parameter types, defaults and constraints
[
  {
    "name": "albumId",
    "required": false,
    "in": "query",
    "description": "Filter by album ID",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  },
  {
    "name": "id",
    "required": false,
    "in": "query",
    "description": "Filter by shared link ID",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  }
]

Responses

Field definitions: SharedLinkResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "items": {
            "$ref": "#/components/schemas/SharedLinkResponseDto"
          },
          "type": "array"
        }
      }
    },
    "description": ""
  }
}

POST /api/shared-links

Create a new shared link.

Authentication: API key. Permission: sharedLink.create.

Request body

Required.

Field definitions: SharedLinkCreateDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/SharedLinkCreateDto"
    }
  }
}

Responses

Field definitions: SharedLinkResponseDto

{
  "201": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SharedLinkResponseDto"
        }
      }
    },
    "description": ""
  }
}

DELETE /api/shared-links/{id}

Delete a specific shared link by its ID.

Authentication: API key. Permission: sharedLink.delete.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  }
]

Responses

{
  "204": {
    "description": ""
  }
}

Retrieve a shared link

GET /api/shared-links/{id}

Retrieve a specific shared link by its ID.

Authentication: API key. Permission: sharedLink.read.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  }
]

Responses

Field definitions: SharedLinkResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SharedLinkResponseDto"
        }
      }
    },
    "description": ""
  }
}

PATCH /api/shared-links/{id}

Update an existing shared link by its ID.

Authentication: API key. Permission: sharedLink.update.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  }
]

Request body

Required.

Field definitions: SharedLinkEditDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/SharedLinkEditDto"
    }
  }
}

Responses

Field definitions: SharedLinkResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SharedLinkResponseDto"
        }
      }
    },
    "description": ""
  }
}

Remove assets from a shared link

DELETE /api/shared-links/{id}/assets

Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.

Authentication: API key. Permission: sharedLink.update.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  }
]

Request body

Required.

Field definitions: AssetIdsDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/AssetIdsDto"
    }
  }
}

Responses

Field definitions: AssetIdsResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "items": {
            "$ref": "#/components/schemas/AssetIdsResponseDto"
          },
          "type": "array"
        }
      }
    },
    "description": ""
  }
}

Add assets to a shared link

PUT /api/shared-links/{id}/assets

Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.

Authentication: API key. Permission: sharedLink.update.

Parameters

NameWhereRequiredDescription
idpathYesstring
Parameter types, defaults and constraints
[
  {
    "name": "id",
    "required": true,
    "in": "path",
    "schema": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
      "type": "string"
    }
  }
]

Request body

Required.

Field definitions: AssetIdsDto

{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/AssetIdsDto"
    }
  }
}

Responses

Field definitions: AssetIdsResponseDto

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "items": {
            "$ref": "#/components/schemas/AssetIdsResponseDto"
          },
          "type": "array"
        }
      }
    },
    "description": ""
  }
}