Skip to main content

Get next block

After you have started a new session using the previous API and rendered a block for your users, you might want to render the next block.

Request Body REQUIRED
askribeKey Askribe Key REQUIRED

Obtain the API key required to connect with Askribe servers from the Settings section in your Askribe flow dashboard.

sessionId Session Id REQUIRED

This is the ID of the session. You can get it from the response of the /start request

nodeId Node Id REQUIRED

This is the ID of the block. You can get it from the response of the previous request

response String Response

This is the response given by the user. Use it when the block type is TEXT_INPUT | NUMERIC_INPUT | URL_INPUT | EMAIL_INPUT | PHONE_NUMBER_INPUT | DATE_TIME | LISTEN - (In case of textual response) | OPTIONS - (In case of isMultiple = false)

responses List of string response[]

This is the response given by the user when block type is OPTIONS and isMultiple = true

imageUrls List of image urls[]

This is the response given by the user when block type is LISTEN and user's response is of type image

videoUrls List of video urls[]

This is the response given by the user when block type is LISTEN and user's response is of type video

fileUrls List of file urls[]

This is the response given by the user when block type is LISTEN and user's response is of type audio or block type is UPLOAD

audioUrls List of audio urls[]

This is the response given by the user when block type is LISTEN and user's response is of type audio

Responses
200

Successfully triggered

Schema OPTIONAL
customChannelResponseDTOType Response Type OPTIONAL

Possible values: [START_FLOW_RESPONSE, START_FLOW_LINK, NEXT_BLOCK, END_FLOW, TRANSITIONED_FROM_CHANNEL, TRANSITIONED_IN_CHANNEL, FLOW_SCHEDULED, ERROR, LIST_LANGUAGES, SET_LANUAGE]

The type of response is based on request type. See developer docs for more details

errorMessage Error message OPTIONAL

Human readable error description, if any

sessionId Session Id OPTIONAL

Id of the session

nodeId Block Id OPTIONAL

Id of the block

newEditNodeType string OPTIONAL

Possible values: [STATEMENT, TEXT_INPUT, NUMERIC_INPUT, URL_INPUT, EMAIL_INPUT, PHONE_NUMBER_INPUT, DATE_TIME, UPLOAD, LISTEN, OPTIONS]

isMultiple Are multiple responses allowed OPTIONAL

Sent when newEditNodeType = OPTIONS. Indicates whether the user is allowed to select multiple options

content Text Content OPTIONAL

This is the main content of the block

options object[] OPTIONAL

Sent when newEditNodeType = OPTIONS. This contains the data to display interactive buttons / options to your user

buttonId string OPTIONAL
content string OPTIONAL
languages object[] OPTIONAL

Contains the name and id of all the languages present in the flow

buttonId string OPTIONAL
content string OPTIONAL
currentLanguage object OPTIONAL

Name and id of the current language of the session

buttonId string OPTIONAL
content string OPTIONAL