ResourcesWebhooks

Webhooks

Configure and receive Talkturo webhooks for billing events, carrier compliance, flow triggers, provider integrations, and LiveKit token generation — with signature verification and event type reference.

curl -X POST "https://api.talkturo.com/api/billing/webhook" \
  -H "Content-Type: application/json" \
  -H "stripe-signature: t=1731544800,v1=3f2f0f3816a9a9f5d9f5f8d91d2b1cc95fb08b19e92d7fbb7ebdf1fd4d6f2ab4" \
  -d '{
    "id": "evt_1QmYxL2eZvKYlo2C9r81AbCd",
    "object": "event",
    "type": "checkout.session.completed",
    "data": {
      "object": {
        "id": "cs_test_b1N7x2rM8pQ4sK9t",
        "object": "checkout.session",
        "customer": "cus_R9h2mK7qX1tL0n",
        "payment_status": "paid",
        "metadata": {
          "account_slug": "acme-sales",
          "planId": "credits_1000"
        }
      }
    }
  }'
{
  "received": true
}
curl -G "https://api.talkturo.com/auth/token" \
  --data-urlencode "mode=voice" \
  --data-urlencode "room=sales-demo-room" \
  --data-urlencode "assistant_id=ast_7c91e4f0" \
  --data-urlencode "account_slug=acme-sales" \
  --data-urlencode "visitor_name=Jane Chen" \
  --data-urlencode "visitor_phone=+14155550182"
{
  "identity": "visitor_9f2b6d1c",
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example.livekit.token",
  "roomName": "sales-demo-room",
  "agentName": "Acme Sales Assistant"
}

Webhook endpoints

Talkturo sends and receives webhooks for billing events, carrier compliance updates, flow triggers, and integration events from third-party providers. Use this reference to identify each endpoint, understand how requests are authenticated, and verify the shape of the key request and response data.

Talkturo uses different security models across webhook endpoints based on the source system. Stripe requests use signature verification, Telnyx uses ED25519 signatures, flow and provider webhooks use HMAC secrets, and some carrier callbacks avoid trusting inbound payloads by re-fetching state from the provider.

Webhook endpoint summary

MethodEndpointPurposeAuthenticationNotes
POST/api/billing/webhookReceive Stripe billing eventsstripe-signature verified with STRIPE_WEBHOOK_SECRETAlways returns 200
POST/api/phone-numbers/telnyx-webhookReceive Telnyx KYC and compliance status updatesED25519 signature verified with TELNYX_PUBLIC_KEYReturns 503 if key is not configured, 400 on bad signature
POST/api/phone-numbers/twilio-webhookReceive Twilio bundle status callbacksNoneRe-fetches status from Twilio API instead of trusting posted status
POST/api/flow/[flowId]/triggerTrigger a published flowHMAC in X-Talkturo-SecretSupports async and sync execution
POST/api/flow/integrations/webhooks/[provider]Receive provider webhooksPer-webhook HMAC secretSupported providers include Cal.com, Calendly, and Slack
GET / POST/api/flow/integrations/webhooks/metaVerify and receive Meta lead eventsHMAC with META_APP_SECRETHandles Meta and Facebook lead ads
POST/api/assistants/[assistantId]/webhooks/testTest webhook delivery for an assistantSession authenticationUsed for delivery testing, not third-party inbound webhooks
GET/auth/tokenGenerate LiveKit token and dispatch an agentNonePublic token handler exposed through middleware
POST/api/integrations/zapierReceive Zapier integration requestsEndpoint-specific integration behaviorUsed by Zapier integration flow

Billing webhooks

POST /api/billing/webhook receives Stripe events for checkout completion, subscription lifecycle changes, invoices, and successful payment intents. Talkturo verifies the stripe-signature header using STRIPE_WEBHOOK_SECRET before processing the event.

Do not treat a request to /api/billing/webhook as trusted unless Stripe signature verification succeeds. Signature verification protects the endpoint from forged billing events.

Headers

header
stripe-signaturestring
Required

Stripe request signature. Talkturo verifies this header with the STRIPE_WEBHOOK_SECRET environment variable.

Stripe event types

Response fields

receivedboolean
Required

Returns true when Talkturo accepts the webhook request. The endpoint always returns HTTP 200 after handling the request.

Carrier webhooks

Carrier webhooks update phone-number compliance and bundle state. Telnyx and Twilio use different trust models, so configure each endpoint according to the provider.

Telnyx compliance webhook

POST /api/phone-numbers/telnyx-webhook receives Telnyx KYC status events. The endpoint verifies the ED25519 signature using TELNYX_PUBLIC_KEY, requires access to the raw request body, and returns 200 after processing to avoid unnecessary retries.

If TELNYX_PUBLIC_KEY is not configured, Talkturo returns 503. If signature verification fails, Talkturo returns 400.

Response fields

receivedboolean
Required

Returns true when Talkturo accepts the webhook request.

statusstring

Carrier or requirement group status derived from the Telnyx event.

updatedboolean

Indicates whether Talkturo updated internal compliance state.

matchedRequestboolean

Indicates whether the event matched a known compliance request or requirement group.

Twilio bundle webhook

POST /api/phone-numbers/twilio-webhook receives Twilio bundle status callbacks. The endpoint does not authenticate the inbound request directly. Instead, it reads the bundle identifier from the payload and re-fetches the current status from Twilio before applying updates.

