Ellipse Gradient for Header

Vapi Integration Guide

Integrate Vapi voice assistants with enterprise applications through REST APIs, server events, and real-time tool endpoints.

Vapi integration options at a glance

Vapi provides REST APIs for managing Assistants, Calls, Phone Numbers, Tools, Squads, and related configurations. It also supports server URLs and webhook-style events for call status changes, transcripts, end-of-call reports, and tool requests, although event coverage varies by use case. Vapi private API keys authenticate server-side requests, while public keys support selected client-side operations. File and knowledge-base capabilities are available in selected configurations, with current limits and formats requiring confirmation. Martini can consume the REST API, receive validated Vapi events, expose tool endpoints, and orchestrate transformations, business rules, retries, and downstream updates.

Integration pointSupported by Vapi?Common use casesHow Martini supports it
REST APIsYesManage Assistants, Calls, Phone Numbers, Tools, Squads, and related configurations; retrieve call status and transcripts where available.Martini can consume Vapi REST endpoints from workflows, transform payloads, expose internal abstractions, and apply business rules.
Webhooks and server eventsYesReceive call status changes, transcript updates, end-of-call reports, tool requests, assistant requests, speech updates, and transfer-related events.Martini can expose a REST API or webhook workflow, validate requests, normalize event payloads, deduplicate deliveries, and route events.
Tool and function callsYesAllow Assistants to request account lookups, appointment availability, order status, customer verification, or ticket operations during a conversation.Martini can expose controlled REST endpoints, validate arguments, call enterprise systems, and return the response structure expected by Vapi.
AuthenticationYesServer-side API access uses private API keys as bearer tokens; public keys support selected client-side SDK operations.Martini can store private keys as secrets and add bearer authorization to outbound requests while keeping credentials out of workflows and logs.
File and knowledge-base contentLimitedUse selected file-oriented or URL-based content in Knowledge Bases and assistant configurations where supported by the current Vapi version.Martini can coordinate ingestion from an enterprise repository and submit or reference content where supported, while retaining the authoritative copy elsewhere.
SDKsYesEmbed voice interactions and start or control selected client-side calls from applications using Vapi client integration options.Martini is generally better suited to server-side REST and event orchestration; it can provide APIs that client applications call around the SDK flow.
Bulk and batch APIsNot confirmedA general-purpose bulk API for mass call processing was not confirmed; Vapi is primarily oriented toward individual, real-time voice interactions.Martini can schedule or queue individual operations with throttling, idempotency, and retry policies when batch processing is required.
Database accessNoDirect SQL database access from Vapi was not confirmed.Martini can use SQL workflows or controlled intermediary APIs behind Vapi Tools rather than exposing a database directly.

How Vapi exposes data and business events

Vapi REST APIs

Vapi's HTTP API manages Assistants, Calls, Phone Numbers, Tools, Squads, and related configuration. It is the primary mechanism for server-side administration and resource retrieval.

Martini implementation pattern

Martini stores the Vapi private API key as a secret, invokes the required endpoint from a workflow, handles pagination and response validation, maps Vapi objects into canonical models, and writes results to enterprise systems or exposes a controlled internal API.

Implementation sequence

Store the Vapi private API key in Martini secrets
Build the workflow or API operation for the required Vapi resource
Invoke the Vapi REST endpoint with bearer authentication
Handle pagination and validate the response
Map Vapi fields to the target model
Apply business rules and persist the result

Vapi server events and webhooks

Vapi can send server events for selected call and assistant activity, including status changes, transcript updates, end-of-call reports, and tool-related requests. Event coverage depends on the configured event type.

Martini implementation pattern

Martini exposes a REST endpoint or webhook workflow for Vapi, validates the configured security mechanism, identifies the event and call, performs duplicate detection, and routes real-time or post-call processing to the appropriate workflow.

Implementation sequence

Expose a Martini endpoint for the configured Vapi server URL
Validate authentication and the event payload
Identify the event type and stable call or event identifier
Reject or quarantine malformed and unknown payloads safely
Persist the processing key before irreversible actions
Map the event to downstream systems and record the outcome

