1. REST
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
  • 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
          GET
        • List the verdict categories
          GET
        • List the honeypot personas
          GET
        • Score a transcript or a recording
          POST
        • List your recent sessions
          GET
        • Get one session with verdict and intel
          GET
        • Twilio voice URL for a screened number
          POST
        • Preview the Twilio TwiML
          GET
        • Telnyx voice URL for a screened number
          POST
        • Twilio voice URL for a honeypot number
          POST
        • Telnyx voice URL for a honeypot number
          POST
      • 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. REST

Twilio voice URL for a screened number

POST
/api/voice/filter/twiml
Set this URL as the voice URL of a Twilio number. It returns TwiML that forks the caller's audio to the filter socket and dials forward. Twilio posts From, To, and CallSid as form fields. The endpoint copies From and To onto the stream. Events go to webhook only. GET is accepted as well so the URL can be checked in a browser.

Request

Authorization
API Key
Add parameter in header
x-auth
Example:
x-auth: ********************
or
Query Params

Body Params application/x-www-form-urlencoded

Responses

🟢200TwiML or TeXML that forks the caller's audio to the filter a
application/xml
TwiML or TeXML that forks the caller's audio to the filter and dials forward.
Bodyapplication/xml

🟠400Bad input
🟠401Missing or wrong API key
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.callerapi.com/api/voice/filter/twiml?forward=+15551234567&webhook=https%3A%2F%2Fexample.com%2Fcallerapi-voice&language=en&report=false&tracks=undefined' \
--header 'x-auth: <api-key>' \
--data-urlencode 'From=' \
--data-urlencode 'To=' \
--data-urlencode 'CallSid='
Response Response Example
200 - TwiML or TeXML that forks the caller's audio to the filter a
<?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"/></Stream></Start><Dial>+15551234567</Dial></Response>
Modified at 2026-09-18 16:51:51
Previous
Get one session with verdict and intel
Next
Preview the Twilio TwiML
Built with