# Receive an inbound FaceTime call in your backend

> Use Chert’s inbound decision webhook to route a FaceTime call to your LiveKit agent, return room credentials, and handle declined or failed calls.

Developer guide · Published December 4, 2026 · By Chert Team

When someone calls a provisioned Chert FaceTime line, your backend can decide whether to answer and which LiveKit room to connect. That lets a support team route callers to an agent during business hours, decline outside its coverage window, or choose a different workflow for video calls.

## Configure the line to ask your backend

In Workers & Lines, confirm the worker is accepting calls with fresh readiness. Configure an HTTPS integration and assign it to the line. For Bring Your Own Room, select `customer_decides` without a default Assistant. A published default Assistant can select the managed route. Enable signing when the receiver is ready to verify deliveries. [Inbound setup](https://docs.trychert.com/facetime/bring-your-own-room#set-up-inbound-calls).

## Make the decision while the call rings

Read `data.call_id`, `data.line_id`, and `data.media` in `call.incoming`. Your receiver has five seconds by default to return a 2xx response containing an accept or decline decision. A late, missing, or invalid decision fails closed. For business-hours routing, keep the hours and line policy available locally so the decision has no dependency on a CRM response. Treat missing or null `data.from` as unknown and verify account ownership separately before disclosing account details. [Inbound decision contract](https://docs.trychert.com/facetime/bring-your-own-room#inbound-flow) and [caller identity guidance](https://docs.trychert.com/facetime/security#caller-identity).

When the call is eligible, prepare a separate LiveKit room and agent session for its call ID. Give the agent one eligible, unmuted audio publication. Mint a separate room-scoped bridge token with a distinct identity and join, publish, and subscribe grants. Here is an example response after preparing an agent named `support-agent`.

```
{
  "action": "accept",
  "livekit_url": "wss://your-project.livekit.cloud",
  "participant_token": "<bridge JWT for this call’s room>",
  "remote_participant_identity": "support-agent"
}
```

For a call outside coverage hours, return `{"action":"decline"}` with a 2xx response. Keep the LiveKit API key and secret on your backend. Give Chert only a valid, call-scoped bridge token. [Bridge token requirements](https://docs.trychert.com/facetime/bring-your-own-room#token).

## Verify the call and clean up

On answer, the bridge publishes the caller’s audio into the room. Your agent publishes its reply there. Chert reports `call.started` when the call is answered and media is bridged. In a controlled test, verify a specific spoken question and reply in both directions, then hang up and confirm your application releases its agent, dispatch, and room. Exercise decline, missed deadlines, and bridge failure too, so a call that never starts cannot leave a session running. [Lifecycle events](https://docs.trychert.com/facetime/webhooks) and [room cleanup](https://docs.trychert.com/facetime/bring-your-own-room#ending-and-cleanup).

## Related guides

- [FaceTime API for agents](https://chert.dev/facetime)
- [Verify and process FaceTime webhooks](https://chert.dev/blog/facetime-webhook-signatures-and-retries)
- [Place an outbound FaceTime call](https://chert.dev/blog/outbound-facetime-api-call)

Updated December 4, 2026.

## For agents

- This page as HTML: https://chert.dev/blog/inbound-facetime-api-calls
- Pricing: https://chert.dev/pricing
- Setup runbook: https://chert.dev/setup.md
- Documentation: https://docs.trychert.com/llms.txt
- MCP: `claude mcp add --transport http chert https://app.chert.dev/api/mcp`
- Every page on chert.dev has a Markdown version at the same address plus .md.
- Ask your user before you send a real iMessage or place a FaceTime call.
