Developer Documentation

Our developer experience centers on clear onboarding, practical examples, and predictable versioning. Build voice AI applications optimized for Africa with our APIs and SDKs.

Quick Start Guide

Get up and running with ODIADEV APIs in minutes. This guide walks you through authentication, your first API call, and integration basics.

Prerequisites

  • An ODIADEV account (free sandbox available)
  • API key from your dashboard
  • Basic understanding of REST APIs and HTTP
  • Optional: Postman or similar API testing tool

1. Get Your API Key

Sign up at dashboard.odia.dev to get your API key. Sandbox keys are free and include rate limits suitable for development.

2. Authenticate

Include your API key in the Authorization header as a Bearer token:

Authorization: Bearer YOUR_API_KEY

3. Make Your First Call

Test your authentication with a simple TTS (Text-to-Speech) request:

curl -X POST https://api.odia.dev/v1/tts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from ODIADEV",
    "voice": "nigerian-female"
  }'

SDK Installation

JavaScript/TypeScript

npm install @odia-dev/sdk

Python

pip install odia-dev

Usage Example (JavaScript)

import { OdiaClient } from '@odia-dev/sdk';

const client = new OdiaClient({
  apiKey: 'YOUR_API_KEY'
});

// Convert text to speech
const audio = await client.tts.synthesize({
  text: 'Hello from Lagos, Nigeria!',
  voice: 'nigerian-female'
});

// Start a voice call
const call = await client.calls.create({
  to: '+2348123456789',
  flowId: 'welcome-flow'
});

Usage Example (Python)

import odia_dev

client = odia_dev.Client(api_key='YOUR_API_KEY')

# Convert text to speech
audio = client.tts.synthesize(
  text='Hello from Lagos, Nigeria!',
  voice='nigerian-female'
)

# Start a voice call
call = client.calls.create(
  to='+2348123456789',
  flow_id='welcome-flow'
)

API Reference

RESTful endpoints with consistent patterns, clear responses, and comprehensive error handling.

POST /v1/auth/token

Purpose: Obtain access token for session-bound operations

Auth: API Key (query parameter)

Returns: Short-lived bearer token with refresh support

POST /v1/calls

Purpose: Initiate outbound call with voice flow

Auth: Bearer token

Payload: destination, voice_flow_id, caller_id, context

GET /v1/calls/{id}

Purpose: Retrieve call status and metadata

Auth: Bearer token

States: queued, ringing, answered, completed, failed

GET /v1/calls/{id}/events

Purpose: Stream real-time call events

Auth: Bearer token

Transport: WebSocket or Server-Sent Events

POST /v1/tts

Purpose: Synthesize speech from text

Auth: Bearer token

Payload: text, voice, sample_rate, format, language

GET /v1/analytics/summary

Purpose: Aggregated usage metrics

Auth: Bearer token

Dimensions: product, date, region, status

Webhooks

Event-driven integrations for real-time updates from your voice AI applications.

call.completed

Payload: call_id, duration, outcome, transcript, recording_url

Retry: Exponential backoff, at-least-once delivery

Security: HMAC signature verification

lead.created

Payload: lead_fields, consent_status, source_call_id, score

Retry: Exponential backoff with dead letter queue

Security: HMAC signature + IP allowlist

escalation.triggered

Payload: context_summary, urgency_level, recommended_action

Retry: Expedited retries with alerting

Security: HMAC signature + dedicated channel

Webhook Security

  • HMAC signatures for payload verification
  • IP allowlisting for sensitive endpoints
  • Retry policies with exponential backoff
  • Dead letter queues for failed deliveries

Webhook Example

POST /your-webhook-endpoint
Content-Type: application/json
X-Odia-Dev-Signature: sha256=abc123...

{
  "event": "call.completed",
  "data": {
    "call_id": "call_abc123",
    "duration": 145,
    "outcome": "converted",
    "transcript": "Customer interested in product...",
    "recording_url": "https://recordings.odia.dev/abc123.mp3"
  },
  "timestamp": "2025-01-15T10:30:00Z"
}

SDKs & Libraries

Official SDKs for popular programming languages with full feature coverage and examples for common use cases.

JavaScript/TypeScript

Package: @odia-dev/sdk

Features:

  • Full API coverage
  • TypeScript definitions
  • Browser and Node.js support
  • Real-time event streaming
  • WebSocket integration
npm install @odia-dev/sdk

Python

Package: odia-dev

Features:

  • Async/await support
  • Data science integrations
  • Batch processing tools
  • Webhook handler utilities
  • Retry and error handling
pip install odia-dev

REST API

Format: OpenAPI 3.0 specification

