Help Center

REST API Integration Guide

Connect your chatbot to external REST APIs using OpenAPI specifications. Enable real-time data retrieval, product information, order status checks, and seamless integration with third-party services.

What You Can Do With REST API Integration

  • ✅ Retrieve real-time product information and inventory
  • ✅ Check order status and shipping details
  • ✅ Access customer data and account information
  • ✅ Integrate with e-commerce platforms and CRMs
  • ✅ Fetch dynamic content from external services

Step 1: Understanding REST API Integration

REST API integration allows your chatbot to communicate with external services and retrieve real-time information. Using OpenAPI specifications, your AI can understand API endpoints, parameters, and response formats to provide accurate and up-to-date information to customers.

How REST API Integration Works

1
Customer Query: A customer asks about products, order status, or any information that requires external data
2
AI Analysis: Your chatbot's AI determines that the query requires REST API data and selects the appropriate endpoint
3
API Call: The chatbot makes an authenticated request to the external API and retrieves the required information
4
Response Generation: The AI formats the API response into a natural, helpful response for the customer

Common Use Cases

E-commerce Integration

  • Product catalog and pricing
  • Inventory availability
  • Order tracking and status

Customer Service

  • Account information lookup
  • Support ticket status
  • Billing and subscription details

Real-time Data

  • Weather and location services
  • Financial data and rates
  • News and content updates

Business Systems

  • CRM customer records
  • Inventory management
  • Analytics and reporting

Step 2: Setting Up REST API Integration in EchowiseAI

Now let's configure REST API integration in your EchowiseAI dashboard. You'll need to provide the OpenAPI specification URL, configure authentication, and define when the API should be used.

Add REST API as a New Action

  1. 1
    Access Actions Panel: In your EchowiseAI dashboard, click on Actions in the left sidebar
  2. 2
    Install REST API Skill: Find the REST API skill card and click Install
  3. 3
    Configure REST API: Fill in the configuration form with your API details and OpenAPI specification

Configuration Fields

AI Instructions* (Required)

Explain when this skill should be used and describe what this REST API is about.

Example Instructions:

"This skill should be used when customers ask about available products or order status. The store sells handmade candles and home decor."

* This field helps your AI understand when to use the REST API vs. other responses

OpenAPI Specification URL* (Required)

The URL to your OpenAPI/Swagger specification file (YAML or JSON format)

Examples:

  • https://example.com/ehousing_openapi.yaml
  • https://api.example.com/openapi.json
  • https://yourdomain.com/swagger.yaml
  • https://docs.api.com/specification.yaml

The OpenAPI spec should be publicly accessible or accessible with basic authentication

API Base URL* (Required)

The base URL for your API endpoints

Examples:

  • https://api.example.com
  • https://api.example.com/v1
  • https://yourdomain.com/api
  • https://api.service.com

This is a base URL for OpenAPI. Leave it blank for automatic resolution from OpenAPI spec.

API Token (Optional)

Authentication token for accessing protected API endpoints

Common Token Types:

  • Bearer tokens (Authorization: Bearer <token>)
  • API keys (X-API-Key: <key>)
  • Custom headers (X-Auth-Token: <token>)
  • Query parameters (?api_key=<key>)

Store tokens securely. They will be encrypted in your configuration.

Source Data URL (Optional)

Additional data source for training your chatbot about the API

Examples:

  • https://example.com/test-source-data.json
  • https://yourdomain.com/api-docs/data.json
  • https://docs.example.com/sample-data.yaml

This can include sample responses, field descriptions, or additional context

💡Pro Tip

Test your API connection before saving by clicking the "Test Connection" button (if available). This helps ensure your API endpoints are accessible and authentication is working correctly.

Step 3: OpenAPI Specification Requirements

Your OpenAPI specification should be well-structured and comprehensive to ensure the AI can effectively understand and use your API endpoints.

Essential OpenAPI Elements

1. API Information

  • • Clear title and description of your API
  • • Version information
  • • Contact information for support

2. Endpoint Definitions

  • • HTTP methods (GET, POST, PUT, DELETE)
  • • URL paths and parameters
  • • Request/response schemas
  • • Example requests and responses

3. Data Models

  • • Clear field descriptions
  • • Data types and formats
  • • Required vs. optional fields
  • • Enum values where applicable

Frequently Asked Questions

What OpenAPI versions are supported?
EchowiseAI supports OpenAPI 3.0.x specifications. If you have an older Swagger 2.0 spec, you'll need to convert it to OpenAPI 3.0 format using tools like the Swagger Editor or online converters.
Can I use multiple REST APIs in one chatbot?
Yes! You can install multiple REST API integrations in your chatbot. Each integration can be configured with different OpenAPI specs and authentication methods. The AI will automatically choose the most appropriate API based on the customer's query.
What happens if my API is down?
If your REST API is unavailable, the chatbot will gracefully handle the error and inform the customer that the information is temporarily unavailable. Your chatbot will continue to function with other available actions and knowledge bases.
Can I customize the API response format?
The AI automatically formats API responses based on your OpenAPI specification and the context of the customer's question. You can influence the response format by providing clear descriptions in your OpenAPI spec and using the source data URL for additional examples.
How secure is my API token?
All API tokens are encrypted and stored securely in our system. They are only used to make authenticated requests to your API endpoints and are never exposed in logs or to customers.
Can I use REST APIs with other actions?
Absolutely! REST API integration works seamlessly with other actions like webhooks, knowledge bases, and custom actions. You can create complex workflows that combine real-time API data with other chatbot capabilities.