Skip to main content

Trigger Flow

API Reference

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 Settings section in your Askribe flow dashboard.
    • configId
      • Type: String
      • Required
    • context
      • Type: Map<String, VariableData>
      • Optional
      • Description: Pass a list of Key-Value pairs to be substituted in the flow
    • language
      • Type: String
      • Optional
      • Description: Use this parameter to set the language of the flow
    • 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 distributionType is AUTO_EMAIL
      • receiversPhoneNumber
        • Type: String
        • Required if distributionType is one of AUTO_SMS | AUTO_WHATSAPP | AUTO_VOICE
      • slackUserId
        • Type: String
        • Required if distributionType is AUTO_SLACK
      • webPushConfig
        • Type: ContactWebPushConfig
        • Required if distributionType is AUTO_PUSH_NOTIFICATION
      • androidPushConfig
        • Type: ContactAndroidPushConfig
        • Required if distributionType is AUTO_ANDROID_PUSH_NOTIFICATION
      • iOSPushConfig
        • Type: ContactIOSPushConfig
        • Required if distributionType is AUTO_IOS_PUSH_NOTIFICATION

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