# Item shares API

Source: https://frameleaf.app/docs/api/reference/item-shares/

Use your own server and its scoped API keys.

## Stop sharing items with people

DELETE /api/item-shares

Stop sharing your own items with these people. They lose access at once.

```json
{
  "description": "Stop sharing your own items with these people. They lose access at once.",
  "operationId": "unshareItems",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ItemShareChangeDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ItemShareChangeResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Stop sharing items with people",
  "tags": [
    "Item shares"
  ],
  "x-frameleaf-permission": "asset.share"
}
```

## Share items with people

POST /api/item-shares

Share your own items with people who have an account on this server. They see the items under Sharing, in their own library, and are notified. Locked items are refused.

```json
{
  "description": "Share your own items with people who have an account on this server. They see the items under Sharing, in their own library, and are notified. Locked items are refused.",
  "operationId": "shareItems",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ItemShareChangeDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ItemShareChangeResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Share items with people",
  "tags": [
    "Item shares"
  ],
  "x-frameleaf-permission": "asset.share"
}
```

## List who items are shared with

PUT /api/item-shares/query

The people each of your own items is shared with.

```json
{
  "description": "The people each of your own items is shared with.",
  "operationId": "getItemShares",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ItemShareQueryDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/ItemShareResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "List who items are shared with",
  "tags": [
    "Item shares"
  ],
  "x-frameleaf-permission": "asset.share"
}
```

## Items shared with you

GET /api/item-shares/received

Items other people shared with you one by one, newest first. Items that are locked, trashed or no longer shared are left out.

```json
{
  "description": "Items other people shared with you one by one, newest first. Items that are locked, trashed or no longer shared are left out.",
  "operationId": "getReceivedItemShares",
  "parameters": [],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ItemShareReceivedResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Items shared with you",
  "tags": [
    "Item shares"
  ],
  "x-frameleaf-permission": "asset.read"
}
```
