NAV Navbar
php

Introduction

Base url: https://api.voipzeker.nl/unite/v1

Welcome to the VOIPZeker Unite API! You can use our API to access VOIPZeker Unite API endpoints, which can get data on extensions, phonebooks and download call records.

Rate limiting

Requests that you can send to the Voipzeker API are rate limited. You can send 30 requests in 1 minute. Then, with a response that returns a 429 HTTP error code, your requests will not be answered until the next minute.

Accesstoken expiration

The accesstoken you receive from APP login will expire after an half hour. If the answer returned to you has 90 in the error code, you should use the logintoken to request a new accesstoken from the APP login.

Maximum request size

If the combined size of the request body and headers exceed 20 kB your request will be rejected with "413 payload too large".

Authentication flow diagram

alt text

Authentication

APP provision

POSThttps://api.voipzeker.nl/unite/v1/appprovision

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/appprovision,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'invitationid' => '{INVITATION_ID}'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": {
        "logintoken": "{LOGINTOKEN}"
    }
}

This endpoint makes it possible for 3rd party application to connect with the API.

You can get the initationid from the App provisioning template in the Unite portal. Once you've used the initationid its automatically disabled, to re-use the initationid you have to re-enable the template.

HTTP request

POST https://api.voipzeker.nl/unite/v1/appprovision

Query parameters

Parameter Type Required Description
invitationid string Yes A 6 character string containing numbers and capitals, generated by the Unite App template

APP login

POSThttps://api.voipzeker.nl/unite/v1/appplogin

To login, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/applogin,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'logintoken' => '{LOGINTOKEN}'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": {
        "accesstoken": "{ACCESSTOKEN}"
    }
}

This endpoint uses the logintoken received from the /appprovision to generate a temporary accesstoken. The accesstoken is valid for an half hour, after the expiration you have to call the /applogin again to generate a new accesstoken.

HTTP request

POST https://api.voipzeker.nl/unite/v1/applogin

Query parameters

Parameter Type Required Description
logintoken string Yes A key generated by the /applogin and used for the generation of a temporary accesstoken

Extensions

Get all extensions

POSThttps://api.voipzeker.nl/unite/v1/listextensions
    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/listextensions,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'sortkey' => 'username',
            'pagelimit' => '10',
            'showpage' => '1',
            'stext' => 'VOIPZeker',
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": {
        "itemcount": "6",
        "pagecount": 6,
        "items": [
            {
                "id": "R320000003678734414445",
                "username": "1234*0200",
                "password": "{PASSWORD}",
                "calleridtype": "1",
                "callerid": "31880660550",
                "country": "NL",
                "name": "VOIPZeker B.V.",
                "email": "user@e-mail.nl",
                "exttype": "100",
                "createdate": "2019-11-27 15:34:22",
                "regstatus": 2,
                "callrecordcount": "0",
                "voicemailcount": "0",
                "extno": "1",
                "extno_format": "0200",
                "ri_localipport": "zjp2wni76dze.invalid",
                "ri_localtransport": "WS",
                "ri_remoteipport": "54.37.205.10:39825",
                "ri_remotetransport": "WS",
                "ri_expiresdate": "2020-02-28 09:29:35",
                "ri_registereddate": "2020-02-28 09:19:35"
            }
        ]
    }
}

This endpoint allows you to get a list of all your extensions.

HTTP request

POST https://api.voipzeker.nl/unite/v1/listextensions

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
sortkey string No Sort the data based on this column.
sorttype integer No Sort ascending or descending.
pagelimit integer No Maximum number of results per page
showpage integer No The page number to display
stext string No Search this string in the results.

Valid values of parameters

Parameter Value Range
sortkey id, username, password, extno, calleridtype, callerid, country, name, email, exttype, regstatus. Default value : extno
sorttype 0⇒Ascending 1⇒Descending Default value : 0
pagelimit 0-300 if value is 0 all results are shown
showpage 1-n - Default value : 1

Response messages

Will be added later

Get a specific extension