Vapi tool and function calls

Vapi Assistants can invoke external Tools or produce function-call requests for operations such as account lookup, appointment availability, order status, and ticket creation.

Martini implementation pattern

Martini exposes a purpose-built REST endpoint, validates the requested function and arguments, checks authorization and business rules, calls the authoritative enterprise system, and returns a concise response suitable for the active conversation.

Implementation sequence

Expose a Martini REST endpoint for the Vapi Tool
Validate the function name, arguments, caller context, and authorization
Call the authoritative enterprise API or database workflow
Apply business rules and limit the response size
Transform the result into the Vapi tool response structure
Return a controlled failure message when the operation cannot complete

Knowledge-base content

Vapi supports knowledge-base and file-oriented assistant configurations in selected workflows. Supported file types, upload mechanisms, indexing behavior, and limits vary by product version.

Martini implementation pattern

Martini can retrieve approved content from an enterprise repository, transform metadata, submit or reference content where Vapi supports it, and retain the source repository as the authoritative location.

Implementation sequence

Retrieve approved source content from the enterprise repository
Validate file type, size, ownership, and retention policy
Transform metadata and content for the supported Vapi configuration
Submit or reference the content through the Vapi API
Record the Vapi Knowledge Base association and source identifier
Monitor indexing or configuration results

Common Vapi integration patterns

Pattern 1: Enrich Vapi calls with CRM context

When to use this pattern

Use this pattern when an Assistant needs permitted customer context during a call or when post-call outcomes must be recorded against a customer. The workflow should verify identity and return only the fields needed by the conversation.

Integration direction
Salesforce
Martini
Vapi
Example Mapping
Vapi FieldCanonical FieldTarget Field
Contact.IdcustomerIdcustomer.id
Contact.PhonephoneNumbercaller.phone
Contact.Account.NameaccountNamecustomer.accountName
Call summaryconversationSummaryActivity.description
Martini implementation pattern

A Vapi Tool request reaches Martini with a phone number or customer identifier. Martini validates the request, queries Salesforce, applies access rules, returns normalized context to Vapi, and later processes the end-of-call event to create or update the activity. Duplicate checks and controlled failure responses protect the caller experience.

Martini capabilities used
  • REST API consumption
  • REST API exposure
  • workflows
  • data mapping
  • business rules
  • error handling

Pattern 2: Synchronize post-call outcomes

When to use this pattern

Use this pattern to turn Vapi end-of-call reports and transcript updates into service, sales, or operational records. It separates latency-sensitive voice interactions from downstream processing.

Integration direction
Vapi
Martini
Zendesk
Example Mapping
Vapi FieldCanonical FieldTarget Field
call.idconversationIdticket.externalId
transcriptconversationTranscriptticket.internalNote
endedReasondispositionticket.customDisposition
customer.phoneNumbercallerPhoneticket.requesterPhone
Martini implementation pattern

Martini receives the Vapi event, validates and deduplicates it, retrieves additional Call details if needed, maps the summary and transcript, and creates or updates a Zendesk Ticket. Retries use stable identifiers so a repeated event does not create another ticket.

Martini capabilities used
  • webhook consumption
  • event routing
  • data mapping
  • idempotency
  • API consumption
  • retry handling

Pattern 3: Provide real-time business tools

When to use this pattern

Use this pattern when a live conversation requires authoritative information such as order status, appointment availability, account balance, or case status. The synchronous workflow must remain focused enough for a voice interaction.

Integration direction
Vapi
Martini
ServiceNow
Example Mapping
Vapi FieldCanonical FieldTarget Field
toolCall.function.arguments.caseNumbercaseReferenceServiceNow.number
toolCall.function.arguments.callerIdauthenticatedCallerServiceNow.caller
incident.statecaseStatustoolResponse.status
incident.short_descriptioncaseSummarytoolResponse.summary
Martini implementation pattern

