Numbers
A protected number is one of yours that we score calls on. It is created the first time a call arrives on it, or here, on purpose, with its settings.
List numbers
Every protected number, oldest first, with the last hour on each and where it stands against its own usual volume.
Response
- e164 / labelstring / string | null
- settingsobject
ceiling_min,protection,scope,spend_ceiling_usd, whichever have been set.- gate_tokenstring
- The credential in the gate URLs for this number.
- gate_mode / gate_provider / gate_destinationstring
- See the gate.
gate_engaged_untilis set while an adaptive gate is challenging everyone. - watch_outboundboolean
- Whether calls placed from this number are scored too.
- connection_id / source_provider / source_labelstring | null
- The platform connection it was imported from, if any.
- client_id / client_namestring | null
- Who the number is protected on behalf of, when you have clients.
- calls_last_hour / outbound_last_hour / open_callsinteger
- spend_7dnumber
- USD, on calls that carried a cost.
- volumeobject
status(learning,normal,above,beloworspike) withcallsin the window, theexpectedcount, and how manyhistory_daysthe baseline has.
Add or update a number
Protects a number, or changes the settings on one already protected; the same call does both, and only the fields you send change. A new number pulls its last thirty days from every platform connection in the background, so it starts with a memory.
Request body
- numberstringrequired
- E.164.
- labelstring
- For your own eyes.
- protection"relaxed" | "standard" | "strict" | null
- A level for this number alone;
nullputs it back on the account's. See protection. - ceiling_mininteger, 1–600
- How long a call on this number may run before a call.long_running alert.
- spend_ceiling_usdnumber, 1–100000 | null
- Spend in one hour on this number past which a
number.spend_exceededalert fires.nullclears it; the alert then waits for a week of cost history and derives its own. - watch_outboundbooleandefault false
- Score calls placed from this number as well as calls to it.
- gate_mode"off" | "adaptive" | "always"default "off"
- Anything but
offneeds Guard. - gate_provider"twilio" | "telnyx" | "signalwire" | "vonage"default "twilio"
- Which carrier's dialect the gate speaks. Set for you when the number came from a carrier connection.
- gate_destinationstring
- Where the call goes after the gate: a URL, a phone number, or a
sip:address. Vonage cannot take a URL. - connectionstring
- The id of the platform connection the number belongs to.
- clientstring | null
- The id of the client this number is protected for;
nullto clear. - scopestring
- A note on what the number is for, up to 120 characters.
Response
- …object
- The number, as in the list, without the counts.
- backfillingboolean
- true when the number is new and its history is being pulled.
Errors
- invalid_number400
- Not E.164.
- number_limit402
- Your plan's cap, with the limit in the body.
- number_taken409
- Another account already protects it.
- plan_required402
- A gate mode other than
offon Watch. - invalid_gate_destination400
- Not a URL, a phone number, or a sip: address.
- vonage_needs_phone_or_sip400
- A URL destination with the Vonage gate.
- invalid_ceiling / invalid_spend_ceiling / invalid_protection / invalid_gate_mode / invalid_gate_provider400
- A value outside its set.
- unknown_connection / unknown_client400
- An id that is not yours.
Remove a number
Stops protecting it. The calls already recorded on it stay in your log; a new call on it would add it back, unless you send register: false.
Path parameters
- numberstringrequired
- E.164, plus encoded:
%2B14155550100.
Response
- removedboolean
Volume on a number
Where one number stands against its own history: this hour against what this hour usually brings, this week against last, who is calling, when it is usually busy, the spikes it has had, and what it is costing. The number's page in the dashboard is drawn from this.
Path parameters
- numberstringrequired
- E.164, plus encoded.
Response
- ready / history_days / min_history_daysboolean / integer / integer
- Whether the baseline has enough history to mean anything: fourteen days of the number's own calls.
- nowobject
callsand distinctcallersin the lastwindow_minminutes, and theexpectedcount for this hour of this kind of day.- spikeobject | null
- An open spike:
since,peak,callers,expected. - weekobject
callsandminutesthis week and_prevfor last;flagged; distinctcallersand how many werenew_callers; thebusiesthour.- heatmapobject[]
- Mean calls per hour by day of week:
dow,hour,mean. - spikesobject[]
- Past spikes, each with since, until, peak, expected, callers.
- seriesobject[]
- Hourly points for the last seven days, each with the calls in that hour and the baseline expected for it.
- momentumobject
- How fast volume is moving right now, against the expected rate, with a short series behind it.
- spendobject
hourin USD andhour_calls; theusualfor this hour once there is history; theceilingin force and whether youceiling_setit;weekandweek_prev; thecostliestcall.
Errors
- invalid_number400
- Not E.164.
409 number_taken. Write to support with proof it is yours and we move it.