POSThttps://api.voipzeker.nl/unite/v1/getextension

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/getextension,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken'
            'extensionid' => '$extensionid'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": {
        "id": "R320000003678734414445",
        "username": "1234*0200",
        "password": "{PASSWORD}",
        "calleridtype": "1",
        "callerid": "31880660550",
        "country": "NL",
        "name": "VOIPZeker B.V.",
        "email": "user@e-mail.nl",
        "exttype": "100",
        "createdate": "2019-11-27 15:34:22",
        "regstatus": 2,
        "callrecordcount": "0",
        "voicemailcount": "0",
        "extno": "1",
        "extno_format": "0200",
        "ri_localipport": "zjp2wni76dze.invalid",
        "ri_localtransport": "WS",
        "ri_remoteipport": "54.37.205.10:39825",
        "ri_remotetransport": "WS",
        "ri_expiresdate": "2020-02-28 09:29:35",
        "ri_registereddate": "2020-02-28 09:19:35"
    }
}

This endpoint retrieves the relevant extension information of the customer.

HTTP request

POST https://api.voipzeker.nl/unite/v1/getextension

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionid string Yes The unique ID of the extension, this can be found in the response from /listextensions

Get description of extension status

POSThttps://api.voipzeker.nl/unite/v1/extensionsstatusdescriptions

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/extensionsstatusdescriptions,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',

        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "status_list": {
            "1": "Registered",
            "2": "Offline",
            "3": "Inbound ringing",
            "4": "Outbound ringing",
            "5": "Outbound answered call",
            "6": "Inbound answered call",
            "0": "Never registered"
        }
    }
}

Returns a JSON object with the descriptions belonging to the extension status code

HTTP Request

POST https://api.voipzeker.nl/unite/v1/extensionsstatusdescriptions

Query Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API

Get status of extensions

POSThttps://api.voipzeker.nl/unite/v1/listextensionsstatus

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/listextensionsstatus,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken'
            'extensionids[]' => '$extensionid',
            'extensionids[]' => '$extensionid'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "items": {
            "R320000003678734414445": 2,
            "R320000003679134408446": 2,
            "L280000004518094408485": 2,
            "L280000004527494412494": 2,
            "L280000004527894416494": 2
        },
        "status_list": {
        "1": "Registered",
        "2": "Offline",
        "3": "Inbound ringing",
        "4": "Outbound ringing",
        "5": "Outbound answered call",
        "6": "Inbound answered call",
        "0": "Never registered"
    }
}

This endpoint returns the extension status of all the extensionid's given in the request.

HTTP request

POST https://api.voipzeker.nl/unite/v1/listextensionsstatus

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionids[] array Yes The unique ID of the extension, this can be found in the response from /listextensions

Status list

Get valid properties of extensions

POSThttps://api.voipzeker.nl/unite/v1/getvalidextensionproperties

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/getvalidextensionproperties,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',

        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation successful.",
    "data": {
        "propertiesData": {
            "voicemail_enable": {
                "1": "Voicemail records are kept for inter-tenant calls.",
                "2": "Voicemail records are kept for external calls.",
                "3": "Voicemail records are kept for both internal and external calls.",
                "0": "Voicemail records are not kept for calls."
            },
            "callrecord_inbound": {
                "1": "On incoming calls, records of inter-tenant calls are kept.",
                "2": "Call Records of incoming external calls are kept.",
                "3": "Call records of both internal and external inbound calls are kept.",
                "0": "Call records of incoming calls are not kept."
            },
            "callrecord_outbound": {
                "1": "Call records of outgoing calls are not kept.",
                "2": "On outgoing calls, records of inter-tenant calls are kept.",
                "3": "Call records of outgoing external calls are kept.",
                "0": "Call records of both internal and external outbound calls are kept."
            },
            "disable_anonymous": {
                "1": "Incoming anonymous invocations are not allowed.",
                "0": "Incoming anonymous invocations are allowed."
            },
            "clicktocall_enable": {
                "1": "Enabled",
                "0": "Disabled"
            },
            "disable_hold_music": {
                "1": "Hold music is not played.",
                "0": "Hold music is played."
            },
            "phonebook_tenantview": {
                "1": "Receive Tenant's phonebook information",
                "0": "Does not receive Tenant's phonebook information."
            },
            "cid_external_callerid": {
                "1": "Anonymous",
                "0": "Caller ID"
            },
            "cid_externalrouting_callerid": {
                "2": "Caller ID",
                "3": "Anonymous",
                "0": "From Caller ID"
            },
            "isuser_dnd": {
                "1": "Do not want to be disturbed(DND)",
                "0": "The call is accepted"
            }
        }
    }
}

Returns a JSON object with the descriptions belonging to the extension property settings