Vapi invokes a Martini endpoint for a named Tool. Martini validates the function and arguments, confirms caller authorization, calls ServiceNow, applies response-size and disclosure rules, and returns a concise result. Technical errors are logged while the caller receives a safe retry or escalation response.

Martini capabilities used
  • REST API exposure
  • REST API consumption
  • validation
  • business rules
  • response transformation
  • error handling

Pattern 4: Route inbound calls to specialized Assistants

When to use this pattern

Use this pattern when inbound calls must be routed using caller identity, language, service eligibility, or operational rules. Vapi handles the voice interaction while Martini provides controlled routing support and records the decision.

Integration direction
Vapi
Martini
HubSpot
Example Mapping
Vapi FieldCanonical FieldTarget Field
caller.phoneNumbercallerPhoneContact.phone
Contact.lifecycleStagecustomerSegmentrouting.segment
languagepreferredLanguagerouting.language
selectedAssistantroutingDecisionconversation.assistant
Martini implementation pattern

A Vapi request reaches Martini with caller information. Martini looks up the relevant HubSpot Contact or Company, applies eligibility and routing rules, returns the selected Assistant or route data, and records the decision. Unavailable lookups fall back to a safe default route without exposing internal errors.

Martini capabilities used
  • REST API exposure
  • API consumption
  • data mapping
  • conditional routing
  • workflows
  • monitoring

Applications commonly integrated with Vapi

Vapi commonly acts as a voice interaction layer over enterprise applications. Martini can mediate these integrations, apply authorization and business rules, and separate real-time conversation operations from post-call processing.

Application Scenario Direction Martini Pattern
Salesforce Retrieve customer context during a call and create or update Leads, Contacts, Cases, Opportunities, or call activities after the conversation. Salesforce → Martini → Vapi Martini consumes Salesforce data for a Vapi tool response and receives Vapi end-of-call events to map transcripts, summaries, and dispositions back to Salesforce.
HubSpot Look up Contacts and Companies, personalize conversations, and capture call summaries or engagement records. HubSpot → Martini → Vapi A Martini workflow validates the caller context, retrieves HubSpot data through its API, returns only permitted fields to Vapi, and processes post-call updates asynchronously.
Zendesk Create or update Tickets from support calls and associate call summaries or transcripts with customer service activity. Vapi → Martini → Zendesk Martini receives an end-of-call event, applies duplicate detection and field mapping, then invokes Zendesk APIs with retry and error handling.
ServiceNow Create Incidents or Cases from voice interactions and retrieve existing ticket status during a conversation. Vapi → Martini → ServiceNow Vapi calls a Martini endpoint for controlled ticket lookups or updates; Martini validates arguments, applies authorization rules, and invokes ServiceNow APIs.
Twilio Coordinate telephony infrastructure or Phone Number configuration alongside Vapi deployments where the current Vapi setup supports it. Twilio → Vapi → Martini Martini can orchestrate configuration-related API calls and normalize relevant events, while Vapi remains the voice assistant and conversation layer.
Slack Notify operations teams about escalations, failed calls, or high-priority interactions. Vapi → Martini → Slack Martini processes selected Vapi events, applies severity and routing rules, and posts structured notifications to Slack with safe redaction.
Google Calendar Check availability and create or update appointments through a Vapi tool during a conversation. Vapi → Martini → Google Calendar A synchronous Martini workflow validates time zone and appointment inputs, queries Google Calendar, and returns concise availability or confirmation data to Vapi.
Shopify Retrieve order status, customer details, or fulfillment information during commerce support calls. Vapi → Martini → Shopify Vapi invokes a Martini tool endpoint; Martini validates customer authorization, queries Shopify, limits the response, and returns a voice-friendly result.

How to build a Vapi integration in Martini

Objective

Establish server-side access to Vapi without exposing private credentials to client applications or workflow logs.

Instructions in Martini

  • Store the Vapi private API key in Martini Secrets Management
  • Configure bearer authentication for outbound Vapi REST requests
  • Use separate credentials and configuration for development, staging, and production
  • Validate the security mechanism configured for incoming Vapi events

