Skip to content

Merge two chapters of an outline

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

Moves one chapter’s insights and questions into another, then takes it out of the outline.

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
from
required

The chapter that goes.

string
>= 1 characters <= 40 characters
into
required

The chapter it goes into.

string
>= 1 characters <= 40 characters

Example generated

{
"from": "example",
"into": "example"
}

Done

Media typeapplication/json
object
bookId
required
string
status
required
string
Allowed values: brief briefing interviewing generating editing ready published
briefing
required

What the agent already knew before the interview, from the sources: what the business is, sells, is praised and criticised for, notable customers and numbers.

string
sources
required

The sources it read, with what it found in each.

Array<object>
object
id
required
string
>= 1 characters <= 60 characters
label
required
string
<= 120 characters
found
required
string
<= 300 characters
failed
required
boolean
error
required

Why reading the sources failed, when it did.

string | null
outline
required
object
chapters
required
Array<object>
object
id
required
string
>= 1 characters <= 40 characters
title
required
string
>= 1 characters <= 200 characters
promise
required
string
<= 400 characters
questions
required

The questions the interview means to ask, and which it has.

Array<object>
object
id
required
string
>= 1 characters <= 40 characters
question
required
string
>= 1 characters <= 500 characters
why
required
string
<= 300 characters
chapterId
required
Any of:
string
<= 40 characters
from
required
string
Allowed values: plan author
askedIn
required
Any of:
string
<= 40 characters
interviewedAt
required
Any of:
string format: date-time

Example

{
"status": "brief",
"questions": [
{
"from": "plan"
}
]
}

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