> 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="/files/fjvBiTb8UTjogJFLCtFt" 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="/files/dRUfpVvWXUDyH4shQmqi" 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="/files/pZenMALYMQNbhhrANtpK" alt=""><figcaption><p>"GET" is used to Retrieve Data</p></figcaption></figure>

   <figure><img src="/files/cFtgrXOAkZXC5oPpBN8D" alt=""><figcaption><p><strong>POST:</strong> Create a new resource on the server.</p></figcaption></figure>

   <figure><img src="/files/ya8GrBEuQq26pCtYdutg" alt=""><figcaption><p><strong>PUT:</strong> Update an existing resource entirely.</p></figcaption></figure>

   <figure><img src="/files/GSGWQbvISgjdk2PjUtbj" alt=""><figcaption><p><strong>PATCH:</strong> Update specific parts of an existing resource.</p></figcaption></figure>

   <figure><img src="/files/9RbbD30dszBESpfMOxwJ" 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="/files/KzjyoQgIQ4nYdhfOz42q" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/WpxTORiAh9ISy2yZOsDS" 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.