Request fields

body
BundleSIDstring

Twilio bundle identifier. The endpoint also accepts BundleSid and bundle_sid.

Response fields

receivedboolean
Required

Returns true when Talkturo accepts the callback.

statusstring

Current bundle status after Talkturo re-fetches the state from Twilio.

matchedRequestboolean

Indicates whether the callback matched a tracked compliance request.

Flow trigger webhooks

POST /api/flow/[flowId]/trigger triggers a published flow from an external system or a voice agent. The endpoint verifies an SHA-256 HMAC of the raw request body using the flow version trigger_secret, passed in the X-Talkturo-Secret header.

Generate the HMAC from the exact raw request body. If the body changes after signing, Talkturo rejects the request.

Path parameters

path
flowIdstring
Required

Unique identifier of the flow to trigger.

Headers

header
X-Talkturo-Secretstring
Required

HMAC signature for the request body. Talkturo validates this value against the trigger secret stored for the published flow version.

Query parameters

query
syncboolean

If set to true, Talkturo waits up to 30 seconds for the flow to finish and returns output inline. If omitted, Talkturo runs the flow asynchronously and returns a run ID with HTTP 202.

Request body

body
paramsobject
Required

Input values passed into the flow at runtime.

body
contextobject

Optional execution context. Context can include assistant-related values such as assistant_id.

Response fields

okboolean
Required

Indicates whether Talkturo accepted or completed the trigger request.

run_idstring
Required

Unique identifier for the flow run.

outputobject

Flow output returned only for successful synchronous execution.

errorstring

Error message returned for failed synchronous execution.

failed_nodestring

Identifier of the node that failed during synchronous execution.

partial_outputobject

Partial output captured before a synchronous run failed.

Integration provider webhooks

POST /api/flow/integrations/webhooks/[provider] receives inbound events from supported providers and routes them into Talkturo flow integrations. Each webhook uses its own HMAC secret.

Path parameters

path
providerstring
Required

Provider name for the inbound webhook. Supported providers include cal.com, calendly, and slack.

Headers

header
X-Talkturo-Secretstring
Required

HMAC signature for the provider webhook payload. Talkturo validates the payload against the secret configured for that webhook.

Response behavior

The endpoint validates the provider-specific secret, parses the event payload, and dispatches the event into the configured integration flow. Response payloads depend on the integration and event path, but authentication failure prevents processing.

Meta and Facebook webhooks

GET /api/flow/integrations/webhooks/meta supports webhook verification, and POST /api/flow/integrations/webhooks/meta receives lead ads events. Talkturo authenticates requests with an HMAC derived from META_APP_SECRET.

Request methods

query
hub.modestring

Meta verification mode used during webhook registration.

query
hub.verify_tokenstring

Verification token value sent by Meta during endpoint validation.

query
hub.challengestring

Challenge string that Talkturo returns during successful verification.

Headers

header
X-Hub-Signature-256string

Common Meta signature header used to validate the request body against META_APP_SECRET.

Response behavior

On verification requests, Talkturo returns the challenge value when validation succeeds. On event delivery requests, Talkturo validates the payload and processes inbound Meta or Facebook lead data.

Assistant webhook testing

POST /api/assistants/[assistantId]/webhooks/test sends a test webhook delivery for an assistant configuration. Use this endpoint to confirm that your target URL, headers, and downstream receiver behave as expected before enabling production delivery.

Path parameters

path
assistantIdstring
Required

Unique identifier of the assistant whose webhook configuration you want to test.

Authentication

This endpoint uses session authentication. It is intended for authenticated dashboard users testing assistant webhook delivery, not for third-party providers posting into Talkturo.

LiveKit token handler

GET /auth/token generates a LiveKit access token, creates a room when needed, and dispatches an agent. This endpoint is public and exposed through middleware rather than a standard API route.

Query parameters

query
modestring

Connection mode used by the token handler.

query
roomstring

Requested LiveKit room name.

query
assistant_idstring

Assistant identifier used to select and dispatch the agent.

query
account_idstring

Account identifier associated with the request.

query
account_slugstring

Account slug associated with the request.

query
company_idstring

Company identifier associated with the visitor or session.

query
visitor_namestring

Visitor display name associated with the LiveKit identity.

query
visitor_phonestring

Visitor phone number associated with the session.

query
billing_exemptstring

Optional flag used for billing behavior during token creation.

Response fields

identitystring
Required

Generated participant identity.

accessTokenstring
Required

LiveKit access token for the participant session.

roomNamestring
Required

Name of the LiveKit room created or reused for the session.

agentNamestring
Required

Name of the dispatched agent.

Zapier integration

POST /api/integrations/zapier is the Talkturo endpoint used by the Zapier integration. Use this endpoint when connecting Talkturo events or actions into Zapier workflows.

Response behavior

The exact payload and authentication behavior depend on the Zapier integration configuration. If you are building against this endpoint, validate the specific integration setup in your workspace before sending production traffic.

Security guidance

Prefer signed webhooks whenever the upstream system supports them. For unsigned callbacks, treat the inbound body as untrusted input and verify state with the provider before changing account data.

The webhook surface in Talkturo falls into three patterns:

  • Provider-signed requests for Stripe and Telnyx.
  • Talkturo-managed HMAC secrets for flow triggers and integration webhooks.
  • State re-verification for callbacks such as Twilio, where Talkturo fetches the current provider state before applying updates.