HTTP Request

POST https://api.voipzeker.nl/unite/v1/getvalidextensionproperties

Query Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API

Get properties of extensions

POSThttps://api.voipzeker.nl/unite/v1/getextensionproperties

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/getextensionproperties,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken
            'extensionid' => $extensionid
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "extensionproperties": {
            "voicemail_enable": "1",
            "voicemail_email_address": "user@e-mail.nl",
            "callrecord_inbound": "3",
            "callrecord_email_address": "user@e-mail.nl",
            "disable_anonymous": "0",
            "clicktocall_enable": "1",
            "disable_hold_music": "0",
            "phonebook_tenantview": "1",
            "cid_external_callerid": "1",
            "cid_externalrouting_callerid": "2"
        },
        "propertiesData": {
            "voicemail_enable": {
                "1": "Voicemail records are kept for inter-tenant calls.",
                "2": "Voicemail records are kept for external calls.",
                "3": "Voicemail records are kept for both internal and external calls.",
                "0": "Voicemail records are not kept for calls."
            },
            "callrecord_inbound": {
                "1": "On incoming calls, records of inter-tenant calls are kept.",
                "2": "Call Records of incoming external calls are kept.",
                "3": "Call records of both internal and external inbound calls are kept.",
                "0": "Call records of incoming calls are not kept."
            },
            "callrecord_outbound": {
                "1": "Call records of outgoing calls are not kept.",
                "2": "On outgoing calls, records of inter-tenant calls are kept.",
                "3": "Call records of outgoing external calls are kept.",
                "0": "Call records of both internal and external outbound calls are kept."
            },
            "disable_anonymous": {
                "1": "Incoming anonymous invocations are not allowed.",
                "0": "Incoming anonymous invocations are allowed."
            },
            "clicktocall_enable": {
                "1": "Enabled",
                "0": "Disabled"
            },
            "disable_hold_music": {
                "1": "Hold music is not played.",
                "0": "Hold music is played."
            },
            "phonebook_tenantview": {
                "1": "Receive Tenant's phonebook information",
                "0": "Does not receive Tenant's phonebook information."
            },
            "cid_external_callerid": {
                "1": "Anonymous",
                "0": "Caller ID"
            },
            "cid_externalrouting_callerid": {
                "2": "Caller ID",
                "3": "Anonymous",
                "0": "From Caller ID"
            },
            "isuser_dnd": {
                "1": "Do not want to be disturbed(DND)",
                "0": "The call is accepted"
            }
        }
    }
}

This endpoint returns a list of properties for the extension.

HTTP request

POST https://api.voipzeker.nl/unite/v1/getextensionproperties

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionid string Yes The unique ID of the extension, this can be found in the response from /listextensions

Response description

Set extension properties

POSThttps://api.voipzeker.nl/unite/v1/setextensionproperties

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/setextensionproperties,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callrecord_inbound' => $callrecord_inbound,
            'callrecord_outbound' => $callrecord_outbound,
            'callrecord_email_address' => $callrecord_email_address,
            'voicemail_enable' => $voicemail_enable,
            'voicemail_email_address' => $voicemail_email_address,
            'disable_anonymous' => $disable_anonymous,
            'isuser_dnd' => $isuser_dnd,
            'clicktocall_enable' => $clicktocall_enable,
            'disable_hold_music' => $disable_hold_music,
            'max_call_duration' => $max_call_duration,
            'phonebook_tenantview' => $phonebook_tenantview,
            'cid_external_callerid' => $cid_external_callerid,
            'cid_externalrouting_callerid' => $cid_externalrouting_callerid,
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": []
}

This endpoint allows the customer to add, update or delete the properties of the extension.

HTTP request

POST https://api.voipzeker.nl/unite/v1/setextensionproperties

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
voicemail_enable integer No Voicemail is the knowledge of keeping or not keeping records.
voicemail_email_address string No The email address to which the files of the voicemail records are sent. voicemail_enable if value is not 0, it is mandatory. example@example.com
callrecord_inbound integer No The is information for keeping or not keeping the call records of the incoming calls to the extension.
callrecord_outbound integer No information for keeping or not keeping call records of the outgoing calls to the extension. This field can be used for number and extension settings. callrecord_email_address
disable_anonymous string No This property is used to allow/deny anonymous calls to the extension.
clicktocall_enable string No This extension enabled/disabled “click to call”.
disable_hold_music string No When the call is put on hold on this extension, it specifies whether the hold music is played or not played.
phonebook_tenantview string No Specifies the option to get/not get phonebook information belonging to tenant when retrieving the phonebook information for the extension to be provisioned.
cid_external_callerid string No
cid_externalrouting_callerid string No Returns the email address to which the files of the call records are sent.
isuser_dnd integer No “I do not want to be disturbed” information for incoming calls.

