Trigger Flow
Askribe REST API allows you to trigger a flow directly from your own web servers.
Request
AskribeParams has the following fields:
- URL -
https://stage-askribe-askribe-ohlibf5r4a-el.a.run.app/api/v1/consumer/api-trigger - Request Method -
POST - Headers -
"Content-Type": "application/json" - Body
askribeKey- Type:
String - Required
- Obtain the API key required to connect with Askribe servers from the
Settingssection in your Askribe flow dashboard.
- Type:
configId- Type:
String - Required
- Type:
context- Type:
Map<String, VariableData> - Optional
- Description: Pass a list of Key-Value pairs to be substituted in the flow
- Type:
language- Type:
String - Optional
- Description: Use this parameter to set the language of the flow
- Type:
- Fields related to receiver of the flow. (Note that these fields are not required if you are sending a Workflow)
receiversEmailAddress- Type:
String - Required if
distributionTypeisAUTO_EMAIL
- Type:
receiversPhoneNumber- Type:
String - Required if
distributionTypeis one ofAUTO_SMS|AUTO_WHATSAPP|AUTO_VOICE
- Type:
slackUserId- Type:
String - Required if
distributionTypeisAUTO_SLACK
- Type:
webPushConfig- Type:
ContactWebPushConfig - Required if
distributionTypeisAUTO_PUSH_NOTIFICATION
- Type:
androidPushConfig- Type:
ContactAndroidPushConfig - Required if
distributionTypeisAUTO_ANDROID_PUSH_NOTIFICATION
- Type:
iOSPushConfig- Type:
ContactIOSPushConfig - Required if
distributionTypeisAUTO_IOS_PUSH_NOTIFICATION
- Type:
Models
class VariableData {
ContextVariableType contextVariableType;
String value;
}
class CategoryValue {
String label;
String value;
}
class ContextVariableType {
VariableType variableType;
List<String> categoryValues;
String nluEntityId;
String blueprintId;
ContextVariableType t1Type;
ContextVariableType t2Type;
}
enum VariableType {
STRING,
INTEGER,
REAL,
BOOLEAN,
DATE,
TIME,
DATE_TIME,
IMAGE,
VIDEO,
CATEGORY,
NLU_ENTITY,
BLUEPRINT,
LIST,
HASHMAP,
}
class ContactWebPushConfig {
String urlEndpoint;
String key;
String auth;
}
class ContactAndroidPushConfig {
String fcmId;
}
class ContactIOSPushConfig {
String apnsId;
}