Objective

Select the trigger that matches the business process: an inbound Vapi event, a Vapi Tool request, a scheduled synchronization, or an internal API call.

Instructions in Martini

  • Use a REST endpoint or webhook workflow for Vapi server events
  • Expose a focused REST API for Tool and function calls
  • Use a scheduler for controlled resource synchronization
  • Use a workflow trigger for internal application events

Objective

Obtain the required Assistant, Call, Phone Number, Tool, Squad, or Knowledge Base data from the appropriate Vapi mechanism.

Instructions in Martini

  • Receive the configured Vapi event payload
  • Invoke the Vapi REST API when the event contains only a reference
  • Follow endpoint-specific pagination fields
  • Preserve the Vapi call, event, or tool identifier

Objective

Coordinate Vapi processing with enterprise APIs, databases, files, or messaging systems while separating real-time work from post-call operations.

Instructions in Martini

  • Route events by type and business process
  • Keep synchronous Tool operations focused and low latency
  • Queue or schedule noncritical transcript and reporting work where appropriate
  • Apply explicit state-transition rules for asynchronous events

Objective

Convert Vapi payloads into canonical enterprise models and transform downstream responses into structures suitable for Vapi.

Instructions in Martini

  • Map only the fields required by the business process
  • Normalize timestamps, time zones, identifiers, and phone numbers
  • Transform transcripts and summaries according to retention policy
  • Return concise, voice-friendly Tool responses

Objective

Protect customer data and ensure that every requested operation is authorized and appropriate for the caller and target system.

Instructions in Martini

  • Validate Tool names, required arguments, data types, and allowed values
  • Check caller identity, account ownership, and operation permissions
  • Apply routing, disclosure, escalation, and response-size rules
  • Quarantine unknown event types for review

Common Vapi data objects used in integrations

ObjectTypical UseCommon target systemsMartini handling
AssistantsDefine the voice agent's model, instructions, voice, transcriber, tools, and behavior.Configuration repositories, CRM platforms, deployment systemsMartini can retrieve, create, or update Assistant configurations through REST workflows and apply environment-specific mappings.
CallsRepresent individual voice or conversation sessions, including status, timing, transcript, recording details, and costs.Salesforce, Zendesk, ServiceNow, databases, analytics platformsMartini can receive call events, retrieve current call details, deduplicate by call ID, and persist selected metadata or summaries.
Phone NumbersRepresent numbers assigned to Vapi and associated with Assistants or inbound-call handling.Telephony platforms, configuration systems, operational inventoriesMartini can synchronize configuration data through REST APIs and apply routing or environment rules.
ToolsDefine external functions or operations that an Assistant can invoke during a conversation.CRM, scheduling, commerce, order-management, and service applicationsMartini can expose tool endpoints, validate arguments, call authoritative systems, and return constrained results to Vapi.
SquadsGroup Assistants that transfer or route conversations between specialized agents.Routing services, contact-center operations, configuration repositoriesMartini can manage or synchronize Squad configuration and record routing decisions from relevant events.
Knowledge BasesProvide knowledge sources used by Assistants, including supported file or URL-based content where configured.Content repositories, file stores, enterprise knowledge platformsMartini can coordinate source content ingestion and retain source-system ownership while sending supported content to Vapi.

Authentication and security considerations

Bearer-token authentication

Vapi server-side API requests use private API keys as bearer tokens. Martini can store the key in Secrets Management and add it to outbound REST requests without hard-coding it in workflows.

Key separation

Vapi public keys support selected client-side operations, while private keys are intended for server-side and administrative access. Private keys should not be exposed in browser code or logs.

Webhook validation

Incoming Vapi events should be authenticated or validated using the security options configured for the project. Martini workflows should reject malformed or unexpected payloads and record safe diagnostic information.

Data protection

