Reference

Items API

Updated 1 Oct 2026

On this page

For agents

Load this page when: you need to list books, create a markdown book, delete books or change book metadata over HTTP

  • List books with GET /items and the optional shelf query.
  • Delete with a JSON body of ids, not a query string.
  • Enrich uses PATCH, not POST.

These endpoints manage books as objects. To read text, see Reading API. To edit text, see Writing API.

List items

GET https://heytrove.ai/api/v1/items

Returns every book you can access: your own, marketplace books you added, and books shared with you. The list has no paging. A locked book stays in the list with locked: true.

Parameters

NameInTypeRequiredConstraintsMeaning
shelfquerystringnoup to 64 characters of letters, digits, _ and -Shelf slug or id. Show only books on that shelf.

Request

bash
curl "https://heytrove.ai/api/v1/items?shelf=backend" \
  -H "Authorization: Bearer trove_your_key"

Response

json
{
  "items": [
    {
      "id": "cmabc123",
      "title": "Use The Index, Luke",
      "description": null,
      "author": "Markus Winand",
      "sourceType": "pdf",
      "status": "READY",
      "needsEnrichment": false,
      "enrichmentConfidence": 0.9,
      "pageCount": 42,
      "health": "ok",
      "healthReason": null,
      "isSystem": false,
      "isSubscribed": false,
      "proOnly": false,
      "locked": false,
      "shelves": [{ "id": "cmshelf1", "slug": "backend", "name": "Backend" }]
    }
  ],
  "enrichmentQueue": [],
  "pickUrl": "https://heytrove.ai/library/usable"
}

pickUrl appears only when some book is locked. An unknown shelf returns { "items": [], "enrichmentQueue": [] } with status 200, not 404. Other fields on each item are enrichedAt, metadataConfirmedAt, createdAt, updatedAt and isWeeklyFeatured.

Errors

StatusMessageCodeFix
400Invalid shelf parameterSHELF_PARAM_INVALIDUse a slug or id of up to 64 safe characters.

CLI equivalent: trove items list.

Delete items

DELETE https://heytrove.ai/api/v1/items

Deletes books you own. This cannot be undone. A locked book can still be deleted, which is how you get back under your limit.

Parameters

NameInTypeRequiredConstraintsMeaning
idsbodystring arrayyesnot emptyIds of books to delete.

Request

bash
curl -X DELETE https://heytrove.ai/api/v1/items \
  -H "Authorization: Bearer trove_your_key" \
  -H "Content-Type: application/json" \
  -d '{"ids":["cmabc123"]}'

Response

json
{ "deleted": ["cmabc123"], "notFound": [] }

Ids that are not your own books come back in notFound. storageErrors lists books whose stored file could not be removed. The rows are deleted anyway.

Errors

StatusMessageCodeFix
400Invalid JSON bodynoneSend valid JSON.
400ids array is requiredINVALID_INPUTSend a non-empty ids array.
400ids must be stringsINVALID_INPUTSend strings.
403System books cannot be deletedFORBIDDENRemove built-in books from the request. Nothing was deleted.

CLI equivalent: trove items remove.

Create a markdown book

POST https://heytrove.ai/api/v1/items/markdown

Creates a book from markdown text. Top-level # headings split the text into pages. It counts against your library limit.

Parameters

NameInTypeRequiredConstraintsMeaning
titlebodystringyes1 to 200 charactersBook title.
descriptionbodystringnoup to 4,000 charactersShort description.
contentbodystringnoup to 1,000,000 bytes, up to 1,000 pagesMarkdown text.

Request

bash
curl https://heytrove.ai/api/v1/items/markdown \
  -H "Authorization: Bearer trove_your_key" \
  -H "Content-Type: application/json" \
  -d '{"title":"Team runbook","content":"# Deploys\n\nRun the pipeline."}'

Response

Status 201.

json
{
  "id": "cmrun456",
  "title": "Team runbook",
  "description": null,
  "sourceType": "markdown",
  "status": "READY",
  "pageCount": 1,
  "createdAt": "2026-10-01T09:00:00.000Z",
  "updatedAt": "2026-10-01T09:00:00.000Z"
}

Errors

