Skip to content

Transition Section

POST
/api/canvas/{deal_id}/sections/{section_key}/transition
curl --request POST \
--url https://example.com/api/canvas/example/sections/example/transition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "content": "Updated executive summary content...", "target_state": "reviewed" }'

Transition a section to a new state.

Valid transitions depend on current state (see SectionLifecycle state machine):

  • draft -> editing: Start editing
  • editing -> reviewed: Save changes
deal_id
required
Deal Id
string
section_key
required
Section Key
string
Media type application/json
TransitionRequest

Request body for state transition.

object
target_state
required
Target State
string
content
Any of:
string
revision_instructions
Any of:
string
version
Any of:
integer
force
Force
boolean
Example
{
"content": "Updated executive summary content...",
"target_state": "reviewed"
}

Successful Response

Media type application/json
TransitionResponse

Response for state transition.

object
success
required
Success
boolean
from_state
required
From State
string
to_state
required
Any of:
string
error
Any of:
string
Example
{
"from_state": "editing",
"success": true,
"to_state": "reviewed"
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}