Valid Value

Unset extension properties

POSThttps://api.voipzeker.nl/unite/v1/unsetextensionproperties

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/unsetextensionproperties,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callrecord_inbound' => $callrecord_inbound,
            'callrecord_outbound' => $callrecord_outbound,
            'callrecord_email_address' => $callrecord_email_address,
            'voicemail_enable' => $voicemail_enable,
            'voicemail_email_address' => $voicemail_email_address,
            'disable_anonymous' => $disable_anonymous,
            'isuser_dnd' => $isuser_dnd,
            'clicktocall_enable' => $clicktocall_enable,
            'disable_hold_music' => $disable_hold_music,
            'max_call_duration' => $max_call_duration,
            'phonebook_tenantview' => $phonebook_tenantview,
            'cid_external_callerid' => $cid_external_callerid,
            'cid_externalrouting_callerid' => $cid_externalrouting_callerid,
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": []
}

This endpoint allows the customer to add, update or delete the properties of the extension.

HTTP request

POST https://api.voipzeker.nl/unite/v1/unsetextensionproperties

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
voicemail_enable integer No Voicemail is the knowledge of keeping or not keeping records.
voicemail_email_address string No The email address to which the files of the voicemail records are sent. voicemail_enable if value is not 0, it is mandatory. example@example.com
callrecord_inbound integer No The is information for keeping or not keeping the call records of the incoming calls to the extension.
callrecord_outbound integer No information for keeping or not keeping call records of the outgoing calls to the extension. This field can be used for number and extension settings. callrecord_email_address
disable_anonymous string No This property is used to allow/deny anonymous calls to the extension.
clicktocall_enable string No This extension enabled/disabled “click to call”.
disable_hold_music string No When the call is put on hold on this extension, it specifies whether the hold music is played or not played.
phonebook_tenantview string No Specifies the option to get/not get phonebook information belonging to tenant when retrieving the phonebook information for the extension to be provisioned.
cid_external_callerid string No
cid_externalrouting_callerid string No Returns the email address to which the files of the call records are sent.
isuser_dnd integer No “I do not want to be disturbed” information for incoming calls.

Callflow list

Get callrecord list

POSThttps://api.voipzeker.nl/unite/v1/listcallflows

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/listcallflows,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'pagelimit' => '5',
            'showpage' => '1',
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


{
  "status": true,
  "errorCode": 0,
  "message": "Operation Successful.",
  "pagination": {
    "itemcount": "1",
    "pagecount": 1
  },
  "data": [
    {
      "id": "T340000004604840016627",
      "name": "Que test - 030 781 0030",
      "dialplanstatus": 1,
      "didnumbers": [
        {
          "fullnumber": "31307810030",
          "countrycode": "31",
          "areacode": "30",
          "number": "7810030"
        }
      ]
    }
  ]
}

This endpoint allows the customer to list of their call flows.

HTTP request

POST https://api.voipzeker.nl/unite/v1/listcallflows

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
sortkey string No Sort the data based on this value. Value range : id, username, password, extno, calleridtype, callerid, country, name, email, exttype, regstatus Default value : extno
sorttype integer No Sort ascending or descending.
pagelimit integer No Maximum number of results per page
showpage integer No The page number to display

Call records of extensions

Get callrecord list

