# JSON API Blocks in BotEditor™

The BotEditor™ offers JSON API integration blocks which can be used to send https GET and POST requests at any time during the dialogue flow.

![](https://lh5.googleusercontent.com/T89GUkjrS6lhQGBC-HN0M5l0uVZ0hdiUQMxzsUCR_GeKl1oG7CFY8--zOYFoVfdoxmhR4qq5Gk5jpjfmAsGDou_c632GapbF5qjV7hg7H6RvF6fWrkMICdDfySW7yCR9oeejtJ0K)

**URL**\
Refers to the endpoint of API which will be used in the JSON block. The curly bracket variable denotes what will be replaced with the entered variable value once the block is executed.

![](https://lh4.googleusercontent.com/o2LAowIhhOa6ay9mI7Q0G4UL1AZnePNTACk8LEBbYWUEbUrpy-_mODskfzew290HEfWKzWbOSRwZtgyv8J2hcDPTi9csYXz_lp3-rTw)

**Method**\
HTTP method that is to be used in the request, select from either “GET” or “POST”.

![](https://lh4.googleusercontent.com/7Ly54ZDtwWFEQSuRnsv_OhtSaZFcnyavtX1hUSM-NscsBHwbTA-tInKWH8-gL6s-paj5gwc0uYjJkJloelnXJ8_bnGKJ_IFZWLr69fNVkeOXSUMVJYMNnYWwE8dlQUTjXNFl3Ivs)

**Authentication**\
Enables passing user token from Webchat in the header of our request.

![](https://lh5.googleusercontent.com/pjH5Q3vicyqISvZhIeANa5Kj1si6RCQm2yQBJJ7XJUClQOrynCLcTtVcAZ5ztvIec_naoNk69Xdl45IVt04OoDdmpRZN-c4jv-6OygXEqVDk9ci7KRzySOH0GEFMsfNutbe1-T4T)

**Payload (JSON)**\
The JSON body of our request. Only works with POST methods.

{% hint style="danger" %}
Note: Payload is currently not supported.
{% endhint %}

![](https://lh3.googleusercontent.com/dSXiLh3f44spdd7Zx_6hrFv86KNOebUHtc-2z_ATJlcEESRYoLJv2RD87MDD8yCt4hOgPo1jnigSdr8c33LVJaeVonyb-o5MWBBIn79OTrHizK_Tv4dBAIc30P1UqzStKSHvuHWz)

**Example Bot Dialogue Flow**\
Using the the JSON API block to create a bot that provides the capital city of a requested country.

![](/files/-LPSNfOPBxeLKbVfP5rr)

![](/files/-LPSNj6h8Eqd9bUbf-3m)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sinitic.gitbook.io/knowledge-base/how-to-use-boteditor/json-api-blocks-in-boteditor-tm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
