Skip to content

Change a book's brief

PATCH
/api/v1/books/{id}
curl --request PATCH \
--url https://digize.com/api/v1/books/example \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "title": "example", "subtitle": "example", "authorName": "example", "authorBio": "example", "topic": "example", "audience": "example", "promise": "example", "tone": "example", "language": "example", "chaptersWanted": 1, "chapterLength": "short", "trim": "5x8", "theme": "classic", "figures": { "illustrations": true, "charts": true, "diagrams": true, "style": "example" }, "sources": { "website": true, "products": true, "reviews": true, "customers": true, "conversations": true, "newsletter": true, "services": [ "stripe" ] }, "anonymize": true }'

Changes some of a book’s brief, or renames it; what’s left out stays as it is. Its slug follows the title until it’s published.

Needs the books:write permission.

id
required
string
>= 1 characters <= 64 characters
Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
title
string
>= 1 characters <= 200 characters
subtitle
string
<= 200 characters
authorName
string
<= 120 characters
authorBio
string
<= 2000 characters
topic

What the book is about, in the author’s words.

string
<= 2000 characters
audience

Who it’s for.

string
<= 1000 characters
promise

What the reader walks away with.

string
<= 1000 characters
tone

How it sounds, such as Warm and personal.

string
<= 200 characters
language

A BCP 47 tag, such as en or pt-BR.

string
/^[a-z]{2,3}(?:-[A-Z]{2})?$/
chaptersWanted
integer
>= 5 <= 20
chapterLength

About 2,000, 3,500 or 6,000 words a chapter.

string
Allowed values: short medium long
trim

The page size, in inches.

string
Allowed values: 5x8 5.5x8.5 6x9 7x10 8.5x11
theme

The layout.

string
Allowed values: classic modern workbook
figures

Whether it has illustrations, charts and diagrams, and one style line every drawing follows. They’re drawn on the workspace’s OpenAI account.

object
illustrations
required
boolean
charts
required
boolean
diagrams
required
boolean
style
required
string
<= 300 characters
sources

What the interview may read: the workspace’s own sources, and connected services by id (books.setup.get lists them).

object
website
required
boolean
products
required
boolean
reviews
required
boolean
customers
required
boolean
conversations
required
boolean
newsletter
required
boolean
services
required
Array<string>
<= 50 items
Allowed values: stripe twilio google_calendar google_business google_search_console google_sheets google_contacts google_analytics meta google_ads google_merchant google_youtube tiktok_ads linkedin_ads microsoft_ads pinterest_ads slack quickbooks xero zapier leadsplease click2mail printify resend sendgrid mailjet microsoft zoom shippo linkedin_pages tiktok_content x yelp trustpilot shopify woocommerce square paypal hubspot salesforce calendly dataforseo openai anthropic google_tag_manager github lulu pcm unipile browser_use
anonymize

Rename people, consistently, in what’s written.

boolean

Done

Media typeapplication/json
object
title
required
string
>= 1 characters <= 200 characters
subtitle
required
string
<= 200 characters
authorName
required
string
<= 120 characters
authorBio
required
string
<= 2000 characters
topic
required
string
<= 2000 characters
audience
required
string
<= 1000 characters
promise
required
string
<= 1000 characters
tone
required
string
<= 200 characters
language
required
string
/^[a-z]{2,3}(?:-[A-Z]{2})?$/
chaptersWanted
required
integer
>= 5 <= 20
chapterLength
required
string
Allowed values: short medium long
trim
required
string
Allowed values: 5x8 5.5x8.5 6x9 7x10 8.5x11
theme
required
string
Allowed values: classic modern workbook
figures
required
object
illustrations
required
boolean
charts
required
boolean
diagrams
required
boolean
style
required
string
<= 300 characters
sources
required
object
website
required
boolean
products
required
boolean
reviews
required
boolean
customers
required
boolean
conversations
required
boolean
newsletter
required
boolean
services
required
Array<string>
<= 50 items
Allowed values: stripe twilio google_calendar google_business google_search_console google_sheets google_contacts google_analytics meta google_ads google_merchant google_youtube tiktok_ads linkedin_ads microsoft_ads pinterest_ads slack quickbooks xero zapier leadsplease click2mail printify resend sendgrid mailjet microsoft zoom shippo linkedin_pages tiktok_content x yelp trustpilot shopify woocommerce square paypal hubspot salesforce calendly dataforseo openai anthropic google_tag_manager github lulu pcm unipile browser_use
anonymize
required
boolean
id
required
string
slug
required

Made from the title and unique, for the book’s page on a site.

string
status
required

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.

string
Allowed values: brief briefing interviewing generating editing ready published
authorImageId
required
string | null
authorImageUrl
required

The author’s photo, from Books › Settings when the book began.

string | null
briefingError
required

Why reading the sources for the interview failed, when it did; the book is back at brief until it’s started again.

string | null
interviewedAt
required
Any of:
string format: date-time
generation
required

How many runs of the writer it has had; 0 before the first.

integer
>= -9007199254740991 <= 9007199254740991
words
required

Words in its chapters.

integer
>= -9007199254740991 <= 9007199254740991
writerModel
required

The model the author picked to write it, preselected for the next run (books.writers.list).

string | null
writingCost
required

What writing it with a GPT model has cost on the workspace’s own OpenAI account, in US dollars.

number
insights
required

How many things the interview learned, which the writer writes from.

integer
>= -9007199254740991 <= 9007199254740991
canWrite
required

Whether it has something to write from: an outline or an insight (books.generate.start).

boolean
coverImageId
required

B5: the cover front picked, in Images (books.cover.get has the rest).

string | null
coverUrl
required

The cover front picked, as the shelf shows it; unless it’s coverDesigned, the title and author are set over it at build.

string | null
coverDesigned
required

Whether the cover front picked is a whole design with the title, subtitle and author in it (GPT Image’s), printed as it is.

boolean
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"chapterLength": "short",
"trim": "5x8",
"theme": "classic",
"sources": {
"services": [
"stripe"
]
},
"status": "brief"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}