Migration Guide: RingRing Voice API to NAXAI Voice API

This guide walks you through the steps to transition from the legacy RingRing Voice API to the new Naxai Voice API. It highlights key differences, migration steps, and best practices to ensure a smooth upgrade.


Why Migrate?

The Naxai Voice API offers:

  • A modern RESTful interface with improved consistency.
  • Enhanced support for voice workflows, including call chaining, audio playback, and event callbacks.
  • Better integration with other Naxai services (SMS, RCS, Email).
  • Improved documentation and developer experience.

FeatureRingRing Voice APINAXAI Voice API
API StyleREST (legacy)REST (modern, consistent)
AuthenticationAPI key in URLBearer token in the header
Call SetupBasic call triggerStructured call object with makeCall endpoint
TTS PlaybackStandard TTSEnhanced TTS (Neural Voice)
Call EventsLimitedWebhook support for call status, errors, and completion
Error HandlingBasic HTTP codesStructured error responses with codes and messages
IdempotencyNot supportedSupported by adding an idempotency key in the request payload

Migration Steps

  1. Review Your Current Integration
    Identify all endpoints used from the RingRing Voice API.
    Note any audio file hosting dependencies (e.g., .mp3 files) and configure your Assets.
  2. Set Up Naxai Access
    Create an account at Naxai.
    Generate your API token from the dashboard
  3. Update Authentication
    Replace legacy API key usage with Bearer token in the Authorization header.
  4. Replace Endpoints
    Use the makeCall endpoint for initiating calls.
    Structure your payload according to the Voice API reference.
  5. Configure Webhooks
    Set up your webhook URL to receive call status updates and events.
  6. Test Thoroughly
    Use test numbers to validate your integration.
    Monitor logs and webhook responses for accuracy.

Example Migration

Legacy RingRing Call Trigger:


{
  "appId": "EF7491BE-03A7-4350-831E-2B1888D62BBA",
  "phoneNumber": 32499999999,
  "language": "en-US",
  "introTts": "Greetings. We would like to inform you that your car has arrived. You can come and pick it up starting today at 5 PM. Have a nice day."
}

New Naxai Call Trigger:

curl --request POST \
     --url https://api.naxai.com/voice/call \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-version: 2023-03-25' \
     --data '
{
  "to": [
    "32499999999"
    ],
	"from": "3227456789",
  "language": "en-GB",
  "voice": "woman",
  "welcome": {
    "say": "Greetings. We would like to inform you that your car has arrived. You can come and pick it up starting today at 5 PM. Have a nice day."
  }
  
}
'

Tips & Best Practices

  • Use Naxai Assets to host your audio files.
  • Leverage Webhooks to track call outcomes and automate follow-ups.
  • Monitor Usage via the Naxai dashboard for insights and billing.