Click2Call puts Callston calling inside your web app (a CRM, a helpdesk, a back office). Your employees make and receive phone calls from your pages, and a call keeps going while they move between pages.
There are three pieces. You build two small things: two backend endpoints and a few lines on your pages.
| Piece | Where it runs | What it does |
|---|---|---|
| The widget | your pages (one script tag) | Shows the call controls: ready state, the current call, timer, Answer/Decline, mute, keypad, hang up. |
| Your backend | your server | Signs in the widget for the employee who is logged in, and asks Callston to call a contact. Holds the secret server key. |
| The call window | a Callston window (or tab, panel, or browser extension) | Holds the microphone and the call. The employee opens it once with Enable calls. Reloading or leaving your pages never drops a call. |
A call, step by step:
Phone numbers go from your server to Callston directly. When the integration hides numbers, the employee's browser never receives them.
c2c_…) and the server key (c2ck_…). The server key is shown only once: keep it in your backend's secret store, never in a web page.https://crm.example.com. Tip: open your app, run location.origin in the browser console and copy the result.While you build and test, you can tick Allow all origins (for testing). Switch it off and list your exact origins before going live.
The widget calls this endpoint on every page load. Your endpoint checks who is logged in, then asks Callston for a widget token for that employee.
The widget sends your endpoint: { "integration_id": "c2c_…", "origin": "https://crm.example.com", "sdk": "1.1.3" }
Your endpoint sends Callston:
POST https://callston.com/api/v1/click2call/sessions
Authorization: Bearer c2ck_…
Content-Type: application/json
{ "integration_id": "c2c_…",
"agent": { "type": "email", "value": "[email protected]" },
"origin": "https://crm.example.com" }
Use the origin the widget sent you, not a fixed value. Then return Callston's answer to the widget unchanged (status code and JSON).
The widget calls this endpoint when the employee clicks a call button. It sends what your page gave it, for example { "integration_id": "c2c_…", "contact_reference": "crm-8842" }. Your endpoint finds the contact's number and sends Callston:
POST https://callston.com/api/v1/click2call/calls
Authorization: Bearer c2ck_…
Idempotency-Key: crm-8842-1727612345
Content-Type: application/json
{ "integration_id": "c2c_…",
"agent": { "type": "email", "value": "[email protected]" },
"phone_number": "+14155550101",
"contact_reference": "crm-8842",
"display_name": "Alice Johnson" }
Again, return Callston's answer unchanged. The widget shows a refusal at once (for example the call window is not open). If your endpoint always answers "OK", the widget cannot tell the employee what went wrong.
Add this to the layout that every page uses:
<script src="https://callston.com/assets/js/click2call-sdk.js"></script>
<script>
var widget = CallstonClick2Call.init({
integrationId: 'c2c_…',
sessionEndpoint: '/callston/session', // your endpoint from step 2
requestCallEndpoint: '/callston/call' // your endpoint from step 3
});
</script>
Then wire your call buttons:
<button onclick="widget.requestCall({ contact_reference: 'crm-8842' })">Call Alice</button>
The widget has its own Enable calls button. If you want your own, call widget.enableCalls() directly inside the click handler: browsers open the call window only from a click.
http://localhost) and log in as an employee who is a member of the integration.Something does not work? See Troubleshooting at the end of this page: the widget shows a reason code, and the table says what to fix.
Both examples have the same two endpoints. They expect your own login (currentUser) and your own contacts lookup.
const express = require('express');
const app = express();
app.use(express.json());
const CALLSTON = 'https://callston.com';
const SERVER_KEY = process.env.CALLSTON_SERVER_KEY; // c2ck_…
const INTEGRATION_ID = process.env.CALLSTON_INTEGRATION_ID; // c2c_…
async function callston(path, body, extraHeaders = {}) {
const res = await fetch(CALLSTON + path, {
method: 'POST',
headers: { Authorization: 'Bearer ' + SERVER_KEY, 'Content-Type': 'application/json', ...extraHeaders },
body: JSON.stringify(body),
});
return { status: res.status, body: await res.json() };
}
// Step 2: a widget token for the employee who is logged in
app.post('/callston/session', async (req, res) => {
const user = currentUser(req); // your login check
if (!user) return res.status(401).json({ ok: false, error: 'not_logged_in' });
const r = await callston('/api/v1/click2call/sessions', {
integration_id: INTEGRATION_ID,
agent: { type: 'email', value: user.email },
origin: req.body.origin, // as the widget sent it
});
res.status(r.status).json(r.body); // unchanged
});
// Step 3: call a contact; the number stays on your server
app.post('/callston/call', async (req, res) => {
const user = currentUser(req);
if (!user) return res.status(401).json({ ok: false, error: 'not_logged_in' });
const contact = await findContact(req.body.contact_reference); // your database
if (!contact) return res.status(404).json({ ok: false, error: 'contact_not_found' });
const r = await callston('/api/v1/click2call/calls', {
integration_id: INTEGRATION_ID,
agent: { type: 'email', value: user.email },
phone_number: contact.phone, // E.164, e.g. +14155550101
contact_reference: String(contact.id),
display_name: contact.name,
}, {
// The same key within 10 seconds = the same call (a double click starts one call)
'Idempotency-Key': 'call-' + contact.id + '-' + Math.floor(Date.now() / 10000),
});
res.status(r.status).json(r.body); // unchanged
});
<?php
const CALLSTON_URL = 'https://callston.com';
define('CALLSTON_SERVER_KEY', getenv('CALLSTON_SERVER_KEY')); // c2ck_…
define('CALLSTON_INTEGRATION_ID', getenv('CALLSTON_INTEGRATION_ID')); // c2c_…
/** POST to Callston; returns [HTTP status, raw JSON]. */
function callston(string $path, array $body, array $headers = []): array
{
$ch = curl_init(CALLSTON_URL . $path);
$h = ['Authorization: Bearer ' . CALLSTON_SERVER_KEY, 'Content-Type: application/json'];
foreach ($headers as $k => $v) {
$h[] = "$k: $v";
}
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_HTTPHEADER => $h, CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => json_encode($body), CURLOPT_TIMEOUT => 15,
]);
$raw = curl_exec($ch);
$status = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
return $raw === false ? [502, '{"ok":false,"error":"unreachable"}'] : [$status, $raw];
}
function reply(array $r): void
{
http_response_code($r[0]);
header('Content-Type: application/json');
echo $r[1]; // Callston's answer, unchanged
}
$in = json_decode(file_get_contents('php://input'), true) ?: [];
$user = current_user(); // your login check
if (!$user) {
reply([401, '{"ok":false,"error":"not_logged_in"}']);
exit;
}
// Step 2 — /callston/session
if ($_SERVER['REQUEST_URI'] === '/callston/session') {
reply(callston('/api/v1/click2call/sessions', [
'integration_id' => CALLSTON_INTEGRATION_ID,
'agent' => ['type' => 'email', 'value' => $user->email],
'origin' => $in['origin'] ?? '', // as the widget sent it
]));
}
// Step 3 — /callston/call
if ($_SERVER['REQUEST_URI'] === '/callston/call') {
$contact = find_contact($in['contact_reference'] ?? ''); // your database
if (!$contact) {
reply([404, '{"ok":false,"error":"contact_not_found"}']);
exit;
}
reply(callston('/api/v1/click2call/calls', [
'integration_id' => CALLSTON_INTEGRATION_ID,
'agent' => ['type' => 'email', 'value' => $user->email],
'phone_number' => $contact->phone, // E.164
'contact_reference' => (string) $contact->id,
'display_name' => $contact->name,
], ['Idempotency-Key' => 'call-' . $contact->id . '-' . intdiv(time(), 10)]));
}
curl -X POST https://callston.com/api/v1/click2call/sessions \
-H "Authorization: Bearer $CALLSTON_SERVER_KEY" -H "Content-Type: application/json" \
-d '{"integration_id":"c2c_…","agent":{"type":"email","value":"[email protected]"},"origin":"https://crm.example.com"}'
These are the limits of this installation right now.
| What | Limit |
|---|---|
| Integrations per account (or per business) | 10 |
| Calls at the same time, per integration (all its agents together, call requests still waiting for a call window included) | new integrations start at 30; you can set up to 500 |
| Calls at the same time, per agent | 1 (a call request still waiting for the agent's call window counts) |
| Longest call | new integrations start at 60 minutes; you can set up to 120 minutes |
| A call request waits for the agent's call window | 60 seconds, then it expires |
| Widget token | 30 minutes, renewed by the widget automatically |
| Requests with the server key | 300 per minute per IP address, 600 per minute per integration |
| Requests from the widget | 600 per minute per agent (all their widgets together) |
Over a limit, Callston answers 429 with concurrency_limit (calls) or rate_limited (requests, with a Retry-After header).
You find these on the integration's page in Callston.
| Setting | What it does |
|---|---|
| Allowed origins | The exact web addresses (scheme + host + port) that may use the widget. Any other site is refused. |
| Allow all origins (for testing) | Any site may load the widget while you build. Each session still works only on the site it was made for. Switch it off before going live. |
| Agent identifier | How your backend names employees: their Callston email, or a UUID (Callston lists each member's UUID; you can also map your own UUID to a member). |
| Who is covered (businesses) | Everyone, selected members, or departments; and whether new members join automatically. Each agent can have their own overrides; the page shows each agent's effective settings. |
| Outgoing / incoming calls | Whether agents may make calls, receive calls, or both. |
| Caller ID | The number the customer sees. Automatic works like the agent's dialer (a business uses the agent's department numbers, else the business default; a personal account uses its first number). Rotate over all numbers takes turns. A specific number always uses that number, falling back to Automatic if it stops being usable. Bought and verified numbers both work. |
| Destination countries | Which countries agents may call. |
| Max concurrent calls | Calls at the same time for all the integration's agents together. A call center sets at least the number of agents who may be on a call at once. See Limits. |
| Max call duration | The longest a call may last. See Limits. |
| Number visibility | Show, Hide or Masked. Hidden numbers never reach the agent's browser: not in the widget, not in call histories, exports or the wallboard. The business owner and the business's Admin members always see them; the owner can let others see them with the team permission See phone numbers a Click2Call integration hides. |
| Call window opens as | Where the call window lives: popup (default), new tab, frame shell, or browser extension. See Where the call window lives. |
| Widget defaults | Position, colors, language, compact mode, label and which controls show (mute, keypad). Your init() options override them. |
Keys: rotating the server key stops the old key at once. Revoking the key stops your backend. Revoking the integration also ends every widget session and call window at once; calls in progress end.
Disable stops new calls at once, and lets the calls in progress finish:
integration_disabled. No call window opens, and open ones stop taking incoming calls.integration_disabled, except for an agent whose call is still going on: the next page of your app still shows that call and can hang it up. Such a session allows no new call.failed with the error integration_disabled.endSession()) and your backend's GET /calls/{id} and POST /calls/{id}/hangup keep working. Admins can also end them all with End calls now on the integration.Switching calls off for one agent, or taking them out of Who is covered, works the same way for that agent. Their call in progress finishes, and End calls now ends theirs only. A request of theirs not placed yet ends failed with agent_disabled or agent_not_assigned.
All requests use Authorization: Bearer c2ck_… (your server key) and JSON. Every error looks like { "ok": false, "error": "code", "message": "text" }: check error in your code, show or log message.
Errors any request can get:
| Error | Status | Meaning |
|---|---|---|
unauthorized | 401 | The server key is missing, wrong or rotated. |
integration_mismatch | 403 | The server key belongs to another integration than integration_id. |
integration_disabled, integration_revoked | 403 | The integration is switched off, or was revoked. While it is switched off, checking and ending calls still work (see Disable). |
account_suspended, business_suspended | 403 | The Callston account or business is not active. Ending a call (POST /calls/{id}/hangup) still works. |
platform_disabled | 403 | Click2Call is not available right now. |
invalid_request | 422 | The body is not valid JSON, or a required field is missing. |
rate_limited | 429 | Too many requests: wait for Retry-After seconds. |
POST /api/v1/click2call/sessions
| Field | Required | Meaning |
|---|---|---|
integration_id | yes | c2c_… |
agent | yes | { "type": "email", "value": "[email protected]" }, or { "type": "uuid", "value": "…" }. Must match the integration's Agent identifier. |
origin | yes | The origin the widget sent you (https://crm.example.com). |
Answer 201:
{ "ok": true, "widget_token": "c2cw_…", "expires_at": 1727612345,
"agent": { "name": "Dana", "identifier": "[email protected]" },
"policy": { "outbound": true, "inbound": true, "number_visibility": "hide",
"controls": ["mute","dtmf"], "widget": { … }, "max_call_seconds": 3600 },
"engine": null }
| Error | Meaning |
|---|---|
origin_not_allowed | The origin is not in Allowed origins (or your backend sent another origin than the page's). |
identifier_mode | agent.type is not the integration's Agent identifier mode, or agent is missing. |
agent_unknown | No active member has this email or UUID. |
agent_ambiguous | The identifier matches more than one member. |
agent_not_assigned | The member is not covered by this integration. |
agent_disabled | Calls are switched off for this agent. |
POST /api/v1/click2call/calls with an Idempotency-Key header.
| Field | Required | Meaning |
|---|---|---|
integration_id | yes | c2c_… |
agent | yes | The employee who makes the call (same format as for sessions). |
phone_number | yes | The number to call, in E.164 format (+14155550101). |
contact_reference | no | Your own id for the contact. It comes back in the call's details. |
display_name, display_company | no | What the agent sees instead of (or next to) the number. |
metadata | no | A small JSON object of your own, up to 2000 bytes (for example { "ticket": 4411 }). |
Idempotency-Key: the same key with the same body returns the same call, so a double click starts one call. The same key with a different body is refused (409 idempotency_conflict).
Answer 202 — the call is queued, not answered yet:
{ "ok": true, "request_id": "ci_…", "call_id": "ci_…", "status": "queued",
"display": { "name": "Alice Johnson", "company": "Northwind", "number": null, "contact_reference": "crm-8842" },
"expires_at": 1727612405, "server_time": 1727612345 }
Before queuing, Callston checks the agent (member, covered, enabled, outgoing allowed), the number (valid, allowed country, not on the do-not-call list), the account (active, enough balance, under the call limit) and that the agent's call window is ready with a microphone. The agent's call window then places the call. A request no call window picks up in time becomes expired (see Limits).
| Error | Status | Meaning |
|---|---|---|
agent_offline | 409 | The agent has no open call window. They need to click Enable calls. |
agent_not_ready | 409 | The call window has no microphone permission. |
agent_busy | 409 | The agent is already on a call, or a call request for them is still waiting for their call window. |
outbound_not_allowed | 403 | Outgoing calls are off for this agent or integration. |
invalid_phone_number | 422 | Not a valid E.164 number. |
destination_not_allowed, destination_blocked | 403 | The country is not allowed, or the number is blocked. |
concurrency_limit | 429 | The integration already has its maximum number of calls. |
insufficient_balance | 402 | Not enough balance on the account. |
no_caller_id | 422 | The account has no number to call from. |
idempotency_conflict | 409 | The same Idempotency-Key was used with a different body. |
metadata_too_large | 422 | metadata is over 2000 bytes. |
GET https://callston.com/api/v1/click2call/calls/{request_id}
POST https://callston.com/api/v1/click2call/calls/{request_id}/hangup
status is one of queued, claimed, dialing, ringing, connected, completed, rejected, busy, no_answer, canceled, failed, expired. duration is counted by the server from the moment the call was answered. An unknown request_id gets 404 not_found. If the hang-up could not be confirmed, the answer is 502 hangup_uncertain: try again.
Both keep working while the integration is disabled, and the hang-up also for a suspended account. A call request that was not placed yet when calls were switched off ends failed, with error set to integration_disabled, agent_disabled or agent_not_assigned.
CallstonClick2Call.init({ … }) returns the widget. Only the first two options are required.
| Option | Default | Meaning |
|---|---|---|
integrationId | — (required) | c2c_… |
sessionEndpoint | — (required) | Your session endpoint (step 2). |
requestCallEndpoint | none | Your call endpoint (step 3). Needed for requestCall(). |
headers | {} | Extra headers for your two endpoints, e.g. { 'X-CSRF-Token': '…' }. The widget sends credentials: 'same-origin'. |
windowMode | the integration's setting | 'popup', 'tab' or 'extension'. |
position | the integration's setting | 'bottom-right', 'bottom-left', 'top-right', 'top-left'. |
offsetX, offsetY | the integration's setting | Distance from the corner, in pixels. |
language | the integration's setting, else the page's lang | 'en', 'he', 'ar', … |
theme, color, label, compact | the integration's setting | Look of the widget. |
ui | true | false hides the widget's own UI: build your own from getState() and the events. |
container | document.body | Where the widget is placed. |
shellRedirect | true | Frame-shell mode only: false stops pages from moving themselves into the shell. |
| Method | What it does |
|---|---|
enableCalls() | Opens the call window. Call it directly in a click handler (not after an await). If a call window is already open, it is brought to the front instead. If that window (or the extension) cannot take calls, it is first asked to start again. If it is still not ready 25 seconds later, the next enableCalls() replaces it with a fresh one. A window on a call is never replaced. If a popup is blocked, the widget shows an Open in new tab link. Returns true when a window was opened or found. |
requestCall({ contact_reference, … }) | Posts to your requestCallEndpoint and returns its answer. |
answer(), decline() | Answer or decline an incoming call. |
hangup() | Ends the current call, from any page. |
setMuted(true / false) | Mute or unmute (when mute is enabled for the integration). |
sendDigits('123#') | Keypad tones (when the keypad is enabled). |
setAvailability(true / false) | Whether incoming calls may ring this agent. |
getState() | { state, engine, call, policy, agent, session }. |
on(event, fn), off(event, fn) | Listen to events (below). |
detach() | Removes the widget from the page. It is not a hang-up: the call window keeps the call. |
endSession() | Signs the widget out. Use it when the employee logs out of your app. |
| Event | When |
|---|---|
statechange | Anything changed. Receives the same object as getState(). |
callrequested | requestCall() got an answer from your endpoint. |
commandfailed | A control was refused, or a requested call did not start within 30 seconds. Receives { kind, error }; the widget also shows the reason. |
detached | detach() ran. |
state | What it means for the employee |
|---|---|
init, connecting | Starting up. |
offline | No call window yet, or the open one cannot take calls: they should click Enable calls. |
enabling | The call window is opening, or starting again. A window stuck here for 25 seconds shows as offline. |
ready | Ready to call and to receive calls. |
unavailable | Online, but not taking incoming calls. |
no_mic | The call window is waiting for microphone permission. A window that has waited 25 seconds at the browser's microphone prompt shows here too: Enable calls brings it to the front. |
call | On a call: see call.status (dialing, ringing, connected, … or incoming). |
reconnecting | The connection to the call window is coming back. |
unauthorized, error | The session was refused: getState().error holds the reason code (see Troubleshooting). |
init() once after login, keep the widget in your app state, and call endSession() on logout.The call window holds the microphone and the call, so it must stay open while your pages change. Choose one place per integration (Call window opens as), or per page with the windowMode option.
| Mode | Where | What you do | Best for |
|---|---|---|---|
| Popup window (default) | a small Callston window | nothing | most sites |
| New browser tab | a normal tab the agent can pin | nothing | agents whose popups get blocked or closed |
| Frame shell | a small panel inside a shell page on your site; your pages run inside it | add one page (below) | multipage sites that should not open a second window |
| Browser extension | the Callston extension for Chrome and Edge | agents install it once | teams who want no window or panel at all |
All four use the same backend endpoints and the same widget.
The agent's tab shows a shell page from your site. The shell shows your real pages in a full-screen frame, and keeps the Callston call window in a small panel. Links, forms and reloads inside the frame never touch the call, and calls start without clicking Enable calls.
1. Add a shell page on the same origin as your app, for example https://crm.example.com/callston-shell.html:
<!DOCTYPE html>
<html>
<head><meta charset="utf-8"><title>CRM</title></head>
<body>
<script src="https://callston.com/assets/js/click2call-sdk.js"></script>
<script>
CallstonClick2Call.shell({
integrationId: 'c2c_…',
sessionEndpoint: '/callston/session', // the same endpoints as init()
requestCallEndpoint: '/callston/call',
start: '/crm/' // the first page to show
// optional: headers: { … }, panelPosition: 'left' or 'right', autoEnable: true
});
</script>
</body>
</html>
2. In Callston, set Call window opens as → Frame shell and enter the shell page's address. Its origin must be in Allowed origins.
3. Let your own pages be framed by your shell: send X-Frame-Options: SAMEORIGIN or Content-Security-Policy: frame-ancestors 'self' (not DENY or 'none'). If the shell page has a CSP, it also needs frame-src https://callston.com.
Keep your init() code on your pages as it is. Inside the shell, init() returns the shell's widget (widget.inShell === true) with the same methods and events.
Good to know:
shell?p=/that/page). Turn this off with init({ shellRedirect: false }).top.location.With Call window opens as → Browser extension, the call runs inside the Callston extension for Google Chrome and Microsoft Edge. There is no window to keep open; agents answer from the extension's button or a desktop notification.
enableCalls() opens a short tab that connects the extension and closes itself. If the extension is missing, that tab offers the install link and a Use this tab instead button, so calls always work.Nothing to build. Incoming calls follow the account's normal routing in Callston (IVR, departments, queues, forwarding). An agent's call window rings when their integration allows incoming calls, their call window is open with a microphone, and they are Available in the widget or the window (a reloaded window and an extension started again keep that choice). Busy, declined and unanswered calls follow the department's rules (timeout, overflow, voicemail, callback).
The widget and the window show the department, a caller label (a lead's name when known) and the number as the integration's visibility allows. Browsers cannot open a call window by themselves for an incoming call: the agent clicks Enable calls once per browser session.
Idempotency-Key, one call starts.hangup() ends the call even if the call window lost it.origin to Callston unchanged. Each session works only on that origin.endSession() when the employee logs out.localhost).script-src https://callston.com and connect-src https://callston.com. Frame shell: also frame-src https://callston.com on the shell page.enableCalls() must run directly in a click. Agents who often lose the popup can use New browser tab, which popup blockers never catch.microphone.The widget shows the reason after Calls unavailable. Your session endpoint receives the same code from Callston.
| You see | Why | Fix |
|---|---|---|
| Browser console: blocked by CORS policy … No 'Access-Control-Allow-Origin' header | Your page's origin is not in Allowed origins of an active integration. | Add the exact origin (or tick Allow all origins while testing) and check the integration is Active. Then hard-refresh: browsers remember a refusal for a few minutes. |
origin_not_allowed | The origin is not allowed, or your backend sent a different origin than the page's own. | Add the exact origin (location.origin in the console). Your backend must pass on the origin the widget sent, not a fixed value or a full URL. Run the widget in the top page, not in a frame from another site. |
identifier_mode | agent.type does not match the integration's Agent identifier, or agent is missing. | Send "agent": { "type": "email", "value": "…" } (or "type": "uuid"), as in step 2. |
agent_unknown, agent_not_assigned, agent_disabled | No active member with that email or UUID, the member is not covered by the integration, or calls are off for them. | Fix the identifier, or the integration's Who is covered and per-agent settings. |
| Calls are not connected in this browser | No call window is open for this agent in this browser. | Click Enable calls. In extension mode, a short tab opens and connects the extension. |
| This extension is not allowed on this server | The agent installed another copy of the extension. | Remove it and install it from https://callston.com/click2call/extension. |
| The extension says Calls unavailable | It could not connect calls, for example because the browser started before the network was up. | Nothing: it tries again by itself. To try at once, click Reconnect now in its toolbar popup, or Enable calls in the widget. If it is still not ready 25 seconds later, Enable calls connects the extension again from scratch. |
| The call window says Browser calling is not available for this account right now | It could not start calls, for example because the voice service did not answer for a moment. | Nothing: it tries again by itself. To try at once, click Enable calls in the widget. If it is still not ready 25 seconds later, Enable calls loads a fresh call window in its place. |
| Waiting for the microphone… | The call window or the extension has no microphone permission. | Allow the microphone in the call window, or on the extension's Settings & microphone page. |
| Requesting call…, then The call did not start | Either your call endpoint hid Callston's refusal behind an "OK", or the call window never picked up the request (closed, or open in another browser). | Return Callston's answer unchanged (steps 2 and 3): the widget then shows the real reason. Check that the widget shows Ready before calling. |
| The popup never opens | enableCalls() ran outside a click (after an await or an AJAX call), or popups are blocked. | Call it directly in the click handler, or use New browser tab or Browser extension. |
| Method & path | Credential | Purpose |
|---|---|---|
POST /api/v1/click2call/sessions | server key | A widget token for one agent on one origin. |
POST /api/v1/click2call/calls | server key | Request a call (Idempotency-Key). |
GET /api/v1/click2call/calls/{id} | server key | The call's status. |
POST /api/v1/click2call/calls/{id}/hangup | server key | End the call. |
GET /api/v1/click2call/widget/state | widget token | Used by the widget. |
POST /api/v1/click2call/widget/launch-ticket | widget token | Used by the widget to open the call window. |
POST /api/v1/click2call/widget/commands | widget token | Used by the widget: hangup, answer, decline, mute, unmute, dtmf, availability, focus. |
POST /api/v1/click2call/widget/refresh | widget token | Used by the widget to renew its token. |
POST /api/v1/click2call/widget/revoke | widget token | Used by endSession(). |
/api/v1/click2call/engine/… | call window | Used only by Callston's call window and extension. |
GET /click2call/extension | none | The page where agents install the browser extension: https://callston.com/click2call/extension. |
You call only the first four. The widget calls the widget/… endpoints for you. The full schemas are in the API schema (/developers/click2call/openapi.json).