# buzz.bookhive.createPersonalShelf

> Create a new personal shelf for organizing books in the personal library.

- Kind: procedure
- Authority: bookhive.buzz
- Lexicon: 1
- Published by [bookhive.buzz](https://lexicon.garden/identity/did:plc:enu2j5xjlqsjaylv3du4myh4), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.createPersonalShelf)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.createPersonalShelf/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.createPersonalShelf/analytics)

## Procedure (`buzz.bookhive.createPersonalShelf`)

Type: procedure · POST

### Input (application/json)

- `description` (string): Optional description of the shelf
  - Constraints: maxLength: 500
- `name` (string, required): Name of the shelf
  - Constraints: minLength: 1, maxLength: 100

### Output (application/json)

- `shelf` (ref, required)
  - Reference: `#personalShelfView`

## #personalShelfView (`buzz.bookhive.createPersonalShelf#personalShelfView`)

Type: object

### Properties

- `bookCount` (integer, required): Number of books on this shelf
  - Constraints: minimum: 0
- `createdAt` (string · datetime, required): When the shelf was created
- `description` (string): Description of the shelf
- `id` (integer, required): Unique shelf identifier
- `name` (string, required): Name of the shelf
- `updatedAt` (string · datetime, required): When the shelf was last updated

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Create a new personal shelf for organizing books in the personal library.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "description": {
              "description": "Optional description of the shelf",
              "maxLength": 500,
              "type": "string"
            },
            "name": {
              "description": "Name of the shelf",
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "shelf": {
              "ref": "#personalShelfView",
              "type": "ref"
            }
          },
          "required": [
            "shelf"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    },
    "personalShelfView": {
      "properties": {
        "bookCount": {
          "description": "Number of books on this shelf",
          "minimum": 0,
          "type": "integer"
        },
        "createdAt": {
          "description": "When the shelf was created",
          "format": "datetime",
          "type": "string"
        },
        "description": {
          "description": "Description of the shelf",
          "type": "string"
        },
        "id": {
          "description": "Unique shelf identifier",
          "type": "integer"
        },
        "name": {
          "description": "Name of the shelf",
          "type": "string"
        },
        "updatedAt": {
          "description": "When the shelf was last updated",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "bookCount",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    }
  },
  "id": "buzz.bookhive.createPersonalShelf",
  "lexicon": 1
}
```
