JSON API
Last updated
Last updated
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:
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.
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.
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.
To construct an API request within the Story Builder, follow these steps:
Enter URL: Specify the complete URL of the endpoint you wish to interact with.
Body (Optional): For POST, PUT, and PATCH requests, provide the data you intend to send to the server in JSON format.
Enter Params (Optional): Define any additional parameters required by the specific API endpoint.
Headers (Optional): Set custom headers for your request, if necessary.
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.
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.
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.