Vapi calls this endpoint at the start of each call to retrieve the assistant configuration. It handles theDocumentation Index
Fetch the complete documentation index at: https://docs.masker.dev/llms.txt
Use this file to discover all available pages before exploring further.
assistant-request event type. Masker validates the request signature, looks up the agent, resolves the assistant configuration, rewrites the custom LLM URL to point at the Masker proxy, and returns the configuration to Vapi.
This endpoint is optional. If your Vapi assistant is fully static, you can skip it — just put the Masker proxy URL directly in your Vapi assistant’s Custom LLM URL field. Use this webhook when you need to vary the system prompt per call, attach session metadata to the audit log, or override the model or tools dynamically.
This endpoint is specific to Vapi’s assistant-request webhook format. For Bolna and Retell integrations, see their respective documentation — those platforms use a different webhook shape.
Endpoint
/api/v1 namespace.
Path parameters
Masker agent ID in
agt_* ULID format.Authentication
This endpoint is not authenticated bymasker_session cookie. It validates the X-Vapi-Signature header using HMAC verification against MASKER_VAPI_WEBHOOK_SECRET.
Configure the same secret value on both sides:
- Vapi assistant → Server URL Secret field
- Masker environment →
MASKER_VAPI_WEBHOOK_SECRETvariable
401.
Request body
Vapi sends a standard assistant-request payload:Must be
assistant-request. Other event types return 422 unsupported_event.Vapi call object.
Unix millisecond timestamp from Vapi.
Response fields
Masker returns a Vapi assistant configuration object withmodel.url rewritten to point at the Masker proxy for this agent:
Full Vapi assistant configuration.
Processing behavior
- Validate the
X-Vapi-Signatureheader. - Look up the agent by
agent_id. - Resolve the per-call assistant configuration (static defaults, or dynamic overrides if a callback is configured on the agent).
- Rewrite
model.urlto point athttps://masker-voice.fly.dev/proxy/{agent_id}/v1/chat/completions. - Append a
call_startedevent to the audit log with the Vapicall.id. - Return the assistant configuration to Vapi.
What gets logged
Masker logs the Vapicall.id, the assistant ID, and the chosen model. The customer’s phone number is masked before logging. The resolved system prompt, firstMessage, and any other config fields that might contain PHI are not logged.
Example
Response
Rate limit
100 requests/second sustained, burst 200. Rate-limited requests receive429 with a Retry-After header.
Errors
| Status | Code | Meaning |
|---|---|---|
401 | bad_signature | X-Vapi-Signature header is missing or does not match MASKER_VAPI_WEBHOOK_SECRET |
404 | agent_not_found | No agent with this ID exists |
422 | unsupported_event | The type field is not assistant-request |