Skip to main content

UnleashX API Documentation

Welcome to the UnleashX API! Our comprehensive API enables you to build sophisticated voice AI applications, manage conversational agents, and integrate human-like conversations into your workflows.

What is UnleashX?

UnleashX is a platform for building, deploying, and managing AI-powered voice agents and workflows. Our APIs provide everything you need to build intelligent voice applications at scale.

Key Features

  • Voice AI Agents: Create and manage agents for natural conversations
  • Phone & Chat Integration: Make/receive calls, build chatbots
  • API Control: Automate calls, control voice agents via API
  • Workflow Automation: Design complex workflow automations
  • Analytics & Reporting: Track usage and performance

Getting Started

1. Authentication Flow (Access Token Generation)

UnleashX APIs now use a two-step token system for access:
  1. Login or Create Account to get a login token
  2. Call the Generate Token API with your login token to get an API access token
  3. Use the API Token for all authenticated API requests

Step 1: Login or Create Account

Use the login endpoint to authenticate and get your login token. Example:
curl -X POST https://your-domain.com/api/login \
  -H "Content-Type: application/json" \
  -d '{
    "username": "[email protected]",
    "password": "your_password"
  }'

# The response includes your login token:
# {
#   "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
# }

Step 2: Generate Your API Token

Use your login token to generate a persistent API token:
curl -X POST https://your-domain.com/api/v1/global/generate-token \
  -H "Content-Type: application/json" \
  -H "token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -d '{}'

# The response:
# {
#   "message": "API token generated successfully",
#   "token": "359b83f43a5f5702cfbdedad269bd4f1d726fc576c48cdc65b594ce57896f0f9"
# }
Note: This API token never expires, but you should store it securely.

Step 3: Use Your API Token in Requests

Pass the token in the token header for authenticated API calls:
curl -X POST https://your-domain.com/api/v1/global/verify \
  -H "Content-Type: application/json" \
  -H "token: 359b83f43a5f5702cfbdedad269bd4f1d726fc576c48cdc65b594ce57896f0f9" \
  -d '{}'

Base URL

All API requests should use:
https://your-domain.com/api/v1/global

API Design

  • RESTful Design: Consistent, resource-oriented URLs
  • JSON Format: Accepts and returns application/json
  • Standard HTTP: Uses HTTP verbs and status codes
  • Token Auth: API requests require a valid token header (your API token)

Example: Agent Creation (Authenticated)

curl -X POST https://your-domain.com/api/agent/createagentorupdate \
  -H "Content-Type: application/json" \
  -H "token: 359b83f4...your_api_token_here" \
  -d '{
    "basic_details": {
      "agent_name": "My Agent",
      "description": "A helpful assistant",
      "agent_type": 1
    }
  }'

Error Handling

The API uses standard HTTP status codes:
  • 200 - Success
  • 201 - Created
  • 400 - Bad Request
  • 401 - Unauthorized (invalid/expired token)
  • 404 - Not Found
  • 429 - Rate Limited
  • 500 - Server Error

Support

For help, contact: [email protected]