List books
const url = 'https://digize.com/api/v1/books';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/books \ --header 'x-api-key: <x-api-key>'Every book in the workspace, the last changed first, each with its brief and stage, and the module’s numbers this month.
Needs the books:read permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Done
object
object
object
object
Made from the title and unique, for the book’s page on a site.
Its stage: brief while the brief isn’t finished, then briefing, interviewing, generating, editing, ready once a build exists, and published once a listing is live.
The author’s photo, from Books › Settings when the book began.
Why reading the sources for the interview failed, when it did; the book is back at brief until it’s started again.
How many runs of the writer it has had; 0 before the first.
Words in its chapters.
The model the author picked to write it, preselected for the next run (books.writers.list).
What writing it with a GPT model has cost on the workspace’s own OpenAI account, in US dollars.
How many things the interview learned, which the writer writes from.
Whether it has something to write from: an outline or an insight (books.generate.start).
B5: the cover front picked, in Images (books.cover.get has the rest).
The cover front picked, as the shelf shows it; unless it’s coverDesigned, the title and author are set over it at build.
Whether the cover front picked is a whole design with the title, subtitle and author in it (GPT Image’s), printed as it is.
object
Words in every book’s chapters.
Minutes interviewed this month, by voice and text.
Spent this month on Digize’s AI, in US cents: text interviews and writing with a Digize-billed model.
Spent this month on the workspace’s own OpenAI account, in US cents: voice interviews, figures and writing with a GPT model.
Copies sold through the store.
Example
{ "data": [ { "chapterLength": "short", "trim": "5x8", "theme": "classic", "sources": { "services": [ "stripe" ] }, "status": "brief" } ]}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}