POSThttps://api.voipzeker.nl/unite/v1/listcallrecords

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/listcallrecords,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'extensionid' => '$extensionid',
            'pagelimit' => '5',
            'showpage' => '1',
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": {
        "itemcount": "116",
        "pagecount": 58,
        "items": [
            {
                "recordtime": "2019-12-03 15:23:42.707233+01",
                "duration": "33",
                "filename": "fcaab2e3b-ddee-424c-b261-45ca986cb202.mp3",
                "from_number": "1234*0002",
                "to_number": "1234*0200",
                "queuename": null,
                "callrecordkey": "fcaab2e3b-ddee-424c-b261-45ca986cb202",
                "filesize": "192456",
                "file_totalpart": 1,
                "file_partsize": 4194304,
                "to_number_formatted": "1234*0200",
                "tonumber_desc": "",
                "tonumber_formats": null
            },
            {
                "recordtime": "2019-12-03 15:22:44.562576+01",
                "duration": "17",
                "filename": "f62b5f862-7b5b-45b0-875d-a407bf982efa.mp3",
                "from_number": "1234*0002",
                "to_number": "1234*0200",
                "queuename": null,
                "callrecordkey": "f62b5f862-7b5b-45b0-875d-a407bf982efa",
                "filesize": "97200",
                "file_totalpart": 1,
                "file_partsize": 4194304,
                "to_number_formatted": "1234*0200",
                "tonumber_desc": "",
                "tonumber_formats": null
            }
        ]
    }
}

This endpoint allows you to list the call records of the extension.

HTTP request

POST https://api.voipzeker.nl/unite/v1/listcallrecords

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionid string Yes The unique ID of the extension, this can be found in the response from /listextensions
sortkey string No Sort the data based on this value. Value range : id, username, password, extno, calleridtype, callerid, country, name, email, exttype, regstatus Default value : extno
sorttype integer No Sort ascending or descending.
pagelimit integer No Maximum number of results per page
showpage integer No The page number to display
stext string No Search this string in the results.

Download callRecord file

POSThttps://api.voipzeker.nl/unite/v1/downloadcallrecord

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/downloadcallrecord,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'callrecordkey' => '$callrecordkey',
            'partition_number' => '$partition_number'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

Sound File

This endpoint gives the data of the desired partition of callrecord sound file as data.

HTTP request

POST https://api.voipzeker.nl/unite/v1/downloadcallrecord

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callrecordkey string Yes Callrecord The ID information of the audio files. Occurs when a callrecord audio file is created. This key can be accessed from the returning data in the Callrecord Listing function.
extensionid string No The unique ID of the extension, this can be found in the response from /listextensions
partition_number integer Yes Starting with 1. All files are devided in partitions, the number of partitions for the file can be found with /listcallrecords

Response

If the values from API are successful, the data of the file is returned directly. If it is wrong, it returns as JSON. After returning the response value to json_decode, you can access it as an array.

Phonebook

Get all phonebook item

POSThttps://api.voipzeker.nl/unite/v1/listphonebookitems

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/listphonebookitems,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'extensionid' => '$extensionid',
            'pagelimit' => '5',
            'showpage' => '1',
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful."
    "pagination":{
      "itemcount": "34",    
      "itemcount": "1"    
    },
    "data": [
        {
            "id": "P310000057392932520045",
            "extensionid": "0",
            "name": "",
            "lastname": "",
            "companyname": "VOIPZeker",
            "phonenumbertype": "0",
            "phonenumber": "31880660550",
            "phonenumber_formats": {
                "CountryID": "NL",
                "CountryCode": 31,
                "National": "088 066 0550",
                "International": "+31 88 066 0550",
                "E164": "+31880660550",
                "RFC3966": "tel:+31-88-066-0550",
                "ITU": "31880660550",
                "NumberType": "UAN",
                "isValidNumber": 1,
                "isValidShortNumber": 0,
                "Carrier": "",
                "Location_EN": "",
                "Location_NL": "Nederland"
            },
            "phonenumber_formatted": "088 066 0550"
        },
        {
            "id": "P310000057392932520045",
            "extensionid": "0",
            "name": "",
            "lastname": "",
            "companyname": "VOIPZeker",
            "phonenumbertype": "0",
            "phonenumber": "31880660550",
            "phonenumber_formats": {
                "CountryID": "NL",
                "CountryCode": 31,
                "National": "088 066 0550",
                "International": "+31 88 066 0550",
                "E164": "+31880660550",
                "RFC3966": "tel:+31-88-066-0550",
                "ITU": "31880660550",
                "NumberType": "UAN",
                "isValidNumber": 1,
                "isValidShortNumber": 0,
                "Carrier": "",
                "Location_EN": "",
                "Location_NL": "Nederland"
            },
            "phonenumber_formatted": "088 066 0550"
        }
    ]
}

Returns a JSON object with the entire phonebook contents, including advanced number formatting and normalization.

HTTP request

