Click to Call is delivered as a hosted widget. You can use it in two ways: embed it on your site with an iframe, or share its URL directly.Documentation Index
Fetch the complete documentation index at: https://docs.apifycloud.io/llms.txt
Use this file to discover all available pages before exploring further.
Option 1 — Iframe embed
Drop the widget into any page on your site:Routing to a specific profile
If you have multiple call profiles configured in the console, pass the profile id in the query string:Language
The widget auto-detects the browser language. Override with?lang=en
or ?lang=es.
Nested iframes
If your page is itself embedded in another iframe, the outer container must delegate microphone access down the chain. Set this HTTP header on your outer page:Option 2 — Direct link
For landing pages, campaigns, SMS links, QR codes, or any “tap to call us” surface, use the widget’s hosted URL directly:URL context
Any query parameter you add to the widget URL becomes available inside the widget as context:- Keys must match
^[a-zA-Z0-9_\-.]{1,64}$— other keys are ignored. - Values are capped at 512 bytes each.
- Total context is capped at 2 KB.
- A hard maximum of 32 context keys per session.
- These reserved keys are stripped:
session,preview,configId,r,lang.
| Destination | Used how |
|---|---|
| Pre-call form | Field whose key matches a context key gets pre-filled |
| Widget labels / headings | {keyName} interpolation in Call Studio text blocks |
| SIP headers | Forwarded to the contact centre |
| Widget events | Included in the context property of every event |
| Custom code | Readable as window.c2c.context |
Receiving events in the parent page
When you embed via iframe, the widget can emitpostMessage events to
your parent page — call_started, call_ended, etc. For security, the
widget only emits to origins you’ve explicitly allowlisted in the
console under Call Studio → Embed. With no origins configured, the
widget emits no postMessage events to the parent at all.
Once configured, listen in your parent page:
Firefox handshake
Firefox does not expose the iframe’s parent origin to the widget at load time, so for security the widget waits for the parent to initiate a handshake:Content Security Policy
If your site has a CSP, allow the widget’s origin as an iframe source:What’s next
Events
What the widget emits and when.
Custom code
Inject your own HTML and JavaScript into the widget.
Security
Origin allowlisting, sandbox, and data boundaries.