> ## Documentation Index
> Fetch the complete documentation index at: https://docs.repdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Share library item

> # Description

Changes the "shared" status of a library item.

# Payload

```json
{
    "isShared": true
}
```

where:

- `isShared`: Boolean value to specify if the item is shared or not. **Required**.

# Response

## 204 No Content

## 400 Bad Request

> `isShared` is missing.

## 401 Unauthorized

> The user doesn't have permissions.

## 404 Not Found

> Library item not found.

## 500 Internal Server Error

> Error occurred while processing the request.

# Description

Changes the "shared" status of a library item.

# Payload

```json theme={null}
{
    "isShared": true
}
```

where:

* `isShared`: Boolean value to specify if the item is shared or not. **Required**.

# Response

## 204 No Content

## 400 Bad Request

> `isShared` is missing.

## 401 Unauthorized

> The user doesn't have permissions.

## 404 Not Found

> Library item not found.

## 500 Internal Server Error

> Error occurred while processing the request.


## OpenAPI

````yaml POST /projects-api/v1/questionsLibrary/{asdasda}/changeSharedState
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /projects-api/v1/questionsLibrary/{asdasda}/changeSharedState:
    post:
      summary: Share library item
      description: >-
        # Description


        Changes the "shared" status of a library item.


        # Payload


        ```json

        {
            "isShared": true
        }

        ```


        where:


        - `isShared`: Boolean value to specify if the item is shared or not.
        **Required**.


        # Response


        ## 204 No Content


        ## 400 Bad Request


        > `isShared` is missing.


        ## 401 Unauthorized


        > The user doesn't have permissions.


        ## 404 Not Found


        > Library item not found.


        ## 500 Internal Server Error


        > Error occurred while processing the request.
      operationId: >-
        share-library-item-post-projects-api-v1-questionslibrary-asdasda-changesharedstate
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Authorization token
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              isShared: true
      responses:
        '200':
          description: Successful response
        '204':
          description: Share library item
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://project.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````