Developer Portal
  • Overview
  • Authentication
  • API Documentation
  • SDKs
  • Guides

CallX Open API

Welcome to the CallX Developer Portal. Here you'll find everything you need to integrate CallX's powerful communication features into your applications.

The CallX Open API provides a comprehensive set of RESTful endpoints allowing you to:

  • Send and receive messages across 160+ messaging platforms
  • Initiate voice and video calls
  • Create and manage conversations
  • Access user profiles and status information
  • Broadcast messages to multiple recipients
  • Integrate with external messaging platforms

To get started, you'll need to create an API key with appropriate permission scopes. Check out the Authentication section for details.

Authentication

CallX API uses API keys for authentication. Each API key has specific permission scopes that control what operations it can perform.

Creating an API Key

You can create an API key through the CallX Dashboard under Settings > API Keys. You'll need to specify:

  • A name for your API key
  • Permission scopes
  • Optional expiration date
  • Rate limit (defaults to 100 requests per hour)

Using Your API Key

Include your API key in each request's header:

X-API-Key: your_api_key_here

Available Permission Scopes

Scope Description
messages:read Read messages
messages:write Send messages
conversations:read Read conversations
conversations:write Create and manage conversations
calls:read View call history
calls:write Initiate and manage calls
broadcasts:read View broadcasts
broadcasts:write Create and manage broadcasts
profile:read Read user profile information
protocols:read View available protocols
rtc:write WebRTC signaling
platforms:read View available platforms
platforms:write Connect to platforms
analytics:read View analytics data
translation:write Use translation services
tv:read Access TV network data

API Documentation

The CallX API follows RESTful principles with JSON request and response payloads. Our complete OpenAPI specification is available here.

Interactive API Explorer

Try out API calls directly from your browser with our interactive API explorer.

Open API Explorer →

Integration Guides

Explore comprehensive guides for integrating CallX with various messaging platforms.

View Integration Guides →

Error Codes Reference

Browse our comprehensive list of error codes, explanations, and resolution steps.

View Error Codes →

API Changelog

Stay up to date with API changes, new features, and deprecations.

View Changelog →

Base URLs

All API requests should be made to:

https://callx.us/v1

For testing, use our sandbox environment:

https://sandbox.callx.us/v1

API Versioning

The CallX API supports multiple versioning strategies:

  • URL Path Versioning: Include the version in the URL path (e.g., /v2/openapi/messages)
  • Header Versioning: Use the Accept-Version or X-API-Version headers
  • Query Parameter Versioning: Add ?version=2.0 to the request URL

The current stable version is 1.0. Version 2.0 is available in beta. See the changelog for details on version differences.

Pagination

The API supports both cursor-based and offset-based pagination:

Pagination Type Parameters Best For
Cursor-based cursor, limit Large datasets, real-time data
Offset-based page, limit Smaller datasets, fixed page navigation

Cursor-based pagination example:

// First request
GET /openapi/messages?conversation_id=123&limit=20

// Response includes pagination info
{
  "data": [...],
  "pagination": {
    "nextCursor": "eyJpZCI6MTAwLCJjcmVhdGVkQXQiOiIyMD...",
    "prevCursor": null,
    "limit": 20,
    "hasMore": true
  }
}

// Next page request uses the nextCursor value
GET /openapi/messages?conversation_id=123&limit=20&cursor=eyJpZCI6MTAwLCJjcmVhdGVkQXQiOiIyMD...

Rate Limiting

API requests are rate-limited based on your plan. Rate limit information is returned in response headers:

X-RateLimit-Limit: 100       // Requests allowed per hour
X-RateLimit-Remaining: 95    // Requests remaining this hour
X-RateLimit-Reset: 1612897156  // Unix timestamp when the limit resets

When you exceed your rate limit, you'll receive a 429 Too Many Requests response with a Retry-After header.

Webhooks

Webhooks allow you to receive real-time notifications about events in the CallX platform:

  1. Register a webhook URL using the /api/webhooks endpoint
  2. Select the events you want to receive (messages, calls, user status, etc.)
  3. We'll send HTTP POST requests to your URL when events occur
  4. Verify webhook signatures using your webhook secret to ensure security

Webhook payloads include:

{
  "id": "whk_123456789",
  "event": "message.created",
  "timestamp": "2025-05-09T02:15:34Z",
  "data": {
    // Event-specific data
  }
}

For security, verify webhook signatures using the X-CallX-Signature header.

Key Endpoints

GET /openapi/status API status and version information
GET /openapi/users/me Get authenticated user profile
GET /openapi/conversations List conversations
POST /openapi/conversations Create a new conversation
GET /openapi/messages List messages in a conversation
POST /openapi/messages Send a message
POST /openapi/calls Initiate a call
GET /api/webhooks List registered webhooks
POST /api/webhooks Register a new webhook

Response Codes

Code Description
200 OK The request succeeded
201 Created Resource successfully created
204 No Content Request succeeded with no response body
400 Bad Request Invalid request format or parameters
401 Unauthorized Authentication required or API key invalid
403 Forbidden Insufficient permissions (missing required scopes)
404 Not Found Requested resource doesn't exist
409 Conflict Request conflicts with current state of the resource
429 Too Many Requests Rate limit exceeded
500 Server Error Internal server error
503 Service Unavailable The service is temporarily unavailable

SDKs & Code Examples

The following SDKs are available to help you integrate with the CallX API in your preferred programming language:

JavaScript
Python
Java
C#
Go
Ruby
PHP
Swift
Kotlin
Rust

Installation

npm install callx-sdk

Example: Send a message

const CallX = require('callx-sdk');

// Initialize the client
const callx = new CallX.Client({
  apiKey: 'YOUR_API_KEY'
});

// Send a message
async function sendMessage() {
  try {
    const message = await callx.messages.send({
      conversationId: 123,
      content: 'Hello from the CallX API!',
      contentType: 'text'
    });
    
    console.log('Message sent:', message.id);
  } catch (error) {
    console.error('Error sending message:', error);
  }
}

sendMessage();

Installation

pip install callx-sdk

Example: Send a message

from callx import Client

# Initialize the client
callx = Client(api_key='YOUR_API_KEY')

# Send a message
def send_message():
    try:
        message = callx.messages.send(
            conversation_id=123,
            content='Hello from the CallX API!',
            content_type='text'
        )
        
        print(f'Message sent: {message.id}')
    except Exception as e:
        print(f'Error sending message: {e}')

send_message()

Installation

// Using Maven
<dependency>
    <groupId>com.callx</groupId>
    <artifactId>callx-sdk</artifactId>
    <version>1.0.0</version>
</dependency>

// Using Gradle
implementation 'com.callx:callx-sdk:1.0.0'

Example: Send a message

import com.callx.Client;
import com.callx.models.Message;
import com.callx.requests.SendMessageRequest;

public class SendMessageExample {
    public static void main(String[] args) {
        // Initialize the client
        Client callx = new Client.Builder()
            .apiKey("YOUR_API_KEY")
            .build();
        
        // Send a message
        try {
            SendMessageRequest request = new SendMessageRequest.Builder()
                .conversationId(123)
                .content("Hello from the CallX API!")
                .contentType("text")
                .build();
                
            Message message = callx.messages().send(request);
            System.out.println("Message sent: " + message.getId());
        } catch (Exception e) {
            System.err.println("Error sending message: " + e.getMessage());
        }
    }
}

Installation

dotnet add package CallX.SDK

Example: Send a message

using CallX;
using CallX.Models;
using System;
using System.Threading.Tasks;

namespace CallXExample
{
    class Program
    {
        static async Task Main(string[] args)
        {
            // Initialize the client
            var callx = new CallXClient("YOUR_API_KEY");
            
            // Send a message
            try
            {
                var message = await callx.Messages.SendAsync(new SendMessageRequest
                {
                    ConversationId = 123,
                    Content = "Hello from the CallX API!",
                    ContentType = "text"
                });
                
                Console.WriteLine($"Message sent: {message.Id}");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error sending message: {ex.Message}");
            }
        }
    }
}

Installation

go get github.com/callx/callx-sdk-go

Example: Send a message

package main

import (
        "fmt"
        "log"

        callx "github.com/callx/callx-sdk-go"
)