Features:

  • Language-agnostic
  • OpenAPI documentation
  • Postman collection
  • curl examples
  • Comprehensive error codes
View OpenAPI Spec

Product Integration Guides

End-to-end examples for integrating each of our products into your applications.

Adaqua AI Integration

Complete guide for implementing voice-driven marketing and lead capture.

Quick Start Example
// Create a marketing campaign
const campaign = await client.campaigns.create({
  name: "Product Demo Outreach",
  flow_id: "demo-flow",
  target_list: prospects,
  schedule: "immediate"
});

// Track lead conversion
client.on('lead.created', (lead) => {
  // Send to CRM
  crm.createLead(lead.data);
});
  • Voice flow customization
  • CRM integration patterns
  • Lead scoring and analytics
  • A/B testing voice scripts

CallWaiting.ai Integration

Implement AI receptionist with call routing and calendar integration.

Quick Start Example
// Configure receptionist
const receptionist = await client.receptionist.configure({
  business_hours: "9-17",
  languages: ["english", "pidgin"],
  routing_rules: {
    sales: "+234xxx",
    support: "+234xxx"
  },
  calendar_integration: true
});

// Handle call summaries
client.on('call.completed', (event) => {
  if (event.data.outcome === 'scheduled') {
    // Update CRM with appointment
  }
});
  • Call triage and routing logic
  • Calendar booking integration
  • Business hours management
  • Multi-language support

SerenityCare AI Integration

Mental health support with safety protocols and escalation pathways.

Ethical Guidelines
// Configure safety protocols
const safetyConfig = {
  crisis_keywords: ["suicide", "hurt myself"],
  escalation_hotline: "199",
  emergency_contacts: emergencyList,
  privacy_mode: "strict" // No PHI storage
};

const session = await client.serenity.startSession({
  user_id: anonymizedId,
  consent_level: "basic",
  safety_config: safetyConfig
});
  • Privacy-first configuration
  • Crisis detection protocols
  • Professional escalation paths
  • Cultural sensitivity settings

CrossAI Protect Integration

Emergency response coordination with structured data capture.

Emergency Protocol Example
// Initialize emergency response
const emergency = await client.emergency.configure({
  response_team: "primary-team",
  escalation_timeout: 300, // 5 minutes
  location_services: true,
  data_retention: "emergency-only"
});

// Handle emergency calls
client.on('emergency.triggered', (event) => {
  // Dispatch to emergency services
  dispatcher.createIncident(event.data);
  // Notify response team
  notifyTeam(event.data.location);
});
  • Emergency escalation protocols
  • Location-based routing
  • Multi-agency coordination
  • Incident documentation

Error Handling & Status Codes

Comprehensive error handling with clear codes, messages, and remediation guidance.

HTTP Status Codes

Code Status Description Resolution
200 OK Request successful No action needed
400 Bad Request Invalid request format Check request parameters and format
401 Unauthorized Invalid or missing API key Verify API key in Authorization header
403 Forbidden Insufficient permissions Check account limits and permissions
429 Rate Limited Too many requests Implement exponential backoff
500 Server Error Internal server error Retry with exponential backoff
503 Service Unavailable Temporary service outage Retry with circuit breaker pattern

Error Response Format

{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests. Rate limit: 1000/hour",
    "details": {
      "retry_after": 3600,
      "limit": 1000,
      "window": "1h"
    },
    "request_id": "req_abc123"
  }
}

Rate Limits & Pricing

Transparent rate limits and usage-based pricing for predictable scaling.

Sandbox Environment

  • 1000 API calls per hour
  • 10 concurrent voice calls
  • 100MB TTS generation per hour
  • Basic webhook delivery
  • Email support

Cost: Free for development

Production Environment

  • Custom rate limits by plan
  • Unlimited concurrent calls
  • Unlimited TTS generation
  • Advanced webhook reliability
  • 24/7 phone and email support

Cost: Usage-based, volume discounts available

Developer Support

Get help when you need it with comprehensive documentation, community support, and direct engineering access.

Documentation

  • Interactive API explorer
  • Code examples in multiple languages
  • Video tutorials and walkthroughs
  • Best practices guides
  • Troubleshooting section
Browse Docs

Community

  • Developer Discord server
  • Stack Overflow community
  • GitHub discussions
  • Monthly developer webinars
  • User-contributed examples
Join Community

Direct Support

  • Email: support@odia.dev
  • Priority support for enterprise
  • Engineering office hours
  • Custom integration assistance
  • SLA-backed response times
Contact Support

Ready to Build Something Amazing?

Start building voice AI applications optimized for Africa. Get your API key, explore our documentation, and join the community of developers changing how Africa interacts with AI.

💬