Elicit Library API
Your library: saved papers (sources) and the collections that group them, including items shared with you. ### Conventions - A detail endpoint returns the resource. A list endpoint returns `{ , nextCursor, totalCount }`. Send `nextCursor` as `cursor` to get the next page. `nextCursor` is `null` on the last page. - You see your own sources and collections plus any shared with you. Each carries your `role`. On a collection, `reader`, `writer`, or `owner`: readers view; writers also add and remove sources and edit the name and description; owners also delete it and change who it is shared with. On a source, `reader` or `writer`: writers edit its metadata, attach a PDF, delete it, and add it to collections. - A shared collection owns its papers. Adding one of your sources to it copies the paper into the collection; your own source is unchanged, and you are a `writer` on the copy if you own or can edit the collection and a `reader` if you can only view it. Removing a paper from such a collection moves it to the collection's trash for 30 days. - An id you cannot see returns `404`. An action your role does not allow returns `403 forbidden`. - Creating a collection returns `201`; synchronous bulk operations return `200`; PDF imports return `202` and must be polled. Retry behavior varies by endpoint. Creating a collection again creates another collection, and saving sources with `onDuplicate: create` can create additional copies. - A duplicate is not an error. Saving a paper that is already in your library returns the existing source with `created: false` and `duplicateOf` set; with `onDuplicate: create`, a copy is saved with `created: true` and `duplicateOf` names the original. A PDF import reports the file as `duplicate`. Duplicate detection uses Elicit ids, DOIs, and strong title similarity. Authors can corroborate a title match, and a sufficiently strong title can match without author corroboration; conflicting DOI, year, or abstract evidence can rule out a title-based match. Items in one request are also matched against each other. - Adding sources to a collection validates all source ids before changing memberships; an unknown or inaccessible source fails that add request. Removing sources skips ids not in the collection. Do not assume every bulk operation is atomic: source saves are processed individually and PDF imports report per-file outcomes. - Deleting a source is a soft delete. A repeat returns `204`. Deleting a collection is permanent. Its sources stay in the library. A repeat returns `404`. - DOIs saved through the API are stored in bare lowercase form (`10.1056/nejmoa2307563`). Input and the `doi` filter accept `doi.org` URLs, `doi:` prefixes, and any letter case. - A malformed id, or an unknown query parameter or body key, returns `400 invalid_request` with the field name.