Skip to content

Build a book

POST
/api/v1/books/{bookId}/builds
curl --request POST \
--url https://digize.com/api/v1/books/example/builds \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "podPackageId": "example", "coverOnly": false }'

Sets the book as it is now to print and ebook files, in the background: the interior PDF at its trim and theme, the cover (sized by Lulu for a Lulu SKU, by KDP’s rule otherwise) and the EPUB. It’s building at first; list the builds to see when it’s ready. Refused while another build of the book is going. With coverOnly, only the cover is set, for a look at it (books.cover.get shows it), and it isn’t listed with the builds.

Needs the books:write permission.

bookId
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
podPackageId
Any of:
string
<= 40 characters
coverOnly

Build the cover alone, back, spine and front, for a look at it before the book’s built.

boolean

Done

Media typeapplication/json
object
id
required
string
bookId
required
string
status
required

building while the Workflow sets it, then ready or failed.

string
Allowed values: building ready failed
pages
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
spinePt
required

The spine’s width, in points.

number | null
coverWidthPt
required

The whole cover (back, spine and front, with bleed), in points.

number | null
coverHeightPt
required
number | null
coverRule
required
Any of:
string
Allowed values: lulu kdp
trim
required
string
Allowed values: 5x8 5.5x8.5 6x9 7x10 8.5x11
theme
required
string
Allowed values: classic modern workbook
podPackageId
required
string | null
coverOnly
required

A build of the cover alone, for the Cover tab’s preview: no interior or EPUB, the spine sized for the last build’s pages or the words’.

boolean
warnings
required
Array
One of:
object
kind
required
string
Allowed value: sample
error
required
string | null
startedBy
required
string
createdAt
required
string format: date-time
finishedAt
required
Any of:
string format: date-time
files
required
object
interior
required
Any of:
object
url
required

A signed link to the file, good for 24 hours. No sign-in needed.

string
bytes
required
integer
>= -9007199254740991 <= 9007199254740991
name
required

The name it downloads as.

string
type
required
string
cover
required
Any of:
object
url
required

A signed link to the file, good for 24 hours. No sign-in needed.

string
bytes
required
integer
>= -9007199254740991 <= 9007199254740991
name
required

The name it downloads as.

string
type
required
string
epub
required
Any of:
object
url
required

A signed link to the file, good for 24 hours. No sign-in needed.

string
bytes
required
integer
>= -9007199254740991 <= 9007199254740991
name
required

The name it downloads as.

string
type
required
string
coverImage
required
Any of:
object
url
required

A signed link to the file, good for 24 hours. No sign-in needed.

string
bytes
required
integer
>= -9007199254740991 <= 9007199254740991
name
required

The name it downloads as.

string
type
required
string

Example

{
"status": "building",
"coverRule": "lulu",
"trim": "5x8",
"theme": "classic",
"warnings": [
{
"kind": "sample"
}
]
}

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"
}
}