> For the complete documentation index, see [llms.txt](https://sinitic.gitbook.io/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sinitic.gitbook.io/knowledge-base/how-to-use-boteditor/json-api-blocks-in-boteditor-tm.md).

# 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.

![](https://3596211051-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKRxyYN947NtZeWKUi5%2F-LPSLxh9WkekLcOQlz3d%2F-LPSNfOPBxeLKbVfP5rr%2Fimage.png?alt=media\&token=a3067c7e-1bb1-42ae-8fa6-8db184bd9f56)

![](https://3596211051-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKRxyYN947NtZeWKUi5%2F-LPSLxh9WkekLcOQlz3d%2F-LPSNj6h8Eqd9bUbf-3m%2Fimage.png?alt=media\&token=90bea162-08fe-403a-b285-0bbcbc50862a)
