.do
ApiCommunication

VapiPhoneNumber

A phone number configured for use with Vapi voice assistants for inbound and outbound calling.

VapiPhoneNumber

A phone number configured for use with Vapi voice assistants for inbound and outbound calling.

Properties

  • id (string): Unique identifier for the phone number.
  • phoneNumber (string): E.164 formatted phone number (+1234567890).
  • business ([[Business]]): The business that owns this phone number.
  • assistant ([[VapiAssistant]]): Default assistant for calls to this number.
  • name (string): Friendly name for the phone number.
  • description (string): Description of phone number purpose.
  • status (string): Status (active, inactive, suspended, cancelled).
  • type (string): Number type (local, toll-free, mobile, international).
  • provider (string): Telephony provider (twilio, vonage, bandwidth, vapi).
  • country (string): Country code (US, GB, CA, etc.).
  • region (string): State or region code.
  • city (string): City name.
  • areaCode (string): Area code.
  • capabilities (object): Supported capabilities (voice, sms, mms, fax).
  • direction (string): Supported direction (inbound, outbound, both).
  • purchaseDate (number): When number was purchased (Unix timestamp).
  • activationDate (number): When number was activated (Unix timestamp).
  • monthlyFee (number): Monthly fee in cents.
  • perMinuteCost (number): Cost per minute in cents.
  • setupFee (number): One-time setup fee in cents.
  • inboundSettings (object): Configuration for inbound calls.
  • outboundSettings (object): Configuration for outbound calls.
  • voicemailEnabled (boolean): Whether voicemail is enabled.
  • voicemailUrl ([[URL]]): URL for voicemail webhook.
  • recordingEnabled (boolean): Whether call recording is enabled.
  • transcriptionEnabled (boolean): Whether transcription is enabled.
  • callerIdName (string): Caller ID name for outbound calls.
  • forwardingEnabled (boolean): Whether call forwarding is enabled.
  • forwardingNumber (string): Number to forward calls to.
  • businessHours (object): Business hours configuration.
  • afterHoursAction (string): Action for after-hours calls (voicemail, forward, reject).
  • afterHoursMessage (string): Message for after-hours callers.
  • blockedNumbers (string[]): Numbers blocked from calling.
  • allowedNumbers (string[]): Allowed numbers (if whitelist mode enabled).
  • spamFilter (boolean): Whether spam filtering is enabled.
  • maxConcurrentCalls (number): Maximum concurrent calls allowed.
  • callRoutingRules (object[]): Rules for routing calls to different assistants.
  • webhookUrl ([[URL]]): Webhook URL for call events.
  • webhookSecret (string): Secret for validating webhooks.
  • totalCalls (number): Total number of calls on this number.
  • inboundCalls (number): Total inbound calls.
  • outboundCalls (number): Total outbound calls.
  • averageCallDuration (number): Average call duration in seconds.
  • totalMinutes (number): Total minutes used.
  • monthlyCost (number): Current month cost in cents.
  • tags (string[]): Tags for organization.
  • metadata (object): Custom key-value pairs for additional data.
  • created (number): Timestamp when number was added (Unix timestamp).
  • updated (number): Timestamp of last update (Unix timestamp).

Actions

create

Purchase or add a phone number.

Input: [[PhoneNumberRequest]]
Output: [[VapiPhoneNumber]]

update

Modify phone number configuration.

Input: [[VapiPhoneNumber]]
Output: [[VapiPhoneNumber]]

delete

Release the phone number.

Input: [[VapiPhoneNumber]]
Output: [[VapiPhoneNumber]]

assignAssistant

Assign an assistant to this number.

Input: [[VapiAssistant]]
Output: [[VapiPhoneNumber]]

addRoutingRule

Add call routing rule.

Input: [[RoutingRule]]
Output: [[VapiPhoneNumber]]

removeRoutingRule

Remove routing rule.

Input: [[RoutingRule]]
Output: [[VapiPhoneNumber]]

blockNumber

Block a phone number from calling.

Input: [[PhoneNumber]]
Output: [[VapiPhoneNumber]]

unblockNumber

Unblock a phone number.

Input: [[PhoneNumber]]
Output: [[VapiPhoneNumber]]

testCall

Make a test call to verify configuration.

Input: [[TestCallRequest]]
Output: [[Call]]

analyzeUsage

Analyze call patterns and usage.

Input: [[AnalysisRequest]]
Output: [[PhoneAnalytics]]

exportCalls

Export call history.

Input: [[ExportRequest]]
Output: [[URL]]

updateBusinessHours

Update business hours configuration.

Input: [[BusinessHours]]
Output: [[VapiPhoneNumber]]

Events

  • created: Triggered when phone number is created.
  • updated: Triggered when configuration is modified.
  • deleted: Triggered when number is released.
  • activated: Triggered when number is activated.
  • deactivated: Triggered when number is deactivated.
  • Call.inbound: Triggered when inbound call is received.
  • Call.outbound: Triggered when outbound call is initiated.
  • Call.missed: Triggered when call is missed.
  • Voicemail.received: Triggered when voicemail is received.
  • Number.blocked: Triggered when number is blocked.
  • Spam.detected: Triggered when spam call is detected.
  • Threshold.exceeded: Triggered when usage thresholds are exceeded.