Developer Documentation

Everything you need to integrate CPaaS APIs into your applications. Quick start guides, code samples, and comprehensive API reference.

Quick Start Guide

Get started with CPaaS APIs in just a few minutes. Follow these simple steps to send your first message.

1

Sign Up & Get API Key

Create your free account and get instant access to your API credentials. No credit card required for trial.

Sign Up Free
2

Choose Your Integration Method

Use our RESTful API directly or install an SDK for your preferred programming language.

PHP Node.js Python Java .NET Ruby
3

Send Your First Message

Use our simple API to send your first message in under 5 minutes with just a few lines of code.

Code Examples

See how easy it is to integrate CPaaS into your application with these code examples.

Send SMS Example

curl -X POST https://api.cpaas.io/v1/sms/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "message": "Hello from CPaaS!",
    "sender_id": "CPaaS"
  }'
<?php
require 'vendor/autoload.php';

use CPaaS\Client;

$client = new Client('YOUR_API_KEY');

$response = $client->sms->send([
    'to' => '+1234567890',
    'message' => 'Hello from CPaaS!',
    'sender_id' => 'CPaaS'
]);

echo "Message sent with ID: " . $response['message_id'];
?>
const CPaaS = require('@cpaas/node-sdk');

const client = new CPaaS.Client('YOUR_API_KEY');

client.sms.send({
  to: '+1234567890',
  message: 'Hello from CPaaS!',
  sender_id: 'CPaaS'
})
.then(response => {
  console.log('Message sent:', response.message_id);
})
.catch(error => {
  console.error('Error:', error);
});
from cpaas import Client

client = Client('YOUR_API_KEY')

response = client.sms.send(
    to='+1234567890',
    message='Hello from CPaaS!',
    sender_id='CPaaS'
)

print(f'Message sent with ID: {response.message_id}')
import io.cpaas.Client;
import io.cpaas.models.SMS;

public class SendSMS {
    public static void main(String[] args) {
        Client client = new Client("YOUR_API_KEY");
        
        SMS sms = new SMS.Builder()
            .to("+1234567890")
            .message("Hello from CPaaS!")
            .senderId("CPaaS")
            .build();
        
        Response response = client.sms().send(sms);
        System.out.println("Message ID: " + response.getMessageId());
    }
}

Send WhatsApp Message

curl -X POST https://api.cpaas.io/v1/whatsapp/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "type": "template",
    "template": {
      "name": "welcome_message",
      "language": "en",
      "components": []
    }
  }'
<?php
$client = new CPaaS\Client('YOUR_API_KEY');

$response = $client->whatsapp->send([
    'to' => '+1234567890',
    'type' => 'template',
    'template' => [
        'name' => 'welcome_message',
        'language' => 'en'
    ]
]);
?>
client.whatsapp.send({
  to: '+1234567890',
  type: 'template',
  template: {
    name: 'welcome_message',
    language: 'en'
  }
}).then(response => {
  console.log('WhatsApp message sent:', response);
});
response = client.whatsapp.send(
    to='+1234567890',
    type='template',
    template={
        'name': 'welcome_message',
        'language': 'en'
    }
)

API Reference

Complete reference for all CPaaS API endpoints with request/response examples.

POST /v1/sms/send

Send a single SMS message

Parameters

to string Required Recipient phone number in E.164 format
message string Required Message content (max 1600 chars)
sender_id string Optional Custom sender ID or phone number
POST /v1/voice/call

Make a voice call

Parameters

to string Required Recipient phone number
from string Required Your CPaaS phone number
url string Optional TwiML URL for call instructions
POST /v1/email/send

Send an email

Parameters

to string Required Recipient email address
subject string Required Email subject line
html string Required HTML email body

Official SDKs & Libraries

Speed up your integration with our official SDKs for popular programming languages.

PHP SDK

Composer package for PHP applications

composer require cpaas/php-sdk Documentation

Node.js SDK

NPM package for Node.js applications

npm install @cpaas/node-sdk Documentation

Python SDK

PyPI package for Python applications

pip install cpaas Documentation

Java SDK

Maven package for Java applications

<artifactId>cpaas-java</artifactId> Documentation

.NET SDK

NuGet package for .NET applications

Install-Package CPaaS.SDK Documentation

Ruby SDK

Gem for Ruby applications

gem install cpaas Documentation

Additional Resources

API Documentation

Complete API reference with all endpoints and parameters

View Docs →

Video Tutorials

Step-by-step video guides for common integrations

Watch Videos →

Developer Forum

Get help from our community and support team

Visit Forum →

API Playground

Test API endpoints directly in your browser

Try It Out →

GitHub Repository

Sample applications and code snippets

View on GitHub →

Postman Collection

Import our API collection into Postman

Download →

Ready to Start Building?

Get your API key and start integrating CPaaS into your application today.