Skip to main content

Webhooks

Updated over 2 weeks ago

If you need information to be automatically sent directly to your own systems, diio allows you to enable webhooks.
Below is a step-by-step guide on how to configure webhooks inside diio.


1. Access Webhooks Settings

As an account administrator, go to:

Company Settings → Integrations → Webhooks


2. Click “New Webhook”

This is the webhook validation step.
diio will make a GET request to the endpoint you define, to verify that the endpoint exists and is already developed and ready to receive messages.

Your endpoint must respond in plain text with the value included in the echo_string parameter, following this format:

[GET] https://tuendpoint.com/webhook?echo_string=:valor_a_retornar

Once validated successfully, you will see the webhook listed below.

3. Viewing and Using the Signing Secret

Click the eye icon to see the signing_secret.
All webhook requests sent by diio are signed using this value and included in the header called “DO-Signature”, along with a timestamp (DO-Timestamp).

To verify that the request really comes from diio, you must calculate and compare the signature using SHA256 and the signing_secret, as shown in this pseudocode:

sign = "<webhook_object_id>-<header[DO-Timestamp]>"
header[DO-Signature] == OpenSSL::HMAC.hexdigest('sha256', context.webhook.signing_secret, sign)

If the signature matches, you can confirm the request is from diio.


4. Subscribing to Events

Click the pencil icon to open event settings.

Choose the specific events you want to subscribe to, then click Save.


5. Receiving Event Notifications

Once your webhook is active and pointing to your chosen URL, every time a subscribed event occurs, you’ll receive a POST request with a JSON payload.

Below are examples of webhook payloads for different objects and statuses.


📄 Meeting Object

Meeting In Progress

{

"action": "meeting.in_progress",

"id":"7b292f4a-90a1-11ef-9462-0a0ddbb5e2f5",

"name":"Reunión de Ejemplo",

"scheduled_at":"2024-10-22T18:15:00+0000",

"attendees_tracker":[

{

"join":"2024-10-22T18:15:20.875118Z",

"name":"John Doe",

"is_host":true

},

{

"join":"2024-10-22T18:15:25.224451Z",

"name":"Jane Doe",

"is_host":false

},

{

"join":"2024-10-22T18:17:17.893408Z",

"name":"Aline",

"is_host":false

}

],

"analyzed_status":"in_progress",

"error_cause":null

}

Meeting Pending

{

"action": "meeting.pending",

"id":"0a0081fc-92f8-11ef-8818-06c15ad63b85",

"name":"Reunión de Ejemplo",

"scheduled_at":"2024-10-25T19:15:00+0000",

"attendees_tracker":[],

"analyzed_status":"pending",

"error_cause":null

}

Meeting Finished

{

"id":"415b1e52-bc8b-11ef-94d3-06c15ad63b85",

"name":"Meeting name",

"scheduled_at":"2024-12-17T15:30:00Z",

...

"action":"meeting.finished"

}

Meeting with Error

{

"action": "meeting.error",

"id": "0bfe242e-d5b5-11ee-8141-06d5ade5f257",

"name": "Reunión de ejemplo",

"scheduled_at": "2024-12-11T18:30:00+0000",

"attendees_tracker": [],

"analyzed_status": "error",

"error_cause": "without_external_participants"

}

Possible Meeting Error Causes:

without_start_time

recurring_event

without_external_participants

meeting_without_conference_url

too_many_sellers

user_without_seat

bot_errored

bot_errored_by_platform

bot_cant_enter_meeting

no_participants_or_host

bot_not_accepted

recording_permission_denied

couldnt_download_video

couldnt_be_transcribed

blank_transcript

transcript_too_short

couldnt_find_playbook

meeting_already_started_or_ended

meeting_manually_deactivated

☎ Phone Call Object

Call In Progress

{
"action": "phone_call.in_progress",
"id":"e8f7ce04-8fee-11ef-9c1e-0a0ddbb5e2f5",
"name":"Llamada de Prueba",
"ocurred_at":"2024-10-21T20:26:18+0000",
"analyzed_status":"in_progress",
"error_cause": null
}

Call Pending

{
"action": "phone_call.pending",
...
}

Call with Error

{
"action": "phone_call.error",
"error_cause": "voicemail"
}

Possible Call Error Causes:

couldnt_download_audio
couldnt_be_transcribed
blank_transcript
transcript_too_short
couldnt_find_playbook
voicemail
wrong_number
rejected
reschedule_request

💬 Conversation Object (WhatsApp, etc.)

Processed Conversation

{
"id":"3c0bbb2e-90a7-11ef-9df3-0a0ddbb5e2f5",
"integration_type": "WhatsappConversation",
...
}

💬 Message Object

Incoming Message (from contact)

{
"id": "...",
"message_type": "message-in",
...
}

Outgoing Message (to contact)

{
"id": "...",
"message_type": "message-out",
...
}

If you need help configuring, testing, or validating webhook responses, contact diio support.

Did this answer your question?