Skip to main content
EzyConn
New launch:Meet EzyConn AI Voice Agent. Let AI answer your business calls automatically.Explore now

Developers

Build on EzyConn with one tag, custom code and signed webhooks

Install the chat with one script tag, script it from your own page, and receive signed events on your own endpoint. This page shows every piece, with the real code.

  • One script tag
  • 17 webhook events
  • Signed with your secret

On the left, the install code: one script tag pointing at EzyConn’s widget script with your widget token. On the right, a webhook endpoint’s delivery log receiving a conversation created, an agent assigned, a booking created and a contact created, each accepted.

Worked exampleThe endpoint and timings are invented. The code and event names are EzyConn’s own.

Install

One script tag, on every page that needs the chat

Copy it from the install screen in your settings, with your widget token already in it. No build step, no package.

The chat, in the corner
<script src="https://api.ezyconn.com/api/v1/widget/script.js"
        data-token="YOUR_WIDGET_TOKEN"></script>
With a different corner or dark colours on this site
<script src="https://api.ezyconn.com/api/v1/widget/script.js"
        data-token="YOUR_WIDGET_TOKEN"
        data-position="left"
        data-theme="dark"></script>
The chat inside a page, for a contact or help page
<iframe src="https://api.ezyconn.com/api/v1/widget/frame?token=YOUR_WIDGET_TOKEN"
        width="100%" style="height:100%;min-height:550px;border:none"
        frameborder="0" scrolling="no"></iframe>
  • Before the closing body tag

    Not inside another script. The token in the code must match the one on your install screen.

  • Only on the sites you allow

    List the websites allowed to load the chat. Add both example.com and www.example.com, or *.example.com for every subdomain.

  • Rotate the token when you need to

    Anywhere the old code was pasted stops working. Open conversations, history and settings are untouched.

  • If your site has a strict policy

    • script-src: allow api.ezyconn.com
    • frame-src: allow api.ezyconn.com
    • connect: allow WebSockets to wss://api.ezyconn.com
    • X-Frame-Options on your page must not be DENY

Custom code

Script the chat from your own page

Paste JavaScript and CSS into your settings and they load with the chat. The commands are few on purpose.

Custom JavaScript, from your settings
// Custom code runs with the chat on your own site.
EzyConn.on('booking:created', function () {
  EzyConn.log('A booking was made in the chat')
})

document.querySelector('#help-button')
  .addEventListener('click', function () { EzyConn.open() })

It can call

EzyConn.open()EzyConn.close()EzyConn.log()

And listen with EzyConn.on() for

chat:openedchat:closedconversation:startedmessage:sentmessage:receivedprechat:submittedbooking:created

Custom CSS

Overrides the chat’s own styles, scoped to the chat window only, so it cannot restyle your page.

Webhooks

Events on your endpoint, signed and logged

Each assistant can send events to addresses you choose, as they happen, with a delivery log for every one.

  1. Add an endpoint

    In the assistant’s developer settings, paste the address that should receive events.

  2. Choose the events

    Tick any of the 17 events. At least one is required.

  3. Set a signing secret

    Optional, and shown once when you create the endpoint. Use it to check each delivery came from EzyConn.

  4. Send a test event

    Check your endpoint accepts it, then read every delivery and its status in the log.

Webhook events EzyConn can send
EventWhen it is sent
Bookings
booking.createdAppointment booked
booking.confirmedAppointment confirmed
reservation.createdRoom reservation made
booking.cancelledAppointment cancelled
booking.completedAppointment completed
booking.no_showCustomer did not show
booking.rescheduledAppointment rescheduled
booking.reminder_dueAn appointment is approaching
Conversations
conversation.createdConversation started
conversation.updatedConversation updated
conversation.closedConversation closed
message.receivedMessage received
message.sentMessage sent
Team
agent.assignedAgent assigned
agent.unassignedAgent unassigned
Contacts and orders
contact.createdNew lead / contact captured
order.createdNew order placed

What each event carries, on the Zapier page

Two more ways out

Into your own analytics, and into your own systems

  • Google Analytics

    Add your Google Analytics tag and API secret in the developer settings, and chat events are sent to your own Analytics property.

  • AI actions

    The assistant can send what it collected in a conversation to an endpoint you run, and test it before it goes live. AI actions are from Starter.

FAQ

Questions developers ask first

Install, webhooks, custom code and AI actions.

How do I add EzyConn to my website?

Paste one script tag before the closing body tag on every page that should show the chat. The tag carries your widget token, which you copy from the install screen in your EzyConn settings. There is no build step and no package to install.

How do I verify a webhook came from EzyConn?

Set a signing secret when you create the endpoint. It is shown once; EzyConn signs each delivery with it so your endpoint can check the signature before acting on the event.

Can I control the chat from my own JavaScript?

Yes, through custom code in your settings. It can call EzyConn.open(), EzyConn.close() and EzyConn.log(), and listen with EzyConn.on() for chat opened and closed, conversation started, message sent and received, pre-chat form submitted and booking created.

Why does the chat not appear on my site?

Check the script sits before the closing body tag, that your domain is in the list of websites allowed to load the chat, and that your Content Security Policy allows api.ezyconn.com in script-src and frame-src. Replies need WebSockets to api.ezyconn.com as well.

Can the assistant call my own API during a conversation?

Yes, with an AI action, which sends what the assistant collected to an endpoint you run. AI actions are from Starter.

Start 14 days free

Get your widget token and paste one tag

Create an account, copy the install code from your settings, and the chat is on your site.

No card to start.