func main() {
        // Initialize the client
        client := callx.NewClient("YOUR_API_KEY")

        // Send a message
        message, err := client.Messages.Send(&callx.SendMessageParams{
                ConversationID: 123,
                Content:        "Hello from the CallX API!",
                ContentType:    "text",
        })

        if err != nil {
                log.Fatalf("Error sending message: %v", err)
        }

        fmt.Printf("Message sent: %d\n", message.ID)
}

Installation

gem install callx

Example: Send a message

require 'callx'

# Initialize the client
callx = CallX::Client.new(api_key: 'YOUR_API_KEY')

# Send a message
begin
  message = callx.messages.send(
    conversation_id: 123,
    content: 'Hello from the CallX API!',
    content_type: 'text'
  )
  
  puts "Message sent: #{message.id}"
rescue CallX::Error => e
  puts "Error sending message: #{e.message}"
end

Installation

composer require callx/callx-sdk-php

Example: Send a message

<?php

require_once 'vendor/autoload.php';

use CallX\Client;
use CallX\Exception\ApiException;

// Initialize the client
$callx = new Client('YOUR_API_KEY');

// Send a message
try {
    $message = $callx->messages->send([
        'conversation_id' => 123,
        'content' => 'Hello from the CallX API!',
        'content_type' => 'text'
    ]);
    
    echo "Message sent: {$message->id}\n";
} catch (ApiException $e) {
    echo "Error sending message: {$e->getMessage()}\n";
}

Installation

// CocoaPods
pod 'CallXSDK', '~> 1.0.0'

// Swift Package Manager
dependencies: [
    .package(url: "https://github.com/callx/callx-sdk-swift.git", from: "1.0.0")
]

Example: Send a message

import CallXSDK

// Initialize the client
let callx = CallX(apiKey: "YOUR_API_KEY")

// Send a message
let request = SendMessageRequest(
    conversationId: 123,
    content: "Hello from the CallX API!",
    contentType: "text"
)

callx.messages.send(request) { result in
    switch result {
    case .success(let message):
        print("Message sent: \(message.id)")
    case .failure(let error):
        print("Error sending message: \(error.localizedDescription)")
    }
}

Installation

// Using Gradle
implementation 'com.callx:callx-sdk:1.0.0'

// Using Maven
<dependency>
    <groupId>com.callx</groupId>
    <artifactId>callx-sdk</artifactId>
    <version>1.0.0</version>
</dependency>

Example: Send a message

import com.callx.CallXClient
import com.callx.models.SendMessageRequest
import kotlinx.coroutines.runBlocking

fun main() = runBlocking {
    // Initialize the client
    val callx = CallXClient("YOUR_API_KEY")
    
    // Send a message
    try {
        val message = callx.messages.send(
            SendMessageRequest(
                conversationId = 123,
                content = "Hello from the CallX API!",
                contentType = "text"
            )
        )
        
        println("Message sent: ${message.id}")
    } catch (e: Exception) {
        println("Error sending message: ${e.message}")
    }
}

Installation

# In Cargo.toml
[dependencies]
callx = "1.0.0"

Example: Send a message

use callx::{Client, SendMessageRequest, Error};

#[tokio::main]
async fn main() -> Result<(), Error> {
    // Initialize the client
    let callx = Client::new("YOUR_API_KEY");
    
    // Send a message
    let message = callx.messages()
        .send(SendMessageRequest {
            conversation_id: 123,
            content: "Hello from the CallX API!".to_string(),
            content_type: Some("text".to_string()),
            metadata: None,
        })
        .await?;
    
    println!("Message sent: {}", message.id);
    
    Ok(())
}

Integration Guides

Getting Started
Learn how to set up your CallX API integration and send your first message.
Read guide →
WhatsApp Integration
Learn how to integrate WhatsApp messaging with CallX API.
Read guide →
Telegram Integration
Learn how to integrate Telegram messaging with CallX API.
Read guide →
View All Integration Guides
Explore our comprehensive collection of platform integration guides and tutorials.
Browse all guides →
Messaging Across Platforms
How to send and receive messages through different messaging platforms.
Read guide →
Voice & Video Calls
Integrate voice and video calling capabilities in your application.
Read guide →
Webhooks
Receive real-time updates through CallX webhooks.
Read guide →
Error Handling
How to handle errors and implement robust error recovery.
Read guide →