StatusMessageCodeFix
400title is requiredINVALID_INPUTSend a title.
400content must be a stringINVALID_INPUTSend text.
413content exceeds maximum size of 1000000 bytes per request — create the item with the first part, then add the rest in further callsPAYLOAD_TOO_LARGECreate with the first part, then append.
403Your library is full. Upgrade to add more items.PLAN_LIMIT_EXCEEDEDSee Errors.
429Too many content writes in a short window — wait a minute and retry.RATE_LIMITEDWait for Retry-After.

CLI equivalent: trove items create.

Enrich a book

PATCH https://heytrove.ai/api/v1/items/enrich

Sets title, author, description, table of contents and related metadata. You need write access to the book.

Parameters

NameInTypeRequiredConstraintsMeaning
itemIdbodystringyesnoneBook to change.
titlebodystringnoup to 200 charactersNew title.
authorbodystringnoup to 200 charactersAuthor name.
descriptionbodystringnoup to 4,000 charactersDescription.
confidencebodynumberno0 to 1Confidence in the metadata.
tocbodyarraynoentries with title, page of 1 or more, optional level of 1 or moreTable of contents.
addPromptbodyobjectnoprompt required, optional context and multiBookA prompt to show with the book.
sampleQuestionbodystringnononeA sample question.
outcomesbodystring arraynoup to 6 items of up to 140 charactersThe short list of what a reader gets. An empty array clears it.

Request

bash
curl -X PATCH https://heytrove.ai/api/v1/items/enrich \
  -H "Authorization: Bearer trove_your_key" \
  -H "Content-Type: application/json" \
  -d '{"itemId":"cmabc123","author":"Markus Winand","confidence":0.9}'

Response

json
{
  "item": {
    "id": "cmabc123",
    "title": "Use The Index, Luke",
    "author": "Markus Winand",
    "description": null,
    "needsEnrichment": false,
    "enrichmentConfidence": 0.9,
    "enrichedAt": "2026-10-01T09:00:00.000Z"
  }
}

Errors

StatusMessageCodeFix
400Invalid JSON bodynoneSend a JSON object.
400itemId is requiredINVALID_INPUTSend itemId.
400confidence must be between 0 and 1INVALID_INPUTUse a value in range.
400Each TOC entry must have a page number >= 1INVALID_INPUTFix the entry.

CLI equivalent: trove items enrich.

Flag a book

POST https://heytrove.ai/api/v1/items/flag

Marks a book as needing enrichment. Only the owner can flag a book.

Parameters

NameInTypeRequiredConstraintsMeaning
itemIdbodystringyesnoneBook to flag.

Request

bash
curl https://heytrove.ai/api/v1/items/flag \
  -H "Authorization: Bearer trove_your_key" \
  -H "Content-Type: application/json" \
  -d '{"itemId":"cmabc123"}'

Response

json
{ "item": { "id": "cmabc123", "title": "Use The Index, Luke", "needsEnrichment": true } }

Errors

StatusMessageCodeFix
400itemId is requirednoneSend itemId.
404Item not foundNOT_FOUNDCheck the id.
403You can only flag books you own for enrichmentFORBIDDENAsk the owner.

CLI equivalent: trove items flag.

Reprocess a book

POST https://heytrove.ai/api/v1/items/{itemId}/reprocess

Rebuilds a book from the file it was uploaded from. The old pages stay readable until the new ones are ready. Only the owner can do it.

Parameters

NameInTypeRequiredConstraintsMeaning
itemIdpathstringyesnoneBook to rebuild.

Request

bash
curl -X POST https://heytrove.ai/api/v1/items/cmabc123/reprocess \
  -H "Authorization: Bearer trove_your_key"

Response

json
{
  "item": { "id": "cmabc123", "title": "Use The Index, Luke", "status": "READY" },
  "job": { "id": "cmjob789", "status": "PENDING" }
}

Errors

StatusMessageCodeFix
404Item not foundNOT_FOUNDCheck the id.
400Built-in books can't be reprocessed.INVALID_INPUTPick another book.
400This book has no original file to re-import — it was written directly rather than uploaded.INVALID_INPUTNothing to rebuild.

CLI equivalent: trove items reprocess.

    Items API | Trove