POST https://api.voipzeker.nl/unite/v1/listphonebookitems

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
sortkey string No Sort the data based on this value. Value range : id, username, password, extno, calleridtype, callerid, country, name, email, exttype, regstatus Default value : extno
sorttype integer No Sort ascending or descending.
pagelimit integer No Maximum number of results per page
showpage integer No The page number to display
stext string No Search this string in the results.

Get a specific phonebook item

POSThttps://api.voipzeker.nl/unite/v1/getphonebookitem

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/getphonebookitem,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'extensionid' => '$extensionid',
            'itemid' => '$itemid',
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": {
        "id": "P310000057392932520045",
        "extensionid": "0",
        "name": "",
        "lastname": "",
        "companyname": "VOIPZeker",
        "phonenumbertype": "0",
        "phonenumber": "31880660550",
        "phonenumber_formats": {
            "CountryID": "NL",
            "CountryCode": 31,
            "National": "088 066 0550",
            "International": "+31 88 066 0550",
            "E164": "+31880660550",
            "RFC3966": "tel:+31-88-066-0550",
            "ITU": "31880660550",
            "NumberType": "UAN",
            "isValidNumber": 1,
            "isValidShortNumber": 0,
            "Carrier": "",
            "Location_EN": "",
            "Location_NL": "Nederland"
        },
        "phonenumber_formatted": "088 066 0550"
        }
}

Returns a JSON object with a single phonebook item, including advanced number formatting and normalization.

HTTP request

POST https://api.voipzeker.nl/unite/v1/getphonebookitem

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionid string No The unique ID of the extension, this can be found in the response from /listextensions
itemid string No The ID of the phonebook entry, this can be found in the response from /listphonebookitems

Create a phonebook item

POSThttps://api.voipzeker.nl/unite/v1/newphonebookitem

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/newphonebookitem,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'extensionid' => '$extensionid',
            'name' => '$name',
            'lastname' => '$lastname',
            'companyname' => '$companyname',
            'phonenumbertype' => '$phonenumbertype',
            'phonenumber' => '$phonenumber'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": []
}

Add a new item to the phonebook. Either the name & lastname combination or the company name is required, both may be given.

HTTP Request

POST https://api.voipzeker.nl/unite/v1/newphonebookitem

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionid string No The unique ID of the extension, this can be found in the response from /listextensions
name string Yes The first name of the contact
lastname string Yes The last name of the contact
companyname string Yes The company name of the contact
phonenumbertype integer Yes The phonenumber type of the contact
phonenumber integer Yes The phonenumber to be stored, cannot start with a 0 (zero)

Update phonebook item

POSThttps://api.voipzeker.nl/unite/v1/updatephonebookitem

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/updatephonebookitem,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'extensionid' => '$extensionid',
            'itemid' => '$itemid',
            'name' => '$name',
            'lastname' => '$lastname',
            'companyname' => '$companyname',
            'phonenumbertype' => '$phonenumbertype',
            'phonenumber' => '$phonenumber'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": []
}

Update an existing item in the phonebook. Either the name & lastname combination or the company name is required, both may be given.

HTTP request

POST https://api.voipzeker.nl/unite/v1/updatephonebookitem

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionid string No The unique ID of the extension, this can be found in the response from /listextensions
itemid string Yes The item id of a contact, this can be found in the response from /listextensions
name string Yes The first name of the contact
lastname string Yes The last name of the contact
companyname string Yes The company name of the contact
phonenumbertype integer Yes The phonenumber type of the contact
phonenumber string Yes The phonenumber to be stored, cannot start with a 0 (zero)

Delete phonebook item

POSThttps://api.voipzeker.nl/unite/v1/deletephonebookitem

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/deletephonebookitem,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'extensionid' => '$extensionid',
            'itemids[]' => '$itemids',
            'deletetype' => '$deletetype',
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "message": "Operation Successful.",
    "data": []
}

Remove an item from the phonebook.

HTTP Request

POST https://api.voipzeker.nl/unite/v1/deletephonebookitem

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionid string No The unique ID of the extension, this can be found in the response from /listextensions
itemids[] array Yes Required if deletetype is 0. An array of phonebook item id's, these can be found in the response from /listphonebookitems
deletetype integer No 0⇒Selected items, 1⇒All items.

Export CSV phonebook Items

POSThttps://api.voipzeker.nl/unite/v1/exportcsvphonebookitems

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/exportcsvphonebookitems,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'extensionid' => '$extensionid'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

