Call and SMS webhooks

Rev Ops
Rev Ops
  • Updated

Webhooks send your call and SMS data in real time to your own server. They're useful if you don't use a CRM integration, or if you want to feed your dashboards, internal tools or automations.

  • Plan: Advanced or Max.
  • Role: Owner or Admin.
  • Technical documentation (data format, authentication): docs.onoffbusiness.com.

Install a webhook

  1. In the console, open Integrations & API.
  2. Choose the webhook you want: Onoff Call Webhook (call end), Onoff SMS Webhook or the call start webhook.
  3. Enter the URL of your server that will receive POST requests (required).
  4. Enter an API key (optional, recommended) to check that requests come from Onoff. See the Authorization page of the documentation.
  5. Click Integrate. Onoff sends test data to your URL.

If your server responds correctly, the status changes to Integrated. Otherwise, the webhook isn't activated: fix the URL and try again.

Call webhook

An event is sent at the end of each call, answered or not. There are three types:

Event When
CDR Call ended, without a recording.
VM Voicemail received. Contains the message link and duration.
RECORDING Recorded call. Replaces the CDR event: same information, plus the recording link.

Each event contains the member (name, email, number), the other party's number (and their name, email and company if they're in the member's contacts), start, end, duration, direction (inbound or outbound), status (answered, missed, busy, voicemail…), notes and tags.

Setting Effect
Send Call Recording Adds the recording link, if recording is on for the member. The link arrives 5 to 8 minutes after the call and expires after 6 months: download the files to keep them.
Include post-call updates: off Sent as soon as the call ends, with notes and tags added during the call.
Include post-call updates: on Sent 5 minutes after the call, with notes and tags added or changed during the call and in the following 5 minutes.

Field details: call webhook documentation.

SMS webhook

Sent immediately for each SMS sent or received, with no later update. It contains:

  • the member (name, email, Onoff number) and the external number;
  • the contact's name, email and company, if saved in the member's Onoff contacts;
  • the date, time, direction (sent or received) and message text.

What your server must do

  • Reply 200 OK quickly: Onoff waits at most 1 second to connect and 10 seconds for the response.
  • On error, Onoff retries 4 times. After the last failure, the event is lost.
  • Each event has a unique ID: use it to ignore duplicates.
  • Check the API key on every request.
  • Some fields (contact, notes, tags, voicemail, recording) are only sent if they exist: your code must handle their absence.

Remove a webhook

  1. Open Integrations & API, then the webhook, Settings tab.
  2. Under "Remove this integration", click Remove and confirm.

No more data is sent. Data already received stays on your server. You can reinstall the webhook at any time.

Related articles

  • Record your calls
  • Zapier: automate your calls and SMS
  • Connect your CRM to Onoff Business

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.