API Documentation

Integrate virtual numbers into your applications with our powerful REST API

Quick Start

Get up and running with our API in minutes

1. Get Your API Key

# Sign up and get your API key from dashboard
curl -X POST https://api.ttelx.com/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "your-email", "password": "your-password"}'
# Response includes your API key
{
"api_key": "ttelx_live_abc123...",
"user_id": "user_123"
}

2. Make Your First Request

# Get available numbers
curl -X GET https://api.ttelx.com/v1/numbers \
-H "Authorization: Bearer ttelx_live_abc123..." \
-H "Content-Type: application/json"
# Response
{
"numbers": [
{"country": "US", "number": "+1234567890", "price": 9.99}
]
}

API Endpoints

Complete reference for all available endpoints

Authentication

POST /v1/auth/login

Authenticate and get your API key

Request: {"username": "email", "password": "password"}
Response: {"api_key": "ttelx_live_...", "user_id": "user_123"}

Virtual Numbers

GET /v1/numbers

Get available virtual numbers by country

Query params: ?country=US&type=mobile
Response: List of available numbers with pricing
POST /v1/numbers/purchase

Purchase a virtual number

Request: {"number_id": "num_123", "forward_to": "+1234567890"}
Response: {"number": "+1234567890", "status": "active"}
GET /v1/numbers/my

Get your purchased numbers

Response: List of your active numbers with usage stats

SMS Messaging

POST /v1/sms/send

Send SMS message

Request: {"from": "+1234567890", "to": "+0987654321", "message": "Hello!"}
Response: {"message_id": "msg_123", "status": "active"}
GET /v1/sms/inbox

Get received SMS messages

Query params: ?number=+1234567890&limit=50
Response: List of received messages

Webhooks

POST /v1/webhooks

Configure webhook endpoints

Request: {"url": "https://your-app.com/webhook", "events": ["sms.received", "call.answered"]}
Response: {"webhook_id": "wh_123", "status": "active"}

Need Help?

Our developer support team is here to help you integrate successfully