Binary Data

Export all the numbers in the phonebook to a CSV file, returned as binary data.

HTTP request

POST https://api.voipzeker.nl/unite/v1/exportcsvphonebookitems

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionid string Yes The unique ID of the extension, this can be found in the response from /listextensions

Import CSV phonebook items

POSThttps://api.voipzeker.nl/unite/v1/importcsvphonebookitems

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/importcsvphonebookitems,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken',
            'extensionid' => '$extensionid',
            'csv_file' => 'phonebook.csv'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": false,
    "message": "FAILED Details",
    "data": {
        "success_details": [
            {
                "csvrow": 1,
                "value": "31101441444",
                "itemid": "M290000057376990020404",
                "errorcode": 0,
                "errormsg": "Operation Successful."
            },
        ]
        "failed_details": [
            {
                "csvrow": 1204,
                "value": "53528541234",
                "errorcode": 688,
                "errormsg": null
            },
    }   ]
}

Import a CSV file into the phonebook.

HTTP request

POST https://api.voipzeker.nl/unite/v1/importcsvphonebookitems

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
extensionid string Yes The unique ID of the extension, this can be found in the response from /listextensions
csv_file string Yes A base64 encoded CSV file

Download phonebook items

POSThttps://api.voipzeker.nl/unite/v1/downloadphonebookdata

To provisioning, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/downloadphonebookdata,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HEADER => true,
    CURLOPT_HTTPHEADER => [
        "If-Modified-Since: ".$last_modified,
        "Request-Max-Age: ".$http_request_max_age
    ],
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => '$accesstoken'
        ]),
    ]);

    $response = curl_exec($curlHandler);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": [
        {
            "id": "L280000086960873718728",
            "extensionid": "0",
            "name": "",
            "lastname": "",
            "companyname": "VOIPZeker",
            "phonenumbertype": "0",
            "phonenumber": "31880660550",
            "phonenumber_formats": {
                "CountryID": "NL",
                "CountryCode": 31,
                "National": "088 066 0550",
                "International": "+31 88 066 0550",
                "E164": "+31880660550",
                "RFC3966": "tel:+31-88-066-0550",
                "ITU": "31880660550",
                "NumberType": "UAN",
                "isValidNumber": 1,
                "isValidShortNumber": 0,
                "Carrier": "",
                "Location_EN": "",
                "Location_NL": "Nederland"
            },
            "phonenumber_formatted": "088 066 0550"
        }
    ]
}

Downloads all phonebook in json format.

HTTP request

POST https://api.voipzeker.nl/unite/v1/downloadphonebookdata

Response header parameters

Parameter Type Description
last-modified int
cache-control string max-age-17200,private

Request header parameters

Parameter Type Required Description
if-modified-since date No
HTTP-Request-Max-Age integer No

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API

Click 2 Call

Make a call

POSThttps://api.voipzeker.nl/unite/v1/callnumber

To make a call, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/callnumber,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'username' => $username,
            'call_number' => $call_number
        ]),
    ]);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": []
}

HTTP request

POST https://api.voipzeker.nl/unite/v1/callnumber

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
username string Yes The username of the extension, this can be found in the response from /listextensions
call_number integer Yes The number that should be dialed after the extension (extensionid) answers the phone.

App Template

Set settings

POSThttps://api.voipzeker.nl/unite/v1/setapptemplatesettings

To set settings, use this code:


    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
    CURLOPT_URL =>  https://api.voipzeker.nl/unite/v1/setapptemplatesettings,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'webhook_url' => $webhook_url
        ]),
    ]);

    curl_close($curlHandler);
    print_r( json_decode($response) );


The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": []
}

HTTP request

POST https://api.voipzeker.nl/unite/v1/setapptemplatesettings

Query parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
webhook_url string No Webhook url url encode

VOIPZeker Custom Error codes

The VOIPZeker API uses the following error codes:

Error Code Meaning
0 Operation successfull.
1 The endpoint you want to reach is not allowed
90 Access token value renew
21 Invalid Access Token
100 User Verified Error
107 API User & TenantID & ExtensionID mismatch

HTTP Error Codes

The VOIPZeker API uses the following HTTP error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The endpoint requested is hidden for administrators only.
404 Not Found -- The specified endpoint could not be found.
413 Payload too large -- Header and body of your request is too large
429 Too Many Requests -- You're requesting too many! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
php