1. Quickstart
CallerAPI Documentation
  • Quickstart
  • Use cases
    • For carriers (MNOs/MVNOs)
    • CPaaS platforms
    • Cloud communications providers
    • SIP trunking providers
    • PBX/Cloud PBX
    • UCaaS vendors
  • Account
    • Balance and email
      GET
  • Spam protection
    • Voice firewall
      • Get started
      • Quickstart
        • What you get
        • Before you start
        • Test with a recording
        • Connect your switch
        • Switch notes
        • Twilio and Telnyx
        • Send text instead of audio
      • Verdicts
        • Read a verdict
        • What to do with a verdict
        • Block a caller
        • Events and webhooks
      • Honeypot
        • Hand a call over
        • Audio, events, and limits
      • Reference
        • Endpoints
        • Errors
        • Limits and thresholds
        • Production checklist
      • REST
        • What this deployment can do
        • List the verdict categories
        • List the honeypot personas
        • Score a transcript or a recording
        • List your recent sessions
        • Get one session with verdict and intel
        • Twilio voice URL for a screened number
        • Preview the Twilio TwiML
        • Telnyx voice URL for a screened number
        • Twilio voice URL for a honeypot number
        • Telnyx voice URL for a honeypot number
      • WebSocket
        • Live scam filter stream
        • Honeypot stream
    • Daily spam reports
      • Webhook
        • Subscribe to daily reports
        • Unsubscribe from daily reports
        • List webhook subscriptions
        • Manual dispatch of reports
        • Test webhook
      • REST
        • Fetch daily spam reports
    • 15 days spam CSV snapshot
      GET
    • Spam score + HLR
      GET
  • Mobile SDK
    • Get started
    • Quickstart
      • What you get
      • Get your keys
      • Android
      • iOS
      • Flutter
      • React Native
      • Check it works
    • Call screening
      • What each platform can do
      • Android call screening
      • iOS prerequisites
      • iOS add the extension
      • iOS test on device
    • Reference
      • Methods
      • Errors
      • Limits and billing
      • Troubleshooting
  • Data partners
    • Partner tems & docs
    • Upload spam reports
    • Upload contacts
  • Fraud prevention
    • Ported date
    • Porting history
    • Online presence
    • KYC user identity
  • Schemas
    • Spam protection
      • Spam score request
      • Business info
      • Carrier info
      • Complaint (without number)
      • Daily spam reports request
      • Complaint (with phone)
  1. Quickstart

Twilio and Telnyx

Ten minutes. If the call arrives on a Twilio or Telnyx number, you do not open a socket. You point the number's voice URL at CallerAPI. The endpoint returns TwiML or TeXML that forks the caller's audio to the filter and dials the number you name.
Verdicts for these calls go to your webhook only. Both vendors drop the media socket on an unknown message, so the filter cannot send events on the stream. Set webhook.

Twilio#

1.
In the Twilio console, open the number.
2.
Under Voice Configuration, set "A call comes in" to Webhook, method POST.
3.
Set the URL to:
https://api.callerapi.com/api/voice/filter/twiml?key=YOUR_KEY&forward=%2B15551234567&webhook=https://example.com/hook&language=en
4.
Save. Call the number.
ParameterRequiredMeaning
keyyesYour API key.
forwardyesThe E.164 number the call rings, URL-encoded. + is %2B. Without it the endpoint answers 400.
webhookrecommendedHTTPS URL that receives events. The only live channel on Twilio.
languagenoBCP-47 transcription hint.
reportnotrue files the caller when the final level is scam. Default false.
tracksnoboth also transcribes the called party, labelled callee. Transcription cost doubles.
The endpoint returns:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Start>
    <Stream url="wss://api.callerapi.com/api/voice/filter/stream?key=YOUR_KEY" track="inbound_track">
      <Parameter name="from" value="+15559990000"/>
      <Parameter name="to" value="+15551234567"/>
      <Parameter name="webhook" value="https://example.com/hook"/>
      <Parameter name="language" value="en"/>
    </Stream>
  </Start>
  <Dial>+15551234567</Dial>
</Response>
The caller's number rides on the stream as the from parameter. Twilio does not send it in the start frame. If you write your own TwiML, add <Parameter name="from"> with the From value from the Twilio voice webhook. Without it, from is empty and the block action has no caller number.
Endpoint reference: Twilio voice URL for a screened number.

Telnyx#

1.
In the Telnyx portal, create a TeXML Application.
2.
Set its Voice URL to:
https://api.callerapi.com/api/voice/filter/texml?key=YOUR_KEY&forward=%2B15551234567&webhook=https://example.com/hook
3.
Assign a number to the application. Call the number.
The same parameters as Twilio apply. Telnyx sends from and to in the start frame, so they are always present. The stream uses codec="PCMU". PCMA is also accepted.
Endpoint reference: Telnyx voice URL for a screened number.

Both vendors#

The endpoint accepts POST and GET. Open the URL in a browser to check the XML before you save it in the vendor console.
Only the caller's track is streamed unless tracks=both is set.
call_id in every event is the Twilio CallSid or the Telnyx call control id.
The honeypot has the same two endpoints at /honeypot/twiml and /honeypot/texml. See Hand a call over.
Next: Events and webhooks to receive the verdicts.
Modified at 2026-09-18 16:56:49
Previous
Switch notes
Next
Send text instead of audio
Built with