steps
Add a step
/api/v1/flows/{flow_id}/steps
Add a step at the end of the draft, with the fields given. Without a reference the step is named after its rank.
key
Required scope: write
Path parameters
-
flow_idinteger · requiredId of the flow.
Request body application/json
-
referencestring or null · optionalShort name of the step, unique in the flow: what buttons point at.
-
titlestring or null · optionalTitle of the step.
-
contentstring or null · optionalText, as HTML. Paragraphs, line breaks, bold, italic, underline, strikethrough, lists and links are kept; anything else is removed.
-
display_titleboolean or null · optionalWhether readers see the title.
-
display_contentboolean or null · optionalWhether readers see the text.
-
display_imageboolean or null · optionalWhether readers see the image.
-
image_fitstring or null · optionalcontainshows the whole image,coverfills its frame.
Response
201
Step
-
idintegerId of the step. The draft and the published version of a flow carry different ids.
-
referencestringShort name of the step, unique in its version: what buttons point at.
-
orderintegerRank in the flow, from 1.
-
titlestringTitle. Empty for a reader when the author hid it.
-
contentstringText, as HTML. Empty for a reader when the author hid it.
-
image_urlstring or nullWhere to download the image, with the same credential;
nullwithout image, or when the author hid it from readers. -
image_fitstring or nullcontainshows the whole image,coverfills its frame.null: never chosen, shown ascontain. -
updated_atdate-timeWhen it was last changed.
-
display_titleboolean or nullWhether readers see the title. Only given to who may edit.
-
display_contentboolean or nullWhether readers see the text. Only given to who may edit.
-
display_imageboolean or nullWhether readers see the image. Only given to who may edit.
-
buttonsarray of Button or nullIts navigation buttons, in order.
6 fields
-
idintegerId of the button.
-
labelstringWhat the button says.
-
target_step_idinteger or nullId of the step it leads to;
nullwhen it ends the flow, or when its target was deleted. -
target_referencestringReference of the step it leads to, kept after that step is deleted; empty when it ends the flow.
-
ends_procedurebooleanWhether it ends the flow.
-
target_missingbooleanWhether it points at a step that was deleted. A draft cannot be published while one remains.
-
-
faultsarray of string or nullDraft only, what the editor flags:
missing_target(a button points at a deleted step; blocks publishing) orunreachable(no button of another step leads here).
Errors
-
401
No valid credential.
-
403
The credential lacks the required scope, or the account may not do this.
-
404
Nothing with that id, or nothing the account may open.
-
409
The current state of the content forbids the request.
-
422
A value is missing or malformed.
-
429
Too many requests;
Retry-Aftergives the seconds to wait.