NAV Navbar
Dahi.ai Docs
shell
  • Dahi.ai
  • Bot
  • Intent
  • Entity
  • Live
  • Api
  • Template
  • Dahi.ai

    About

    Home

    Dahi.ai is a chat-bot creation platform. Our system's most basic feature is it's how easy to create a basic chat-bot in couple of minutes. And grow with step by step.

    Dahi.ai has couple of systems within. One is chat-bot the other one is live-chat and more...

    Chat-bot system is responsible of what to response to questions. Live-chat system is responsible of delivering messages between chat-bot, customer and customer service agent.

    There couple of more system that helps or adds more features to the stack. For example template feature. This is one of the new features that is open to the users. With template system you can connect your api's to dahi.ai without needing to code a new message formating system and host it. With template you can create your micro-service's that hosted in our system to help you create and modify api responses beyond just text outputing.

    Registration

    register

    Go to Register Page

    Registering is easy, just go to register page. Type your name, surname, email, password and repeat the same password. Click to register button and you're done.

    Dahi.ai Platform is free. You can start to create your chat-bot without coding required.

    Bot

    dahi-bot

    Here you can create, delete and modify your chat-bots.

    Bot Create

    bot-create

    Creating a new bot is easy you just have to give it a name and select which language you want to create a bot. Click "done" button to finishing the bot creation. You can change this settings after in chat settings page.

    Bot Intents

    bot-intents

    This is where we can add logic to our bot. Every intent is responsible for a job. Some to detect user inputs and response, some to create more complex logic to improve user engagement.

    For more information check out intent documentation section

    Intent

    How to Create Intent?

    Basic Intent - Hello World

    Hello World! alt text

    I will show you how to create an easy intent to your bot. Let's make a Hello World! intent. This intent has just one job. Whenever user says hello, it will make to your bot response as 'Hello World'.

    1. Select your bot from bots list.
    2. Click Intents on the left side.
    3. Click ADD button in the opening page.
    4. Name your intent.
    5. Type your inputs on the Define User Says section and press enter.
    6. Enter your output text which will be shown to yours.
    7. Finally, Save your intent with save button on the upper-right corner.

    Advanced Intent

    Input

    On here, you are defining what user inputs will trigger your intent. You can enter a long sentence here as well as a single word. It's all about what user's input should activate your intent.

    After entered your sentence, you can see each word are clickable. You can select those words for marking them as required word. This mean whenever user enter an input sentence, system check this sentence with each input row and activate it if and only if sentence contains row's all required words.

    If there are some unnecessary or wrong sentences you can remove them with delete button on the right side.

    Variables

    What is Variable?

    Variable is a value that can change, depending on conditions or on information passed to the intent. It is useful for store the value and use it on other part in the intent such as operation section or forward section.

    How to create Variable?

    Enter your variable's name to input area below Define Variable header. After you enter, there will be a row about its attributes.

    alt text

    Key Description
    Name Name of your variable. It must be unique.(Required)
    Type Variable type. You can choose one of the 12 types in the list such as Text, Array etc. Please look Variable Type for further info. (Required)
    Entity Required for only array-like variable types. You can select from your entities or system entities.
    Question If variable has no value, system will prompt this area text to user and will set the answer to this variable. (Required)
    Details You can set some specific values to your variable in here such as regex or default value. For further info please look Extras section.
    Remove This button will remove the variable row.

    alt text

    After filling all required areas now your variable is ready to use it. In anywhere in the intent you can call your variable with {$myVariableName}.

    Variable Types

    Type Description Example
    Text For string values Hello
    Int For integer values 12456
    Identifier For 11 digit country identification number. Only for turkey right now. 12345678901
    Location For location value such as location sharing messages 41.015137,28.979530
    Email For email values [email protected]
    Phone For phone type values 05xx322xxxx, +905xx322xxxx, 5xx322xxxx
    Datetime For Date and Time values tomorrow at 3pm
    Time For Time values at 3pm
    Date For Date Values 3 day later, tomorrow
    Array For Text array selections
    Horizontal Scroll Array For Horizontal Card selections
    Multi Array For Text array selections with abilty to select multiple answer

    Output

    intent-output-text intent-city intent-city-test

    Output section is to define what will bot reply to user at the end of this intent. If you don't want to send a message at the end of this intent you can leave this section empty. There are couple of types of outputs like text, typing, image, video...

    Type Description
    Text Plain text message type.
    Typing Sending typing... message and wait x sec before sending next message.
    Array Send a text message with a array of buttons.
    Horizontal Array Send a generic-template type message with cards.
    Image Send a image.
    Video Send a video
    Custom Send a custom formatted text. (for custom api and endpoint usage).

    You can create more than one output for the same intent. To do so just click the CREATE NEW OUTPUT button.

    To use variables in your intent you can use {<key>}. For example if our paramater name is city. We can get city name in output like this Weather status for {city} is sunny. If you want to key-extra values you can chain with . like a normal json object. For example in our sys.city entity we have plate code for each city of Turkey in code keyword. We can use it like this {city.code} is the plate number of {city} city..

    Or if you want to print something from GET or POST operation you can use return variable name like {return.name}.

    Operation

    operation get Try Get Screen operation get try Json Picker Button operation json picker Json Picker Screen operation json picker screen How to use in output section operation output Demo test for this intent operation chat

    Operation is a way to trigger an external resource event or save to cache. There are two types of operation. These are as follow...

    Type Description
    Call Service Get or Post web request operation
    Cache Save to cache a variable operation

    Call Service

    Call Service is a way to interact with external resources or apis. There are two types of Call Service currently available.

    Type Description
    GET GET Http request
    POST POST Http request

    In these operation types you can use following options

    Type Description Required
    Uri Http request url. Can use our variables here like http://jsonplaceholder.typicode.com/posts/{id} Yes
    Headers Json object as string to use as header. Example: {"content-type":"application/json"} No
    Data Json object as string to use as post body. Example: {"username":"test"}. You can also use our variable printing markup here like {"username":"{name}"} No
    Try Get A way to test your endpoint if it's working with our system No

    In Try Get screen you can check if your endpoint is working correctly with our system. And save as example data to used in json-picker section. Json picker is a variable generator with gui. You can click the + button at the right of the text output to access to json-picker. After that you'll see a screen with mock data from your last try get.

    Forward

    Documentation coming soon...

    Entity

    entity-list

    Entity is a list of object that our bot can use to recognize data or ask question.

    For example; if we want to ask user which is their favaurite color. We can fill an colors named entity with all known colors and link it to the question with using intent paramaters.

    There are currently two types of entity. Array and Horizontal, array is for any data list and horizontal for facebook generic-template outputs.

    Add Entity

    entity-list

    To add a new entity follow these steps:

    1. click to ADD button at the right top corner in entity list page.
    2. Type entity name at left top corner of section.
    3. Select which type of entity you want to create array(default) or horizontal. You can't change this after creating an entity.
    4. Type your data.
    5. Click SAVE button to save it.

    Edit Entity

    entity-list

    To edit an entity click it's name, then you can type any new text in to Define Item section and press enter to add it to the list.

    In this screen you can also modify any item's name, sysnoms, keys or delete them if you want.

    To save click SAVE button at right top corner.

    Types

    There are currently two types of entity. Array and Horizontal, array is for any data list and horizontal for facebook generic-template outputs.

    Array

    entity-list

    This is a text based list entity type. Can be used for array, text and multi-array type paramaters.

    To add a new element type Reference Value that you want to add in Define Item section and press enter.

    Key Description Required
    Reference Value Display text value Yes
    Synonyms Equivalents of value to detech for this element. No
    Default is default repiresantation of entity No
    Keys key-value pairs for this entity, can be used by chat-bot. No

    Horizontal

    entity-card

    This is a horizontal card entity. Can be used for outputing generic-template messages.

    Key Description Required Limits
    Title Title value for this card item. Yes 0-80 Character
    Image_url Image url for this card item. No Must be a valid image url.
    Subtitle Subtitle for this card item. No 0-80 Character
    Item_url Url to open if this card is clicked. No
    Extra key-value pairs to define values that can be used by chat-bot No
    Buttons Interactive buttons (open web wage, trigger intents, etc.) No Maximum 3 button

    Buttons

    horizontal-button-list horizontal-button-web horizontal-button-intent

    There is two types of buttons here. One is to open web url, second one is to trigger an intent. You can click to Add new Button button and configure what you want to add.

    There are 3 things to chose when adding button. Button text, button type (web_url,postback) and value of the button. For web_url value must be web url. For postback you can chose a intent from combo-box. And click tick button to add button.

    Some extra information:

    Live

    Live-Chat can be described as a messaging system. http://dahi.ai/live

    Dahi.ai composed of two system first is chat bots. Second is messaging system aka. Live-chat. Live-chat is most easy way to provide a user integration system without any hurdle.

    Also with live-chat's agent section you can use live-chat as a mix of chat-bot and customer service. With doing so your chat-bot can answer most of the user's questions and if it can't answer user's question can pass the conversation to agents.

    Live-chat's some features;

    Live Settings

    In this section you can modify your live-chat, add agents, connect live-chat to a facebook chat and more. http://dahi.ai/live/settings

    Main Settings

    Main live-chat settings.

    Live-Settings

    Key Description
    Chat Name Live Chat Name
    Product Type Your product's subscribtion tier. (Free or Premium)
    Bot Section to select which bot is connected to live-chat. You can select any of your chat-bot.
    Edit Persistent Menu Section to edit your chat-bot's shortcut menu. For More Information
    When Bot Active Section to select when will your bot will be active. Always or Outside of Work Hours (Hidden if bot isn't selected.)
    Working Hours Section to configure your working hours. (Hidden if Always Selected in When Bot is Active)

    Agent Settings

    Live-Agent

    Where you can add or remove your live-chat agents.

    To add a agent there are some requirements.

    1. You must be owner of the live-chat.
    2. The mail adress you're trying to add as a agent must be registered user of dahi.ai.
    3. The mail adress you're trying to add as a agent must not be owner or agent of another live-chat.

    Adding an agent is easy;

    1. Click "Add New" Button at the right of the screen in agent section.
    2. Type the mail adress of user you want to add as agent.
    3. Click "Add" Button. And that's it.

    Live-Widget Script

    Live-Script

    This is the script you can use to add a live chat that your visitors can use to chat with your chat-bot or agents. Click "Copy to Clipboard" and paste the script in your website somewhere.

    Live-Widget Script Settings

    Live-Script

    General Settings
    Key Description
    Chat Name Live-chat name that shown to user in live-chat script.
    Image Url Live chat user image that shown to user.
    Width Size Live chat script width size. (px)
    Height Size Live chat script height size. (px)
    Enoji Add abilty to send emojis in live-chat
    User Invites Add abilty to invite other users to chat.
    Widget Type Widget type. Currently cirle or widgetbox.

    Live-Script

    Register Settings

    Key Description
    Name Surname When chat start should live-chat ask for user's name setting.
    Email Adress When chat start should live-chat ask for user's email setting.
    Phone Number When chat start should live-chat ask for user's phone number setting.

    Color Settings

    Where you can change live-chat color palatte.

    Language Settings

    Where you can change live-chat language options or placeholder texts.

    Facebook Integration

    Live-Script

    Here you can connect any of your facebook page to live-chat. Any message that your page recieve will be forward to live-chat and vice versa. In live-chat agent section you can view and response to messages your live chat recieve. Or if your live-chat has any chat-bot connected, it will automaticly reply to your customer's questions. This is the easiest way to connect your chat-bot to any facebook page.

    To connect a page to live chat follow this steps.

    1. Connect to facebook.
    2. Give permissions to Dahi.ai Chatbot.
    3. Click the "Connect to Page" button at the right of the page list.

     Live-chat Test Page

    Live-Test

    In the live-chat settings page at the right bottom corner of your screen you will a "Go To Your Client Test Page" Button. This will open a page where you can test your live chat and simulate an user interaction.

    Live-Test

    With this you can test your script and chat-bot before you add it to your website or facebook page.

    Persistent Menu

    Live-Persistent-Menu Live-Persistent-Menu

    Persistent Menu is a way to add shortcut buttons to live-chat and provide user with some go to options. You can add payload or web_url buttons in persistent menu.

    Payload buttons will trigger an intent start event when user will click on them. With this button you can add some shortcuts to your intents.

    Web_Url buttons will trigger an open web-view event in mobile and open url in new tab in pc. With this you can forward your users some external sites or resources like when an user want to buy your latest song you can put a link to your itunes page here.

    Some extra information

    Persistent-Menu

    Live Agent Panel

    Live-Agent

    Live Agent Section is where you can see your live-chat conversations, join them to answer user's questions where your bot is not able to or see whether your chat-bot did stuck at some type of questions.

    This is where you and your agents can interact with live-chat and your customers.

    Here you can select an user at the right of the screen and see their conversation history. If you want to join the chat and answer instead of chat-bot you can click the "Join Conversation" Button at the right top corner of the panel. And when you want to give back the conversation to chat-bot just click the "Leave Conversation" Button.

    At the right of the screen you can see 3 tabs at the top of the users list. You can use this options to filter users.

    If a conversation is bound to any agent, bot will not answer any question that customer is asking. So to enable bot again either you should leave conversation when you don't want to talk to the user anymore or end the conversation if you think is user won't be asking any more question anytime soon.

    Some extra information

    Live Analytics

    live-analytics

    Here you can find some usefull information about your live-chat bot and usage information. Currently this section is in development.

    Api

    To use our endpoint you need to use this code:

    curl -X POST \
      http://api.dahi.ai/dahi/bot/tkn/59fff527e4b0cf33abf0c959 \
      -H 'content-type: application/json' \
      -H 'x-requested-with: XMLHttpRequest' \
      -d '{"recipientId":"user_id" , "message":{ "text":"yemek"}}'
    

    Make sure to replace user_id with a user_id and 59fff527e4b0cf33abf0c959 with your bot id.

    # request body example
    {
      "recipientId": "user_id",
      "message": {
        "text": "text"
      }
    }
    
    
    # response body example, there are more information that is removed from this example.
    {
      "result": {
        "messages": [{
          "type": "array", // Message Type
          "values": [ // Buttons for array type message
            {
              "text": "Dışarıda Yemek İstiyorum",
              "extra": {
                "kisa": "Dışarıda",
                "payload": "59fff930e4b0cf33abf0c984_16"
              }
            },
            {
              "text": "Burada Yemek İstiyorum",
              "extra": {
                "payload": "59fff930e4b0cf33abf0c984_17"
              }
            }
          ],
          "text": "Nerede Yemek İstersiniz?" // Message Text
        }],
        "conversation_id": "conversation id"
      }
    }
    

    You can use our dahi.ai chat-bot platform with our endpoint.

    You can learn your bot's bot_id (bot token) from bot settings page.

    http://api.dahi.ai/dahi/bot/tkn/{bot_id}

    From response result.messages array is the response messages array.

    Template

    What is Template

    template-list template-edit

    Template is a way to create message data that supported by dahi.ai. If you want to create a horizontal scroll array message from your REST api data, you can use template feature to create a middleware REST api.

    When you created a template if you revisit it's edit page you will see a url like https://template.maytap.me/service/59f71e0de0aadb6b3ec6256c that you can use to access to this template from any service. You'll get a unique id for each one of your templates. This REST service can be called with GET and POST methods. You can find more information in USAGE section

    Template system is new and still under development and curently is BETA stage. When we update this system your old schemes might break.

    Also our variable access system in template is different from dahi.ai's chat-bot system.

    Main Paramaters

    Here are some descriptions of which paramater means what.

    Key Description Default Type Required
    name Label for template, used to identify your templates from each other No Default String No
    uri If your template needs to call a external REST service to extract data from you need to define it here. No Default String No
    method Which method used to call your uri call. GET or POST GET String No
    dahi Which shema 0 Number No
    data Static data that can be used by this template with {{#data.variableName}} {} Object No
    schemas Schemas array. Look at shemas section for more information [] Array Yes

    For uri you can use your static data or post data values. For more information check Paramater System Section

    Schemas

    template-schema

    // Output examples from this schema
    // GET https://template.maytap.me/service/59f71e0de0aadb6b3ec6256c
    {
      "multi_message": true,
      "messages": [{
          "type": "text",
          "text": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit is where"
        },
        {
          "type": "text",
          "text": "qui est esse is where"
        },
        {
          "type": "text",
          "text": "ea molestias quasi exercitationem repellat qui ipsa sit aut is where"
        },
        {
          "type": "text",
          "text": "eum et est occaecati is where"
        }
      ]
    }
    
    // GET https://template.maytap.me/service/59f71e0de0aadb6b3ec6256c?s=1&data.y=12
    {
      "multi_message": true,
      "messages": [{
        "type": "text",
        "text": "12 15"
      }]
    }
    

    Shema is a mapping style to used to create a output data. Your uri, method, data, REST Response from your uri, post body, query paramaters etc. can be used here. There are some keywords helper can be used here other than that you can also use Paramater System to import data to string values. Chat-bot system uses a specific message recognition from Call Service Operation if response from a Call Service is json and has {multi_message:true,messages:[]} Keyword it'll automaticly try to look messages array to and create messages from this array to send to the user. And objects in this array must be message formatted objects. For text message it can be like this {type:"text",text:"Hello, World!"}. This will create a Hello, World! message and send it as a response to the user. Because it's an array you can send multiple messages in one request call.

    In this example there are two schemas first one has __each,__type,__limit helpers and type,text key-value pairs. You can find more information in Helpers Section and how {{}} works can be found in Paramater System.

    We're adding more helpers and features according to the customers needs. If you think a helper would improve or help customers to create their templates easly you can contact us through [email protected]. Your suggestion must not break old shemas.

    Paramater System

    Paramater system currently can be used in 3 section __if helper, uri string for template and string values in schema. Check helpers section for more information for __if helper.

    URI

    curl -X GET \
      'https://template.maytap.me/service/59f71e0de0aadb6b3ec6256c?data.id=2'
    
    or
    
    curl -X POST \
      https://template.maytap.me/service/59f71e0de0aadb6b3ec6256c \
      -H 'content-type: application/json' \
      -d '{"data":{"id":1}}'
    

    First of all let's say we want to pass a paramater to uri from post body we use to call template endpoint or get query paramaters to call template endpoint. At this point of system (creation of url) you have access to static data from template object, and body object. More info about body object can be found in Usage Section.

    For example let's say our uri is like this https://jsonplaceholder.typicode.com/posts/{{id}}. Here it will try to access data.id value from body. So we want to send id paramater in data here(As shown in examples at right section). As default {{key}} would try to read 'key' data from request.body.data object. If you want to access to static data from your template you can use {{#data.x}} shown in second schema.

    In string values

    // Example url: https://template.maytap.me/service/59f71e0de0aadb6b3ec6256c?s=1&data.y=12
    // Schema object used in this example
    {
      "name": "test",
      "uri": "https://jsonplaceholder.typicode.com/posts",
      "method": "GET",
      "dahi": 0,
      "data": {
        "x": "15"
      },
      "schemas": [{
          "__each": "",
          "__type": "custom",
          "__limit": 4,
          "type": "text",
          "text": "{{title}} is where"
        },
        {
          "text": "{{#body.data.y}} {{#data.x}}",
          "type": "text",
          "__type": "custom"
        }
      ]
    }
    
    // Output from example
    {
      "multi_message": true,
      "messages": [{
        "type": "text",
        "text": "12 15"
      }]
    }
    

    Here {{key}} would try to read from cursor. Cursor is most of the time would point at response recieved from uri request. But if it's inside an __each helper object it would point at array's object that currently used to create this iteration. More info __each helper section.

    other then that you can access to scope with using # tag. If you want to access to request body that you used to call template you can use {{#body.x}} like if i use https://template.maytap.me/service/59f71e0de0aadb6b3ec6256c?s=1&data.y=12 url to call my template (Look at Schema object used in this example) in this call our body object would be {s:1,data:{y:12}} here s:1 means use schemas[1] to create our output. our output text is {{#body.data.y}} {{#data.x}} (from schema[1]) and created output shown at right section. Here you can see #body.data.y and #data.x used. As you can guess you can access to body with #body tag and #data is used to access to template.data object. In this schema it's just creating a simple message combining a static data stored inside template.data object and a variable from get url call.

    Let's say your api response is {"arr":[1,2,3,4]} and you want to print second element from arr array. To do so you can use {{arr[1]}} to print it.

    Another example with {"test":{"text":"hello"}} response data to print hello world we can use {{test.text}}, World! complete shema would look like this. {{__type:"custom",type:"text",text:"{{test.text}}, World!"}}. Here __type would wrap our object inside {multi_message:true,messages:[<here our object would be put>]} so dahi.ai can understand that this template a message printing operation. type:"text" is defines what type of message is this. and text would be what will be sended to the user.s

    Helpers

    Helpers are there to make things easier or add some features that you can do with basic features.

    __if helper

    // shema examples
    // get every finished work
    {
      "__each":"",
      "__type": "custom",
      "__if": "{{completed}}",
      "__then": {
        "type": "text",
        "text": "Finished Work - {{title}}!"
      }
    }
    
    // get every work and tag
    {
      "__each":"",
      "__type": "custom",
      "__if": "{{completed}}",
      "__then": {
        "type": "text",
        "text": "Finished Work - {{title}}!"
      },
      "__else": {
        "type": "text",
        "text": "Not Finished Work - {{title}}!"
      }
    }
    

    __if helper uses two more paramaters. They are __then and __else. __if helper takes a string value that filled with javascript condition code like true, '{{finished}}==='yes', {{id}} > 1, '{{name}}'.length > 20 , etc. As you can see you can use our Paramater System inside this string. If this value is true it'll use __then's value as generator, if not true it'll use __else's value as generator. If it looks for __then's or __else's value and can't find one it'll generate null. __then and __else value can be anything that is valid as

    For example; Let's create a template that uses https://jsonplaceholder.typicode.com/todos api. We want to print messages according to the todo's completed status. If it's completed we want to add Finished tag to start of items text data. In example we created there are two schemas. First one returns only the ones that has completed:true. Second one prints every one but adds Finished Work or Not Finished Work to start of the text according to the completed value.

    __each helper

    This is a foreach operation. It's value should point to a json array. If array is root of the json response __each's value should be "".

    For example let assume our request from external service is {test:[{key:1},{key:2}]} and our schema is {__each:"test",number:"{{key}}"} would generate [{number:"1"},{number:"2"}].

    __limit helper

    This is a helper for __each helper to put a limit to how much item would you like to return maximum. Value must be a integer.

    __type helper

    // Example horizontal type Schema
    {
      "__type": "horizontal",
      "__limit": 2,
      "title": "{{title}}",
      "subtitle": "subtitle {{title}}",
      "image_url": "",
      "buttons": [],
      "__each": ""
    }
    
    // Example horizontal type Output From Schema
    {
      "multi_message": true,
      "messages": [{
        "type": "horizontalscrollarray",
        "values": [{
            "image_url": "",
            "buttons": [],
            "subtitle": "subtitle delectus aut autem",
            "title": "delectus aut autem"
          },
          {
            "image_url": "",
            "buttons": [],
            "subtitle": "subtitle quis ut nam facilis et officia qui",
            "title": "quis ut nam facilis et officia qui"
          }
        ]
      }]
    }
    
    
    

    This a wrapper helper. Value generated from this object would be wrapped inside __type's wrapper. There are currently 2 wrappers custom and horizontal.

    custom wrapper would wrap output object inside a dahi.ai chat-bot send message operation format. {multi_message:true,messages:[<here our object would be put>]}. If the object that will be wrapped is array it would append to messages array. The object inside messages array must be a dahi.ai message formatted object like {type:"text",text:"Hello, World!"}.

    horizontal wrapper would wrap output object inside a dahi.ai chat-bot horizontal message type. Look at example for more information.

    Usage

    // Template
    {
      "uri":"https://jsonplaceholder.typicode.com/posts/{{id}}",
      "method":"GET"
    }
    
    // Call url https://template.maytap.me/service/5a09415f91be0e2aef74b4d3?data.id=1&raw=true
    {
      "userId": 1,
      "id": 1,
      "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
      "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
    }
    
    // Call url https://template.maytap.me/service/5a09415f91be0e2aef74b4d3?data.id=2&raw=true
    {
      "userId": 1,
      "id": 2,
      "title": "qui est esse",
      "body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla"
    }
    
    // Template
    {
      "uri":"https://jsonplaceholder.typicode.com/posts/{{id}}",
      "method":"GET"
    }
    
    // Post to url https://template.maytap.me/service/5a09415f91be0e2aef74b4d3
    {
      "data":{
        "id":1
      },
      "raw":true
    }
    
    // Response
    {
      "userId": 1,
      "id": 1,
      "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
      "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
    }
    

    What template api looks when a request made is id of your template, index of which schema you want to use s:0 default. Data to use in uri creation or to post to external server. Should response generated with dahi schema dahi:false default.

    If we combine these we'll get a object like this: {s:0,data:{},id:"5a0407686090c8750ae9baa9",dahi:false}. For more example look at right section.

    How to get raw response to debug

    If you add ?raw=true to your url or add raw:true to your request json if you are using post method. With this you can debug what our system recieves before generation a output data from external api that defined from uri. example url: https://template.maytap.me/service/5a0407686090c8750ae9baa9?raw=true.

     With GET Call

    In this method (When template.method="GET") data would be used to generate uri. Let's say our uri in template is https://jsonplaceholder.typicode.com/posts/{{id}}. It needs id to generate this uri so need to pass id value inside data object so our call uri needs to be https://template.maytap.me/service/<id>?data.id=1. This uri would generate {s:0,data:{id:1},dahi:false} object and send it to template.

     With POST Call

    It's same with get method but in this we're sending all the information in request body.

    Template's POST Method

    In previous sections we have examples that uses method GET. For template that uses POST there is just a small difference. data from {s:0,data:{},dahi:false} would be used as request body to call your uri that defined in template.