Skip to main content
The G-Tateth Voice & Phone API enables you to make and receive calls, manage call flows, record conversations, and integrate voice capabilities into your applications.

Overview

G-Tateth provides a unified voice and phone service that supports:
  • Phone Calls - Make and receive calls from anywhere in the world
  • WebRTC - Browser-based calling (no phone numbers needed)
  • Call Recording - Automatic recording and transcription
  • IVR Systems - Interactive voice response menus
  • Call Routing - Intelligent call distribution to agents
All API endpoints are documented in the API Reference tab. This guide focuses on concepts, workflows, and integration examples.

Quick Start

1. Configure Phone Service

First, set up your phone service in your dashboard or via the Configure Phone Service endpoint. Configuration Options:
  • phoneNumber - Your dedicated phone number
  • recordingEnabled - Enable automatic call recording
  • transcriptionEnabled - Enable call transcription
  • defaultCountryCode - Default country code for calls
  • webhookUrl - URL for receiving call events
Example Configuration:
Optional Settings:

2. Initiate a Call

Make an outbound call using the Initiate Call endpoint. Required Parameters:
  • customerPhone - Customer phone number in E.164 format (e.g., +2348012345678)
  • agentId - ID of the agent making the call
Optional Parameters:
  • customerId - Existing customer ID (will create if not provided)
  • conversationId - Link call to existing conversation
  • customGreeting - Custom greeting message to play before connecting
  • recordingEnabled - Enable call recording (default: true)
Response: The endpoint returns a callId, conversationId, status, and optionally webRTC configuration if using WebRTC.

3. Handle Incoming Calls

Set up webhooks to receive incoming calls. The Handle Incoming Call endpoint is called automatically by G-Tateth when a call comes in.
You don’t need to call this endpoint directly. It’s a webhook endpoint that G-Tateth calls automatically.
Webhook Payload:

Call Management

Get Call History

Retrieve call history with filtering and pagination using the Get Call History endpoint. Query Parameters:
  • startDate - Start date (ISO 8601 format)
  • endDate - End date (ISO 8601 format)
  • status - Filter by status: completed, missed, failed, answered
  • direction - Filter by direction: inbound, outbound
  • agentId - Filter by agent ID
  • customerId - Filter by customer ID
  • page - Page number (default: 1)
  • limit - Results per page (default: 20)

Update Call Metadata

Add notes, tags, or ratings to calls using the Update Call Metadata endpoint.
callId is the call record id returned by Get Call History, not the provider’s session id. A session id matches no call record, so the request returns 404 and the note is not saved.
Request Body:

Call Recording

Get a secure, time-limited download link for call recordings using the Get Recording Download Link endpoint.

Stream Recording

Stream call recording audio directly using the Stream Recording endpoint. The endpoint supports HTTP range requests, so players can seek, and a HEAD request returns the headers alone including Content-Length. Audio players cannot set request headers, so the access token may also be passed as a token query parameter. A 502 with code UPSTREAM_RECORDING_REFUSED means the stored file could not be read — typically an expired or malformed storage link. Retry the request to get a fresh one; if it persists, the recording needs investigating rather than retrying.

Delete Recording

Permanently delete a call recording using the Delete Recording endpoint.
This action cannot be undone. The recording will be permanently deleted.

IVR (Interactive Voice Response)

Create IVR Menu

Create interactive voice response menus using the Create IVR Menu endpoint. Menu Options Example:

Update IVR Menu

Update existing IVR menus using the Update IVR Menu endpoint.

WebRTC Integration

Get Capability Token

Generate a capability token for WebRTC calls using the Get WebRTC Capability Token endpoint. Request:
Response:

WebRTC Call Flow

  1. Get capability token using the endpoint above
  2. Initialize WebRTC client in your browser/application
  3. Connect to WebRTC server using the token
  4. Make or receive calls through the WebRTC connection
Example JavaScript Implementation:

Call Routing

Queue Status

Get current call queue status and wait times using the Get Queue Status endpoint. Response:

Routing Strategies

Configure call routing in your tenant settings:
  • Round-robin - Distribute calls evenly
  • Least-busy - Route to agent with fewest active calls
  • Random - Random assignment
  • Priority - Route to priority agents first

Webhooks

Receiving Call Events

G-Tateth can send call event webhooks to your application when calls are initiated, answered, completed, or when recordings are available. Configure Your Webhook URL: Set your webhook URL in your phone service configuration:
Webhook Events: G-Tateth will send POST requests to your configured webhook URL with the following events:
  • call.initiated - Call has been initiated
  • call.ringing - Call is ringing
  • call.answered - Call has been answered
  • call.completed - Call has completed
  • call.failed - Call failed
  • call.recording.available - Call recording is available
Webhook Payload Example: When a call completes, G-Tateth will send a POST request to your webhook URL:
Webhook Signature Verification: Each webhook request includes an X-Webhook-Signature header for verification. Always verify signatures to ensure requests are from G-Tateth.

Code Examples

JavaScript/Node.js

Python

cURL

Best Practices

Security

  • Always use HTTPS for webhooks
  • Validate webhook signatures from G-Tateth
  • Store credentials securely
  • Use environment variables for API keys

Performance

  • Implement retry logic for failed calls
  • Use async processing for webhooks
  • Cache capability tokens when possible
  • Monitor call queue status

User Experience

  • Provide clear call greetings
  • Set appropriate timeout values
  • Enable call recording for quality
  • Use IVR menus for complex routing

Troubleshooting

Calls Not Connecting

  1. Verify phone service configuration
  2. Check phone number format (E.164)
  3. Ensure webhook URLs are accessible
  4. Review call logs in your dashboard

Recordings Not Available

  1. Verify recording is enabled
  2. Check recording settings in your dashboard
  3. Wait for processing delay
  4. Check storage permissions

WebRTC Issues

  1. Verify capability token validity
  2. Check browser WebRTC support
  3. Ensure proper firewall configuration
  4. Review network connectivity

Call charges

Outbound calls are charged per second of connected time, at a rate set for your account. At the default rate of ₦0.28 per second: Part-seconds are rounded down and a call that never connects is free. The amount is taken from your balance once the call completes, and appears as cost on the call record, in the currency given by currencyCode. Inbound calls are not charged by default. Both directions can be turned on or off for your account, and cost is left blank for a direction that is not charged.
Charges are based on your own rate, not on what the underlying carrier bills, so the figure on the call record is what you pay.

Support

Need help? Contact us: