Net2phone Webhook API Specification

Net2phone Webhook API Specification

net2phone Webhook API Specification

Webhooks give you the ability to receive a structured payload of data at the URL of your choice when certain events occur. To get started, set up a URL to receive events, then register it in net2phone.

Setup: Log into app.net2phone.com and go to Settings › API Integration. Turn on the API integration and enter the URL where you want webhook events sent.

call_ringing

A call is ringing. Triggers when an incoming call is ringing on any phone number in your net2phone account, or when an outgoing call is ringing its destination.

inbound & outbound

Payload

FieldDescription
idString that is unique per message.
event"call_ringing"
timestampUTC timestamp of the event.
directionOne of inbound, outbound. Inbound is a call ringing on a net2phone line. Outbound is a call made from a net2phone line.
originating_numberThe number that started the phone call.
dialed_numberThe recipient of the phone call.
user_nameThe full display name of the Unite user who originated or received the call.

Example

{
"id": "c998e523-3750-4ff4-9eac-76af1dc360b1",
"event": "call_ringing",
"timestamp": "2019-09-15T12:44:22Z",
"direction": "inbound",
"originating_number": "+15551112222",
"dialed_number": "+17778885555",
"user_name": "John Doe"
}

call_answered

A call is answered. Triggers when an incoming call is answered on any phone number in your net2phone account, or when an outgoing call is answered by its destination.

inbound & outbound

Payload

FieldDescription
idString that is unique per message.
event"call_answered"
timestampUTC timestamp of the event.
directionOne of inbound, outbound. Inbound is a call answered on a net2phone line. Outbound is an answered call made from a net2phone line.
originating_numberThe number that started the phone call.
dialed_numberThe recipient of the phone call.
user_nameThe full display name of the Unite user who originated or received the call.

Example

{
"id": "c998e523-2750-4ff4-9eac-76af1dc360b2",
"event": "call_answered",
"timestamp": "2019-07-18T12:44:25Z",
"direction": "inbound",
"originating_number": "+15551112222",
"dialed_number": "+17778885555",
"user_name": "John Doe"
}

call_completed

A call is answered and completed successfully. Triggers when an incoming call is completed on any phone number in your net2phone account, or when an outgoing call is completed.

inbound & outbound

Payload

FieldDescription
idString that is unique per message.
event"call_completed"
timestampUTC timestamp of the event.
directionOne of inbound, outbound.
durationThe number of seconds the call lasted. Only set for call_completed events.
recordedtrue if the call was recorded. Only set for call_completed events, and only if true.
originating_numberThe number that started the phone call.
dialed_numberThe recipient of the phone call.
user_nameThe full display name of the Unite user who originated or received the call.

Example

{
"id": "c998e523-2750-4ff4-9eac-76af1dc360b3",
"event": "call_completed",
"timestamp": "2019-09-15T12:45:25Z",
"direction": "inbound",
"duration": 60,
"recorded": "true",
"originating_number": "+15551112222",
"dialed_number": "+17778885555",
"user_name": "John Doe"
}

call_missed

A call is not answered by the recipient. Triggers when an incoming call is not answered by any phone in your net2phone account.

inbound only

Payload

FieldDescription
idString that is unique per message.
event"call_missed"
timestampUTC timestamp of the event.
direction"inbound"
originating_numberThe number that started the phone call.
dialed_numberThe recipient of the phone call.
user_nameThe full display name of the Unite user who originated or received the call.

Example

{
"id": "c998e523-2750-4ff4-9eac-76af1dc360b3",
"event": "call_missed",
"timestamp": "2019-09-15T12:45:25Z",
"direction": "inbound",
"originating_number": "+15551112222",
"dialed_number": "+17778885555",
"user_name": "John Doe"
}

voicemail_received

A voicemail was left for a net2phone user. Triggers when an incoming call is not answered by any phone in your net2phone account and a voicemail is recorded.

inbound only

Payload

FieldDescription
idString that is unique per message.
event"voicemail_received"
timestampUTC timestamp of the event.
direction"inbound"
durationThe number of seconds the voicemail lasted.
originating_numberThe number that started the phone call.
dialed_numberThe recipient of the phone call.
user_nameThe full display name of the Unite user who originated or received the call.

Example

{
"id": "c998e523-2750-4ff4-9eac-76af1dc360b3",
"event": "voicemail_received",
"timestamp": "2019-09-15T12:45:25Z",
"direction": "inbound",
"originating_number": "+15551112222",
"dialed_number": "+17778885555",
"user_name": "John Doe"
}

Glossary

Conventions

  • Client — The client application.
  • All responses are in JSON format.
  • All request parameters are mandatory unless explicitly marked as [optional].
  • Parameter value types are shown as [10|<any number>] — the | symbol means OR. Default values for optional parameters are shown in bold.

HTTP Status Codes

CodeDescription
200OK
201Created
202Accepted (request accepted and queued for execution)
400Bad Request
401Authentication Failure
403Forbidden
404Resource Not Found
405Method Not Allowed
409Conflict
412Precondition Failed
413Request Entity Too Large
500Internal Server Error
501Not Implemented
503Service Unavailable
    • Related Articles

    • Nt2phone webhook setup

      In the following guide, we will take you through the process of configuring webhooks for the net2phone system. These hooks enable you to extract either all or specific data from your phone system and can be activated based on particular actions ...
    • Net2phone using Zapier to integrate your phone system with other apps

      In this guide, we will demonstrate how to utilize Zapier to initiate actions from your net2phone phone system. This method offers an excellent means of creating automation and seamless connections between your phone system and other applications ...
    • Net2phone how to point phone numbers

      In the following guide, we will demonstrate how you can route your phone numbers. Phone numbers can be routed directly to team members' phones, voicemail, or to welcome menus, ring groups, departments, and call queues. Step one would be to login to ...
    • Net2phone how to forward a phone number

      Below, we will provide instructions on how to forward one of your phone numbers to an external phone number. This practice is useful in case of a power outage or if you don't have access to your phones for any reason. You can forward your main phone ...
    • Net2phone how to provision your desk phone

      In the following guide, we will walk you through adding a desk phone to your Net2Phone account and associating it with a user extension. See below for a list of devices available for zero-touch provisioning) Before you begin, please note that if your ...