Calls, transcripts, and recordings may contain sensitive information. Apply least privilege, data minimization, retention controls, redaction, encryption, and regional processing policies appropriate to the use case.

Operational considerations for Vapi integrations

Latency

Tool calls run during an active conversation. Keep synchronous workflows focused and avoid slow downstream operations that could cause timeouts or degrade the caller experience.

Events and idempotency

Vapi events may arrive asynchronously, rapidly, more than once, or out of order. Persist a stable event or Call identifier and apply state-transition rules before creating downstream records.

Pagination and rate limits

List endpoints may be paginated, and current Vapi rate limits should be confirmed for each account and endpoint. Scheduled workflows should use throttling, exponential backoff, and appropriate retries.

Schema changes

Assistant, Call, Tool, and server-event payloads can evolve. Map required fields, preserve useful unknown fields for diagnostics, and test against representative event variants.

Scheduling and sensitive content

Normalize time zones for appointment workflows and validate daylight-saving transitions. Define retention and access policies before storing transcripts or recordings.

Why use Martini instead of scripts or point-to-point integrations?

Centralized orchestration

Martini separates Vapi voice interactions from CRM, service, scheduling, commerce, database, and messaging operations in maintainable workflows.

Reusable APIs and workflows

Instead of duplicating integration logic in individual Tools or scripts, Martini can expose reusable APIs, apply shared validation, and provide a controlled façade over downstream systems.

Reliable processing

Martini provides a place to implement mapping, business rules, idempotency, retries, error handling, logging, and asynchronous post-call processing.

Developer control

Martini combines a low-code workflow experience with the flexibility to use custom logic when Vapi payloads or enterprise requirements need more than point-to-point configuration.

Frequently asked questions

How can Vapi be integrated with enterprise systems?

Vapi can be integrated through its REST API, server URLs and webhook-style events, Tool or function-call endpoints, and selected knowledge-base or file capabilities. Enterprise workflows can manage Assistants and Calls, receive transcripts and end-of-call reports, and provide real-time business data to voice conversations.

Can Martini integrate with Vapi?

Yes. Martini can consume the Vapi REST API, receive Vapi server events through an exposed REST endpoint, and expose REST APIs for Vapi Tools or function calls. Martini can also map data, apply business rules, orchestrate enterprise APIs, and handle retries and duplicate delivery.

Do I need a connector to integrate Vapi with Martini?

No. A dedicated Vapi connector is not required. Martini can use Vapi's native REST APIs, server events, Tool endpoints, and bearer-token authentication through standards-based workflows and APIs.

Is there any extra Lonti cost to integrate Vapi with Martini?

Lonti does not charge an additional per-connector or per-vendor fee to integrate Vapi. The integration is subject to the provisioned capacity of the Martini environment. Separate costs may apply from Vapi, infrastructure, telephony providers, or other third-party systems based on their subscriptions, usage, and deployment models.

Which Vapi integration methods should architects use?

Use the Vapi REST API for server-side resource management and retrieval, server events for call and assistant activity, and Tool endpoints for real-time business operations. Vapi GraphQL and SOAP APIs were not confirmed, and a general-purpose bulk API was not confirmed.

Can Martini receive Vapi events and provide real-time Tools?

Yes. Martini can expose REST endpoints for Vapi server events and Tool requests. Events should be authenticated or validated according to the Vapi project configuration, while Tool requests should validate arguments, authorization, downstream availability, and response size before returning a result.

How should Vapi synchronization and duplicate events be handled?

Use Vapi Call IDs, event identifiers, Tool-call IDs, or stable business keys to make processing idempotent. Persist the processing key before irreversible operations, account for asynchronous or out-of-order events, and use endpoint-specific pagination when retrieving collections.

How does Martini handle Vapi data mapping, errors, and API exposure?

Martini workflows can map Assistant, Call, Tool, and event payloads into canonical models, transform responses for Vapi, validate inputs, and apply business rules. It can expose an API façade over Vapi and downstream systems, log failures, retry appropriate operations, and return controlled responses for voice interactions.