# buzz.bookhive.linkPersonalBook

> Link a personal library book to a BookHive catalog entry. Overwrites title, authors, and cover from the catalog.

- 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.linkPersonalBook)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.linkPersonalBook/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.linkPersonalBook/analytics)

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

Type: procedure · POST

### Input (application/json)

- `contentHash` (string, required): SHA-256 hash of the file content
- `hiveId` (string, required): BookHive catalog entry ID to link to

### Output (application/json)

- `book` (ref, required)
  - Reference: `buzz.bookhive.getPersonalLibrary#personalBookView`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Link a personal library book to a BookHive catalog entry. Overwrites title, authors, and cover from the catalog.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "contentHash": {
              "description": "SHA-256 hash of the file content",
              "type": "string"
            },
            "hiveId": {
              "description": "BookHive catalog entry ID to link to",
              "type": "string"
            }
          },
          "required": [
            "contentHash",
            "hiveId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "book": {
              "ref": "buzz.bookhive.getPersonalLibrary#personalBookView",
              "type": "ref"
            }
          },
          "required": [
            "book"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "buzz.bookhive.linkPersonalBook",
  "lexicon": 1
}
```
