> For the complete documentation index, see [llms.txt](https://docs.makerobos.com/frontman-enterprise-chatbot-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.makerobos.com/frontman-enterprise-chatbot-platform/story-builder/cards/utility-cards/json-api.md).

# JSON API

The Story Builder empowers you to unlock the potential of powerful integrations with your own server or third-party systems using JSON API. This functionality allows you to:

<figure><img src="https://3746379134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FamP4egBrOsuezKyj1NQl%2Fuploads%2FiqjAebk7wOxbsMnJuhq5%2Fjson%20API.png?alt=media&amp;token=bdd3b3e9-8fe0-46a8-b62a-3bb67d4dac40" alt=""><figcaption></figcaption></figure>

* **Export Data:** Seamlessly export user data and conversation insights to external systems like Learning Management Systems (LMS) or Customer Relationship Management (CRM) platforms.
* **Personalized Content:** Craft dynamic content within your stories, tailoring the conversation experience based on user data retrieved from external sources.

### **Unlocking Integration Potential:**

For detailed examples and guidance on implementing integrations, refer to the provided Github repository. This resource will equip you with the knowledge to leverage JSON API effectively.

### **Understanding HTTP Methods:**

The Story Builder utilizes the following HTTP methods for interacting with external APIs:

* **GET:** Retrieve data from a specified URL.
* **POST:** Create a new resource on the server.
* **PUT:** Update an existing resource entirely.
* **PATCH:** Update specific parts of an existing resource.
* **DELETE:** Remove a resource from the server.

### **Crafting Your Request:**

To construct an API request within the Story Builder, follow these steps:

1. **Enter URL:** Specify the complete URL of the endpoint you wish to interact with.

   <figure><img src="https://3746379134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FamP4egBrOsuezKyj1NQl%2Fuploads%2FkkA37ZHhSkaXsMAluzVH%2Fjason%20URL.png?alt=media&amp;token=031d9997-2ea4-408c-96d1-741ce106730a" alt=""><figcaption></figcaption></figure>
2. **Body (Optional):** For POST, PUT, and PATCH requests, provide the data you intend to send to the server in JSON format.

   <figure><img src="https://3746379134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FamP4egBrOsuezKyj1NQl%2Fuploads%2FWMEeYLQnBkPbnrkXQqEg%2Fjason%20api%20get.png?alt=media&amp;token=bbeeb507-033a-4181-8b74-255111579d9c" alt=""><figcaption><p>"GET" is used to Retrieve Data</p></figcaption></figure>

   <figure><img src="https://3746379134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FamP4egBrOsuezKyj1NQl%2Fuploads%2Fhg82tb2pOzUCkUzK3KgQ%2Fpost.png?alt=media&amp;token=dad7a645-5704-4fbd-b56f-9c7df1de4453" alt=""><figcaption><p><strong>POST:</strong> Create a new resource on the server.</p></figcaption></figure>

   <figure><img src="https://3746379134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FamP4egBrOsuezKyj1NQl%2Fuploads%2FpAiBkBKF7IBsmCPuGUJU%2Fput.png?alt=media&amp;token=f795dcc5-0513-4d26-890d-e5f5cfae843d" alt=""><figcaption><p><strong>PUT:</strong> Update an existing resource entirely.</p></figcaption></figure>

   <figure><img src="https://3746379134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FamP4egBrOsuezKyj1NQl%2Fuploads%2FL37YUfwnRsU5qsPX80Dw%2Fpatch.png?alt=media&amp;token=f06470a3-aa66-48a0-a5e2-1ead49760162" alt=""><figcaption><p><strong>PATCH:</strong> Update specific parts of an existing resource.</p></figcaption></figure>

   <figure><img src="https://3746379134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FamP4egBrOsuezKyj1NQl%2Fuploads%2FNKXsFIbzIeLLUe2K6P43%2Fdelete.png?alt=media&amp;token=8dbabed7-d09e-43a5-8c10-a3e778b462bd" alt=""><figcaption><p><strong>DELETE:</strong> Remove a resource from the server.</p></figcaption></figure>
3. **Enter Params (Optional):** Define any additional parameters required by the specific API endpoint.

<figure><img src="https://3746379134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FamP4egBrOsuezKyj1NQl%2Fuploads%2FiHyzvgjUfiaVmin85YVc%2Fjson%20API222.png?alt=media&amp;token=185cd6b8-24d1-4311-8f0e-72138518e061" alt=""><figcaption></figcaption></figure>

4. **Headers (Optional):** Set custom headers for your request, if necessary.

<figure><img src="https://3746379134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FamP4egBrOsuezKyj1NQl%2Fuploads%2FO8htoa71imIOyveHqVTZ%2Fheader1.png?alt=media&amp;token=9ec6abd4-4180-4a57-9301-3a6a672e1b97" alt=""><figcaption></figcaption></figure>

### **Query Parameters:**

* **URL Preview:** Visualize the constructed URL with any query parameters included.
* **Query:** Specify key-value pairs to be appended to the URL as query parameters.
* **Add Item:** Easily add additional query parameters as needed.

### **Supported Content Types:**

The Story Builder allows you to choose from various content types for your request body:

* **None:** No body data is sent.
* **Structured:** Structured data format (specific format may depend on the external API).
* **Multipart form:** Data sent in multipart form format.
* **Form URL Encoded:** Data encoded using the application/x-www-form-urlencoded content type.
* **Text:** Plain text data.
* **JSON:** JSON-formatted data (commonly used for API requests).
* **XML:** Data in XML format.
* **YAML:** Data in YAML format.
* **PLAIN:** Raw, unformatted text data.

### **Testing Your Request:**

The Story Builder provides a "Test Request" functionality to send a test request and view the response from the external API. This allows you to verify the accuracy and functionality of your integration before deployment.
