Reference

REST API

Updated 1 Oct 2026

On this page

For agents

Load this page when: you need to call the Trove REST API, handle one of its errors, or find the endpoint for a task

  • Send Authorization Bearer with a trove_ API key to {base}/api/v1 and branch on the code field of an error.
  • Stop and tell the user on READ_LIMIT_EXCEEDED, ITEM_LOCKED and PLAN_LIMIT_EXCEEDED. Do not retry.
  • Retry RATE_LIMITED after the Retry-After seconds.

The REST API is what the CLI calls. Everything the CLI does, you can do over HTTP.

Base URL

All endpoints live under one base path.

bash
https://heytrove.ai/api/v1

Authentication

Send your API key as a Bearer token. Create a key in API keys.

bash
curl https://heytrove.ai/api/v1/auth/whoami \
  -H "Authorization: Bearer trove_your_key"

New keys start with trove_. Older ck_ keys keep working. OAuth connector tokens, which start with ck_oauth_, are bound to the MCP server. On REST routes they fail with Token resource binding does not match request, so use an API key here.

Error shape

Every error is JSON with a human error message and, for most errors, a machine code. Branch on code, not on the message.

json
{ "error": "Invalid shelf parameter", "code": "SHELF_PARAM_INVALID" }

Errors

StatusMessageCodeFix
401Missing Authorization headernoneSend the header.
401Invalid Authorization header format. Expected: Bearer <token>noneUse Authorization: Bearer trove_your_key.
401Invalid API key formatnoneCheck that you pasted the whole key.
401Invalid or revoked API keynoneCreate a key in Settings, or run trove auth login.
401Token resource binding does not match requestnoneYou sent an OAuth token. Use an API key.
403Your library is full. Upgrade to add more items.PLAN_LIMIT_EXCEEDEDRemove a book or upgrade. The body adds tier, itemCount, itemLimit and upgradeUrl.
403This book is locked on the Personal plan. The Personal plan keeps {n} book(s) usable and the rest are kept but locked. Upgrade at {host}/billing or choose this book as one of your usable books in the library at {host}/library/usable.ITEM_LOCKEDStop. Tell the user. Do not retry.
429Trove: your agent has used all {limit} reads for {month}. Reads reset on {date}. Pro has unlimited reads: {host}/billingREAD_LIMIT_EXCEEDEDStop. Tell the user. Do not retry. The body adds tier, used, limit, upgradeUrl and resetsAt, and the response has Retry-After.
429Too many content writes in a short window — wait a minute and retry.RATE_LIMITEDWait for Retry-After, then retry.
429Too many library writes in a short window — wait a minute and retry.RATE_LIMITEDWait for Retry-After, then retry.
503A short retry messageTRANSIENT_CONFLICTRetry after retryAfterSeconds.

Rate limits

Limits are per user, per minute, in a 60 second window. A limited call returns 429 with Retry-After in seconds.

BucketCalls per minuteApplies to
Library writes120Starting an upload and adding a marketplace book
Content writes60Creating a markdown book, replacing, appending, editing pages and restoring versions
Upload check60POST /upload/check
Team changes20Invites, departments and sharing
Settings writes20PATCH /user/config/agents and PUT /user/agents
Value reports100GET /reports/value and GET /reports/value/sessions
Reports10POST /report

Endpoints

MethodPathWhat it doesPage
GET/auth/whoamiShow your account and usageAuth API
GET/itemsList your booksItems API
DELETE/itemsDelete booksItems API
POST/items/markdownCreate a markdown bookItems API
PATCH/items/enrichSet metadataItems API
POST/items/flagFlag for enrichmentItems API
POST/items/{itemId}/reprocessRebuild from the original fileItems API
GET/items/{itemId}/contentGet full contentReading API
POST/items/batchRead pagesReading API
POST/items/batch/tocGet tables of contentsReading API
PUT/items/{itemId}/contentReplace a whole bookWriting API
PUT/items/{itemId}/pages/{pageNum}Replace one pageWriting API
POST/items/{itemId}/pagesAppend or prependWriting API
GET/items/{itemId}/versionsList versionsWriting API
POST/items/{itemId}/versionsRestore a versionWriting API
POST/items/{itemId}/gapsReport a missing topicGaps API
GET/items/{itemId}/gapsList requests for a bookGaps API
POST/items/{itemId}/gaps/fulfillMark requests coveredGaps API
POST/items/{itemId}/gaps/dismissDecline requestsGaps API
POST/items/{itemId}/gaps/restoreReopen declined requestsGaps API
GET/author/gapsSummarize requests across your booksGaps API
POST/librarian/gapsReport a topic no book coversGaps API
GET, POST/shelvesList and create shelvesShelves API
GET, PATCH, DELETE/shelves/{id}Get, change and delete a shelfShelves API
POST, DELETE/shelves/{id}/itemsAdd and remove booksShelves API
GET, POST/manuscriptsList and create manuscriptsManuscripts API
PUT, DELETE/manuscripts/{id}Update and archiveManuscripts API
POST, DELETE/marketplace/subscribeAdd and remove a listingMarketplace API
POST/uploadGet an upload URLUpload API
POST/upload/checkCheck for duplicatesUpload API
POST/upload/confirmStart the importUpload API
GET/reports/valueGet your value reportReports API
GET/reports/value/sessionsPage through sessionsReports API
POST/access/sessionStart a research sessionReports API
POST/access/session/completeComplete a sessionReports API
GET/teamsList your teamsTeams API
GET, POST, DELETE/teams/{teamId}/membersList, invite and remove membersTeams API
GET, POST/teams/{teamId}/departmentsList and create departmentsTeams API
PATCH, DELETE/teams/{teamId}/departments/{dept}Rename and deleteTeams API
GET, POST, DELETE/teams/{teamId}/departments/{dept}/membersManage department membersTeams API
GET, POST, PATCH, DELETE/teams/{teamId}/itemsManage shared booksTeams API
GET/teams/{teamId}/access-reportShow the access matrixTeams API
GET, PATCH/user/configRead and change settingsAccount API
PATCH/user/config/agentsTurn an agent on or offAccount API
GET, PUT/user/agentsRead and report machinesAccount API
GET/user/notificationsList notificationsAccount API
POST/user/notifications/mark-readMark notifications readAccount API
POST/reportSend a reportAccount API

The marketplace listing endpoint, GET /api/marketplace/browse, sits outside /api/v1 and needs no key. See Marketplace API.

    REST API | Trove