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.

Requests and responses

All endpoints are called with POST over HTTPS. Send the parameters as form fields (application/x-www-form-urlencoded, or multipart/form-data for file uploads) or as a JSON body (Content-Type: application/json). Unless stated otherwise the answer is a JSON object with status (true or false), errorCode, message and data.

Rate limiting

Requests are rate limited per IP address and per endpoint: 30 requests per minute for each endpoint, and 10 per minute for /appprovision and /applogin. The responses contain the X-RateLimit-Limit and X-RateLimit-Remaining headers. When the limit is reached the API answers with HTTP 429 and a Retry-After header (seconds) until the minute has passed.

Accesstoken expiration

The accesstoken you receive from APP login expires after half an hour. When an answer has errorCode 90 (HTTP 401), use the logintoken to request a new accesstoken from APP login.

Maximum request size

Requests with a body larger than 12 kB are rejected with HTTP 413 (Request too large). CSV files uploaded to /importcsvphonebookitems may be up to 1 MB.

Authentication flow diagram

alt text

Authentication

APP provision

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

To provision, 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);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

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

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

If provisioning fails the answer is HTTP 400 with the reason in message, for example Provision disabled (the invitationid was used already) or This IP address is not whitelisted (the IP whitelist of the app template does not contain your IP address).

HTTP request

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

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/applogin

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);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "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

Parameters

Parameter Type Required Description
logintoken string Yes The logintoken returned by /appprovision, used to generate 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,
            'pagelimit' => 10,
            'showpage' => 1,
            'stext' => 'VOIPZeker',
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
sorttype integer No Sort ascending or descending. 0⇒Ascending 1⇒Descending
pagelimit integer No Maximum number of results per page, 0-300. If the value is 0 all results are shown
showpage integer No The page number to display, 1-n. Default value : 1
stext string No Search this string in the results.

Valid values of parameters

Parameter Value Range
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

Only the extensions allowed in the app template are returned. When the app template has no extensions the answer is successful with an empty data list.

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);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "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

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

    $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);
    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

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' => [$extensionid1, $extensionid2],
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "items": {
            "R320000003678734414445": 1,
            "R320000003679134408446": 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. Extensions the app template is not allowed to see are left out.

HTTP request

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

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

    $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);
    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

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);
    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

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

The meaning of each value is returned by /getvalidextensionproperties.

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,
            'extensionid' => $extensionid,
            'voicemail_enable' => $voicemail_enable, // Send only the properties you want to change
            'voicemail_email_address' => $voicemail_email_address,
            'callrecord_inbound' => $callrecord_inbound,
            'callrecord_outbound' => $callrecord_outbound,
            'callrecord_email_address' => $callrecord_email_address,
            'disable_anonymous' => $disable_anonymous,
            'isuser_dnd' => $isuser_dnd,
            'clicktocall_enable' => $clicktocall_enable,
            'disable_hold_music' => $disable_hold_music,
            'phonebook_tenantview' => $phonebook_tenantview,
            'cid_external_callerid' => $cid_external_callerid,
            'cid_externalrouting_callerid' => $cid_externalrouting_callerid,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

Sets the given properties of the extension. Properties that are not sent are left unchanged; use /unsetextensionproperties to remove a property.

HTTP request

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

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
voicemail_enable integer No Which calls are kept as voicemail, 0-3.
voicemail_email_address string No The e-mail address the voicemail recordings are sent to.
callrecord_inbound integer No Which incoming calls are recorded, 0-3.
callrecord_outbound integer No Which outgoing calls are recorded, 0-3.
callrecord_email_address string No The e-mail address the call recordings are sent to.
disable_anonymous integer No 1⇒Incoming anonymous calls are not allowed 0⇒allowed
isuser_dnd integer No Do not disturb for incoming calls. 1⇒On 0⇒Off
clicktocall_enable integer No Click to call. 1⇒Enabled 0⇒Disabled
disable_hold_music integer No 1⇒Hold music is not played 0⇒Hold music is played
phonebook_tenantview integer No 1⇒The extension also receives the phonebook of the tenant 0⇒only its own phonebook
cid_external_callerid integer No Caller ID on external calls. 0⇒Caller ID 1⇒Anonymous
cid_externalrouting_callerid integer No Caller ID on externally routed calls. 0⇒From Caller ID 2⇒Caller ID 3⇒Anonymous

Valid values

Parameter Value Range
voicemail_enable, callrecord_inbound, callrecord_outbound 0, 1, 2 or 3
disable_anonymous, isuser_dnd, clicktocall_enable, disable_hold_music, phonebook_tenantview, cid_external_callerid 0 or 1
cid_externalrouting_callerid 0, 2 or 3
voicemail_email_address, callrecord_email_address A valid e-mail address

The meaning of each value is returned by /getvalidextensionproperties.

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,
            'extensionid' => $extensionid,
            'voicemail_email_address' => 'user@e-mail.nl', // The properties to remove; any valid value
            'disable_hold_music' => 1,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

Removes the given properties from the extension, so they fall back to their default. Send each property you want to remove; its value is not used.

HTTP request

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

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
voicemail_enable integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
voicemail_email_address string No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
callrecord_inbound integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
callrecord_outbound integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
callrecord_email_address string No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
disable_anonymous integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
isuser_dnd integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
clicktocall_enable integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
disable_hold_music integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
phonebook_tenantview integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
cid_external_callerid integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.
cid_externalrouting_callerid integer No Send this parameter to remove the property. The value is not used, but it has to be a valid value.

Callflow

Get call flow 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);
    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 - 088 066 0550",
      "dialplanstatus": 1,
      "didnumbers": [
        {
          "fullnumber": "31880660550",
          "countrycode": "31",
          "areacode": "88",
          "number": "0660550"
        }
      ]
    }
  ]
}

This endpoint lists the call flows of the customer. Only the call flows allowed in the app template are returned.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
sorttype integer No Sort ascending or descending. 0⇒Ascending 1⇒Descending
pagelimit integer No Maximum number of results per page, 0-300. If the value is 0 all results are shown
showpage integer No The page number to display, 1-n. Default value : 1

Get DID number list

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

    $curlHandler = curl_init();

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

    $response = curl_exec($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": [
    {
      "fullnumber": "31880660550",
      "countrycode": "31",
      "areacode": "88",
      "number": "0660550",
      "phonenumber_formatted": "088 066 0550",
      "callflowid": "T340000004604840016627",
      "callflowname": "Que test - 088 066 0550"
    }
  ]
}

This endpoint lists the DID numbers of the customer that the app can use: the numbers of the call flows allowed in the app template and the numbers that are not attached to a call flow. A number that is attached to a call flow which is not allowed in the app template is not returned.

callflowid is the id of the call flow of the number (the id of /listcallflows), 0 when the number is not attached to a call flow. Use fullnumber to attach the number with /attachdidnumberstocallflow or to detach it with /detachdidnumbersfromcallflow.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callflowid string No Only return the numbers of this call flow (the id from /listcallflows). 0⇒Only the numbers that are not attached to a call flow. The call flow must be allowed in the app template
stext string No Only return the numbers that contain this text, for example 066055. The number can also be searched in the national (0880660550) or international (+31 88 066 0550) format
sortkey string No The field to sort by. Value range: fullnumber, callflowid, callflowname Default value: fullnumber
sorttype integer No Sort ascending or descending. 0⇒Ascending 1⇒Descending
pagelimit integer No Maximum number of results per page, 0-300. If the value is 0 all results are shown
showpage integer No The page number to display, 1-n. Default value : 1

Response

Field Description
fullnumber The number in international format without + or 00, for example 31880660550
countrycode, areacode, number The parts of fullnumber
phonenumber_formatted The number formatted for display
callflowid The id of the call flow of the number, 0 when the number is not attached to a call flow
callflowname The name of the call flow of the number, empty when the number is not attached to a call flow

Attach DID numbers to a callflow

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


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

When a number is refused, no number is changed and the refused numbers are returned (HTTP 404):


{
  "status": false,
  "errorCode": 465,
  "message": "DID Number not found",
  "data": {
    "didnumbers": [
      "31880660550"
    ]
  }
}

This endpoint attaches DID numbers of the customer to a call flow, so that the call flow handles the incoming calls to these numbers. The call flow must be allowed in the app template. A number that is not attached to a call flow is attached to it, a number that is attached to another call flow is moved to it. A number can only be moved from a call flow that is allowed in the app template as well. A number that is already attached to the call flow is accepted.

All numbers are attached or none: when one of the numbers is refused, no number is changed and the refused numbers are returned in data.didnumbers, as they were sent. When numbers are refused for different reasons, only the first reason is returned (465 before 466). On success data.didnumbers lists the attached numbers in the fullnumber format of /listdidnumbers.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callflowid string Yes The id of the call flow (the id from /listcallflows)
didnumbers[] array of strings Yes The numbers to attach, 1-100 numbers of at most 20 characters. Send the fullnumber from /listdidnumbers (31880660550); the international (+31 88 066 0550) and the national (088 066 0550) format are accepted too. In a JSON body send an array of strings

Errors

HTTP errorCode Meaning
400 0 A parameter is missing or invalid, see message
400 6 Bad request: a number has an invalid format or the callflowid is invalid
400 456 The callflowid is the id of an extension, not of a call flow
401 107 The call flow does not exist or it is not allowed in the app template
403 466 The number is attached to a call flow that is not allowed in the app template. data.didnumbers lists these numbers
404 465 The number is not a number of the customer. data.didnumbers lists these numbers

Detach DID numbers from a callflow

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


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

This endpoint detaches DID numbers from a call flow. The numbers are then not attached to a call flow anymore (callflowid 0 in /listdidnumbers) and can be attached to a call flow again with /attachdidnumberstocallflow. The call flow must be allowed in the app template and every number must be attached to this call flow.

All numbers are detached or none: when one of the numbers is refused, no number is changed and the refused numbers are returned in data.didnumbers, as they were sent. When numbers are refused for different reasons, only the first reason is returned (465 before 467). On success data.didnumbers lists the detached numbers in the fullnumber format of /listdidnumbers.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callflowid string Yes The id of the call flow the numbers are attached to (the id from /listcallflows)
didnumbers[] array of strings Yes The numbers to detach, 1-100 numbers of at most 20 characters. Send the fullnumber from /listdidnumbers (31880660550); the international (+31 88 066 0550) and the national (088 066 0550) format are accepted too. In a JSON body send an array of strings

Errors

HTTP errorCode Meaning
400 0 A parameter is missing or invalid, see message
400 6 Bad request: a number has an invalid format or the callflowid is invalid
400 456 The callflowid is the id of an extension, not of a call flow
401 107 The call flow does not exist or it is not allowed in the app template
404 465 The number is not a number of the customer. data.didnumbers lists these numbers
409 467 The number is not attached to this call flow (it is attached to another call flow or to no call flow). data.didnumbers lists these numbers

Call records of extensions

Get callrecord list

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

    $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);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "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*0200",
                "to_number": "0880660550",
                "call_uuid": "7c2d61a4-3b9e-4f0e-9a51-2d0c8e4b1f73",
                "queuename": null,
                "callrecordkey": "fcaab2e3b-ddee-424c-b261-45ca986cb202",
                "filesize": "192456",
                "file_totalpart": 1,
                "file_partsize": 4194304,
                "from_number_formatted": "0200",
                "fromnumber_desc": "",
                "fromnumber_formats": {
                    "owner_country": "NL"
                },
                "to_number_formatted": "088 066 0550",
                "tonumber_desc": "",
                "tonumber_formats": {
                    "CountryID": "NL",
                    "National": "088 066 0550",
                    "International": "+31 88 066 0550",
                    "ITU": "31880660550",
                    "isValidNumber": 1,
                    "owner_country": "NL"
                },
                "from_callerid": "31880660550",
                "from_callerid_formatted": "088 066 0550",
                "from_callerid_formats": {
                    "CountryID": "NL",
                    "National": "088 066 0550",
                    "International": "+31 88 066 0550",
                    "ITU": "31880660550",
                    "isValidNumber": 1,
                    "owner_country": "NL"
                }
            }
        ]
    }
}

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

call_uuid is the call id of the call leg that was recorded. It is one of the call_uuids of the call returned by /listcdrlogs, so you can find the call record of a call log. Call records made before this field was introduced have call_uuid null.

HTTP request

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

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
sorttype integer No Sort ascending or descending. 0⇒Ascending 1⇒Descending
pagelimit integer No Maximum number of results per page, 0-300. If the value is 0 all results are shown
showpage integer No The page number to display, 1-n. Default value : 1
stext string No Search this string in the results.
long_numberformats_enable integer No Format the numbers in full. 0⇒Short format 1⇒Full format Default value : 0
call_uuidlist[] array No Only return the call records whose call_uuid is in this list. Send the call_uuids of the calls returned by /listcdrlogs. Mind the request body limit of 12 kB (about 200 values per request).

Download callRecord file

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

    $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,
            'extensionid' => $extensionid,
            'callrecordkey' => $callrecordkey,
            'partition_number' => 1,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    if( curl_getinfo($curlHandler, CURLINFO_RESPONSE_CODE) == 200 ){
        file_put_contents('callrecord.mp3', $response); // empty after the last part
    } else {
        print_r( json_decode($response) ); // the error
    }

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

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
callrecordkey string Yes The ID of the call record, this can be found in the response from /listcallrecords
partition_number integer Yes Starting with 1. Files are divided into parts of file_partsize bytes; file_totalpart in the response from /listcallrecords gives the number of parts
file_name string No The file name in the Content-Disposition header; .mp3 is added when missing. Default value : Call_Record_YYYY-MM-DD.mp3

Response

On success the requested part of the MP3 file is returned (HTTP 200, Content-Type: application/octet-stream, Content-Disposition: attachment). A partition_number after the last part returns an empty body. On failure the answer is JSON with status false and an HTTP error code: 401 for an invalid or expired accesstoken or an extension that is not allowed, 400 for invalid input, 403 when the function is not allowed and 404 when the file does not exist.

Voicemails of extensions

Get voicemail list

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "itemcount": "8",
        "pagecount": 4,
        "items": [
            {
                "recordtime": "2019-12-03 15:23:42.707233+01",
                "from_number": "1234*0002",
                "duration": "33",
                "filename": "fcaab2e3b-ddee-424c-b261-45ca986cb202.mp3",
                "to_number": "1234*0200",
                "voicemailkey": "fcaab2e3b-ddee-424c-b261-45ca986cb202",
                "filesize": "192456",
                "file_totalpart": 1,
                "file_partsize": 4194304,
                "from_number_formatted": "0002",
                "fromnumber_desc": "",
                "fromnumber_formats": {
                    "owner_country": "NL"
                }
            }
        ]
    }
}

This endpoint allows you to list the voicemails of the extension.

HTTP request

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

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
sorttype integer No Sort ascending or descending. 0⇒Ascending 1⇒Descending
pagelimit integer No Maximum number of results per page, 0-300. If the value is 0 all results are shown
showpage integer No The page number to display, 1-n. Default value : 1

Download voicemail file

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    if( curl_getinfo($curlHandler, CURLINFO_RESPONSE_CODE) == 200 ){
        file_put_contents('voicemail.mp3', $response); // empty after the last part
    } else {
        print_r( json_decode($response) ); // the error
    }

The above command returns JSON structured like this:

Sound File

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

HTTP request

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

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
voicemailkey string Yes The ID of the voicemail, this can be found in the response from /listvoicemails
partition_number integer Yes Starting with 1. Files are divided into parts of file_partsize bytes; file_totalpart in the response from /listvoicemails gives the number of parts
file_name string No The file name in the Content-Disposition header; .mp3 is added when missing. Default value : Voicemail_YYYY-MM-DD.mp3

Response

On success the requested part of the MP3 file is returned (HTTP 200, Content-Type: application/octet-stream, Content-Disposition: attachment). A partition_number after the last part returns an empty body. On failure the answer is JSON with status false and an HTTP error code: 401 for an invalid or expired accesstoken or an extension that is not allowed, 400 for invalid input, 403 when the function is not allowed and 404 when the file does not exist.

Phonebook

Get all phonebook item

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

    $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,
            'pagelimit' => 5,
            'showpage' => 1,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "pagination": {
        "itemcount": "34",
        "pagecount": 7
    },
    "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 the entire phonebook contents, including advanced number formatting and normalization.

HTTP request

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

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 an extension (from /listextensions) to use its personal phonebook. Without it the shared phonebook of the tenant is used.
sortkey string No Sort the data based on this value. Value range : id, name, lastname, companyname, phonenumber Default value : id
sorttype integer No Sort ascending or descending. 0⇒Ascending 1⇒Descending
pagelimit integer No Maximum number of results per page, 0-300. If the value is 0 all results are shown
showpage integer No The page number to display, 1-n. Default value : 1
stext string No Search this string in the results.

Get a specific phonebook item

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

    $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,
            'itemid' => $itemid,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "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

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 an extension (from /listextensions) to use its personal phonebook. Without it the shared phonebook of the tenant is used.
itemid string Yes 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

    $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,
            'name' => $name,
            'lastname' => $lastname,
            'companyname' => $companyname,
            'phonenumbertype' => $phonenumbertype,
            'phonenumber' => $phonenumber,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

Add a new item to the phonebook. On success the answer is HTTP 201; when the phone number already exists it is HTTP 409. 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

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 an extension (from /listextensions) to use its personal phonebook. Without it the shared phonebook of the tenant is used.
name string No* The first name of the contact
lastname string No* The last name of the contact
companyname string No* The company name of the contact. *Either name and lastname, or companyname is required
phonenumbertype integer No The phone number type of the contact, 0 or 1
phonenumber integer Yes The phone number to be stored, digits only and not starting with a 0 (zero), for example 31880660550

Update phonebook item

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

    $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,
            'itemid' => $itemid,
            'name' => $name,
            'lastname' => $lastname,
            'companyname' => $companyname,
            'phonenumbertype' => $phonenumbertype,
            'phonenumber' => $phonenumber,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

Update an existing item in the phonebook. When another item already has the phone number the answer is HTTP 409. 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

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 an extension (from /listextensions) to use its personal phonebook. Without it the shared phonebook of the tenant is used.
itemid string Yes The ID of the phonebook entry, this can be found in the response from /listphonebookitems
name string No* The first name of the contact
lastname string No* The last name of the contact
companyname string No* The company name of the contact. *Either name and lastname, or companyname is required
phonenumbertype integer No The phone number type of the contact, 0 or 1
phonenumber integer Yes The phone number to be stored, digits only and not starting with a 0 (zero), for example 31880660550

Delete phonebook item

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

    $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,
            'itemids' => [$itemid1, $itemid2],
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

Remove an item from the phonebook.

HTTP Request

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

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 an extension (from /listextensions) to use its personal phonebook. Without it the shared phonebook of the tenant is used.
itemids[] array Yes An array of phonebook item IDs, these can be found in the response from /listphonebookitems
deletetype integer No 0⇒The given items (default) 1⇒All items of the phonebook. itemids[] has to be sent in both cases

Export CSV phonebook Items

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

    $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,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    if( curl_getinfo($curlHandler, CURLINFO_RESPONSE_CODE) == 200 && strpos(curl_getinfo($curlHandler, CURLINFO_CONTENT_TYPE), 'text/csv') === 0 ){
        file_put_contents('phonebook.csv', $response);
    } else {
        print_r( json_decode($response) ); // the error
    }

The above command returns JSON structured like this:

Binary Data

Exports the phonebook as a CSV file (HTTP 200, Content-Type: text/csv): UTF-8 with a byte order mark, separated by semicolons, with the columns name;lastname;companyname;phonenumbertype;phonenumber. On failure the answer is JSON with status false.

HTTP request

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

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 an extension (from /listextensions) to use its personal phonebook. Without it the shared phonebook of the tenant is used.

Import CSV phonebook items

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/importcsvphonebookitems',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        // multipart/form-data: pass the array itself, not http_build_query()
        CURLOPT_POSTFIELDS => [
            'accesstoken' => $accesstoken,
            'csv_file' => new CURLFile('phonebook.csv', 'text/csv', 'phonebook.csv'),
        ],
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "success_details": [
            {
                "csvrow": 1,
                "value": "31101441444",
                "itemid": "M290000057376990020404",
                "errorcode": 0,
                "errormsg": "Operation Successful."
            }
        ],
        "failed_details": [
            {
                "csvrow": 2,
                "value": "53528541234",
                "errorcode": 688,
                "errormsg": null
            }
        ]
    }
}

Imports the rows of a CSV file into the phonebook. The rows are added to the phonebook; the existing items are kept. The first row is a header and is skipped. The columns are name, lastname, companyname, phonenumbertype and phonenumber, separated by a comma or a semicolon. The imported rows are listed in success_details, the rejected rows in failed_details.

HTTP request

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

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 an extension (from /listextensions) to use its personal phonebook. Without it the shared phonebook of the tenant is used.
csv_file file Yes The CSV file (.csv, at most 1 MB), uploaded as multipart/form-data

Download phonebook items

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

    $headers = [];
    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/downloadphonebookdata',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_HTTPHEADER => [
            'If-Modified-Since: '.$last_modified, // last-modified of the previous answer, if any
            'Request-Max-Age: 3600',
        ],
        CURLOPT_HEADERFUNCTION => function ($curl, $header) use (&$headers) {
            $parts = explode(':', $header, 2);
            if( count($parts) == 2 ) $headers[strtolower(trim($parts[0]))] = trim($parts[1]);
            return strlen($header);
        },
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    if( curl_getinfo($curlHandler, CURLINFO_RESPONSE_CODE) == 304 ){
        // Not modified, keep using your copy
    } else {
        $last_modified = $headers['last-modified'] ?? '';
        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"
        }
    ]
}

Returns the whole phonebook of the tenant as JSON. The answer can be large, so download it only when it has changed: send the last-modified value of a previous answer as If-Modified-Since, and the API answers HTTP 304 with an empty body when nothing has changed.

HTTP request

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

Response header parameters

Parameter Type Description
last-modified string The time of the last change of the phonebook as an HTTP date, for example Tue, 27 Oct 2026 10:04:20 GMT
cache-control string max-age=<Request-Max-Age>, private

Request header parameters

Parameter Type Required Description
If-Modified-Since HTTP date No The last-modified value of a previous answer. The answer is HTTP 304 without a body when the phonebook has not changed since
Request-Max-Age integer No The number of seconds the answer may be cached, returned as the max-age of Cache-Control. Default value : 1

Parameters

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

Switch

Get all switch items

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "pagination": {
        "itemcount": "2",
        "pagecount": 1
    },
    "data": [
        {
            "switchkey": "260f17e4-d29c-2a31-eb60-f65bd2ada307",
            "tenantid": "N300000003974921616413",
            "switch_no": "1",
            "name": "SwitchName",
            "lang": "nl",
            "state": true
        },
        {
            "switchkey": "130b7e0d-29c3-ae9c-c5ff-32a4c0b98b87",
            "tenantid": "N300000003974921616413",
            "switch_no": "2",
            "name": "SwitchName2",
            "lang": "en",
            "state": false
        }
    ]
}

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

- The switch_no value is the value that will be used with the phone call and will change the switch state value. *30X

HTTP request

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

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: switch_no, name Default value: switch_no
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 switch item

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "switchkey": "260f17e4-d29c-2a31-eb60-f65bd2ada307",
        "switch_no": "1",
        "tenantid": "N300000003974921616413",
        "state": true,
        "lang": "nl",
        "name": "SwitchName"
        }
}

This endpoint retrieves the relevant switch information of the customer.

HTTP request

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

Parameters

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

Create a switch item

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "switchkey": "260f17e4-d29c-2a31-eb60-f65bd2ada307",
        "switch_no": "1"
        }
}

Add a new item to the switch list. The name is required. On success the answer is HTTP 201 with the switchkey and switch_no of the new switch; when the switch already exists it is HTTP 409.

HTTP Request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
name string Yes The name of the switch
lang string No The lang key of the switch. Value range: nl, en Default value: nl
state boolean Yes The state of the switch. 1⇒On 0⇒Off (in a JSON body also true/false)

Update switch item

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/updateswitch',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'switchkey' => $switchkey,
            'name' => $name,
            'lang' => 'en',
            'state' => 0,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

Update an existing item in the switch.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
switchkey string Yes The unique ID of the switch, this can be found in the response from /listswitches
name string No The name of the switch
lang string No The lang key of the switch. Value range: nl, en
state boolean No The state of the switch. 1⇒On 0⇒Off (in a JSON body also true/false)

Delete switch item

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

Remove an item from the switch list. A switch that is still used in a call flow is not removed; the answer then has status false and the message The data you want to delete is being used.

HTTP Request

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

Parameters

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

Call filter

A call filter is a group of numbers. When a call filter is set for the inbound calls of a user, the calls from these numbers to the user are blocked; when it is set for the outbound calls, the calls of the user to these numbers are blocked. The app can only set call filters for the lines and callflows allowed in its app template.

A call filter of type operator is made by the operator: the app can set it for users, but cannot change it. A call filter of type tenant belongs to the customer. The app can change it (editable is true) as long as it is set for no other users than the lines and callflows of the app template. A call filter which is also set for other users, or for all users of the customer, is read-only for the app (errorCode 583).

A number of type external is a number pattern, written the same way as on the Call filter page of the portal. The pattern must match the whole number: X is any digit, [069] is one of the digits in the brackets, . is any further digits, and the digits and + stand for themselves. A pattern may start with +, 00, the country code or 0, for example +31880660550, 0031880660550, 31880660550 or 0880660550 for 088 066 0550. For example 31900. matches every number which starts with 31900, 49XXX. every number which starts with 49 followed by at least three digits, and 31880660550 only this number. A number of type internal is the username of a line or callflow of the app template (from /listextensions), for example 0012*0101.

Every endpoint needs its function in the app template:

Endpoint Function in the app template
/listcallfilters Call filter: list groups
/getcallfilter Call filter: get group
/newcallfilter Call filter: new group
/updatecallfilter Call filter: update group
/deletecallfilter Call filter: delete group
/listcallfilternumbers Call filter: list numbers
/addcallfilternumbers Call filter: add numbers
/deletecallfilternumbers Call filter: delete numbers
/listcallfilterusers Call filter: list users
/setcallfilteruser Call filter: set for a user
/unsetcallfilteruser Call filter: remove from a user

Get call filter list

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


{
  "status": true,
  "errorCode": 0,
  "message": "Operation Successful.",
  "pagination": {
    "itemcount": "2",
    "pagecount": 1
  },
  "data": [
    {
      "callfilterid": "1c9e7b20-4f3d-4a8e-b6d2-73a0f5c81e44",
      "name": "Premium numbers",
      "type": "operator",
      "editable": false,
      "numbercount": 4
    },
    {
      "callfilterid": "5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10",
      "name": "Blocked callers",
      "type": "tenant",
      "editable": true,
      "numbercount": 2
    }
  ]
}

This endpoint lists the call filters the app can use: the call filters of the customer and the call filters of the operator. The call filters of the operator are listed first.

type is tenant for a call filter of the customer and operator for a call filter of the operator. editable tells whether the app may change the call filter (name, numbers, delete), see Call filter. numbercount is the number of numbers of the call filter.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
stext string No Only return the call filters whose name starts with this text
sorttype integer No Sort ascending or descending. 0⇒Ascending 1⇒Descending
pagelimit integer No Maximum number of results per page, 0-300. If the value is 0 all results are shown
showpage integer No The page number to display, 1-n. Default value : 1

Get a call filter

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/getcallfilter',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callfilterid' => '5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10',
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


{
  "status": true,
  "errorCode": 0,
  "message": "Operation Successful.",
  "data": {
    "callfilterid": "5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10",
    "name": "Blocked callers",
    "type": "tenant",
    "editable": true,
    "allusers_inbound": false,
    "allusers_outbound": false
  }
}

This endpoint returns one call filter. allusers_inbound and allusers_outbound are true when the call filter is set for the inbound or outbound calls of all users of the customer. Such a call filter is not editable for the app.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callfilterid string Yes The id of the call filter (the callfilterid from /listcallfilters)

Errors

HTTP errorCode Meaning
404 577 / 578 The call filter does not exist or it is not a call filter of the customer

Create a call filter

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


{
  "status": true,
  "errorCode": 0,
  "message": "Operation Successful.",
  "data": {
    "callfilterid": "5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10"
  }
}

This endpoint creates a call filter of the customer without numbers and users. On success the answer is HTTP 201 with the callfilterid of the new call filter. Add the numbers with /addcallfilternumbers and set the call filter for users with /setcallfilteruser.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
name string Yes The name of the call filter, at most 200 characters

Update a call filter

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/updatecallfilter',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callfilterid' => '5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10',
            'name' => 'Blocked callers (sales)',
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


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

This endpoint renames a call filter of the customer. The call filter must be editable.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callfilterid string Yes The id of the call filter (the callfilterid from /listcallfilters)
name string Yes The new name of the call filter, at most 200 characters

Errors

HTTP errorCode Meaning
404 577 / 578 The call filter does not exist or it is not a call filter of the customer
403 583 The call filter is also set for other users than the lines and callflows of the app template, or for all users, so the app cannot change it

Delete a call filter

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/deletecallfilter',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callfilterid' => '5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10',
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


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

This endpoint deletes a call filter of the customer together with its numbers. A call filter which is set for a user cannot be deleted: remove it from its users with /unsetcallfilteruser first.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callfilterid string Yes The id of the call filter (the callfilterid from /listcallfilters)

Errors

HTTP errorCode Meaning
404 577 / 578 The call filter does not exist or it is not a call filter of the customer
409 580 The call filter is set for a user

Get the numbers of a call filter

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/listcallfilternumbers',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callfilterid' => '5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10',
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


{
  "status": true,
  "errorCode": 0,
  "message": "Operation Successful.",
  "pagination": {
    "itemcount": "2",
    "pagecount": 1
  },
  "data": [
    {
      "number": "31900.",
      "type": "external",
      "description": "Premium numbers"
    },
    {
      "number": "0012*0101",
      "type": "internal",
      "description": ""
    }
  ]
}

This endpoint lists the numbers of a call filter of the customer or of a public call filter of the operator. See Call filter for the meaning of number and type.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callfilterid string Yes The id of the call filter (the callfilterid from /listcallfilters)
stext string No Only return the numbers that start with this text
sorttype integer No Sort ascending or descending. 0⇒Ascending 1⇒Descending
pagelimit integer No Maximum number of results per page, 0-300. If the value is 0 all results are shown
showpage integer No The page number to display, 1-n. Default value : 1

Errors

HTTP errorCode Meaning
404 577 / 578 The call filter does not exist or it is not a call filter of the customer

Add numbers to a call filter

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/addcallfilternumbers',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callfilterid' => '5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10',
            'numbers' => [
                ['number' => '31900.', 'type' => 'external', 'description' => 'Premium numbers'],
                ['number' => '31880660550', 'type' => 'external'],
            ],
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


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

This endpoint adds numbers to a call filter of the customer. The call filter must be editable. All numbers are added or none: when a number is refused, no number is added and data.numbers lists the refused numbers.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callfilterid string Yes The id of the call filter (the callfilterid from /listcallfilters)
numbers[] array of objects Yes 1-100 numbers, each with number (string, at most 40 characters), type (external or internal) and an optional description (at most 100 characters: letters, digits, space and - _ ' & . , * ( ) ). For the number patterns see Call filter

Errors

HTTP errorCode Meaning
404 577 / 578 The call filter does not exist or it is not a call filter of the customer
403 583 The call filter is also set for other users than the lines and callflows of the app template, or for all users, so the app cannot change it
400 575 An internal number is not the username of a line or callflow of the app template. data.numbers lists the refused number
400 584 The [ ] of a number pattern are not closed or contain something else than digits. data.numbers lists these numbers
400 6 A number pattern contains another character than digits, + X . [ ]
409 576 A number is already in the call filter

Delete numbers from a call filter

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/deletecallfilternumbers',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callfilterid' => '5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10',
            'numbers' => ['31900.', '31880660550'],
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


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

This endpoint deletes numbers from a call filter of the customer. The call filter must be editable. Send the numbers as /listcallfilternumbers returns them.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callfilterid string Yes The id of the call filter (the callfilterid from /listcallfilters)
numbers[] array of strings Yes 1-100 numbers to delete, at most 40 characters each

Errors

HTTP errorCode Meaning
404 577 / 578 The call filter does not exist or it is not a call filter of the customer
403 583 The call filter is also set for other users than the lines and callflows of the app template, or for all users, so the app cannot change it
404 11 None of the numbers is in the call filter

Get the users of a call filter

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/listcallfilterusers',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callfilterid' => '5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10',
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


{
  "status": true,
  "errorCode": 0,
  "message": "Operation Successful.",
  "pagination": {
    "itemcount": "2",
    "pagecount": 1
  },
  "data": [
    {
      "extensionid": "V360000004604840016628",
      "name": "Reception",
      "username": "0012*0101",
      "inbound": true,
      "outbound": false
    }
  ]
}

This endpoint lists the lines and callflows of the app template the call filter is set for. inbound and outbound tell for which calls of the user the call filter is set. username is empty for a callflow.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callfilterid string Yes The id of the call filter (the callfilterid from /listcallfilters)
stext string No Only return the users whose name starts with this text
sorttype integer No Sort ascending or descending. 0⇒Ascending 1⇒Descending
pagelimit integer No Maximum number of results per page, 0-300. If the value is 0 all results are shown
showpage integer No The page number to display, 1-n. Default value : 1

Errors

HTTP errorCode Meaning
404 577 / 578 The call filter does not exist or it is not a call filter of the customer

Set a call filter for a user

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/setcallfilteruser',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callfilterid' => '5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10',
            'extensionid' => 'V360000004604840016628',
            'direction' => 'inbound',
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


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

This endpoint sets a call filter for the inbound or the outbound calls of a line or callflow of the app template. A call filter of the operator can be set too. Setting a call filter which is already set is accepted.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callfilterid string Yes The id of the call filter (the callfilterid from /listcallfilters)
extensionid string Yes The id of the line (from /listextensions) or callflow (from /listcallflows). It must be allowed in the app template
direction string Yes inbound⇒the calls the user receives, outbound⇒the calls the user makes

Errors

HTTP errorCode Meaning
404 577 / 578 The call filter does not exist or it is not a call filter of the customer
401 107 The line or callflow does not exist or it is not allowed in the app template

Remove a call filter from a user

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/unsetcallfilteruser',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'callfilterid' => '5f3a2c1e-8b47-4d21-9e6a-0c7d4b2a9f10',
            'extensionid' => 'V360000004604840016628',
            'direction' => 'inbound',
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:


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

This endpoint removes a call filter from the inbound or the outbound calls of a line or callflow of the app template.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
callfilterid string Yes The id of the call filter (the callfilterid from /listcallfilters)
extensionid string Yes The id of the line or callflow. It must be allowed in the app template
direction string Yes inbound or outbound

Errors

HTTP errorCode Meaning
404 577 / 578 The call filter does not exist or it is not a call filter of the customer
401 107 The line or callflow does not exist or it is not allowed in the app template
404 11 The call filter is not set for these calls of the user

CDRLog

Get all cdrlog

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

    $curlHandler = curl_init();

    curl_setopt_array($curlHandler, [
        CURLOPT_URL => 'https://api.voipzeker.nl/unite/v1/listcdrlogs',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query([
            'accesstoken' => $accesstoken,
            'filter_datestart' => 'YYYY-MM-DD HH:ii:ss',
            'filter_dateend' => 'YYYY-MM-DD HH:ii:ss',
            'pagelimit' => 5,
            'showpage' => 1,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "pagination": {
        "itemcount": "34",
        "pagecount": 7
    },
    "data": [
        {
            "uniqueid": "3f1c2b9e7a4d58c06e2f91b3d7a8c4e5f60b1d2c3e4f5a6b7c8d9e0f1a2b3c4d",
            "calltime": "2022-06-06 12:37:51.182661",
            "billsecond": "54",
            "duration": "62",
            "direction": "out",
            "call_chain": [
                {
                    "number": "0001",
                    "desc": "0001-Reception",
                    "number_formats": {
                        "owner_country": "NL"
                    },
                    "number_formatted": "0001"
                },
                {
                    "number": "31880660573",
                    "desc": "",
                    "number_formats": {
                        "CountryID": "NL",
                        "National": "088 066 0573",
                        "International": "+31 88 066 0573",
                        "ITU": "31880660573",
                        "isValidNumber": 1,
                        "owner_country": "NL"
                    },
                    "number_formatted": "088 066 0573"
                }
            ],
            "call_uuids": [
                "5e0b3c1d-8f2a-4c6e-b1d7-9a4f2e6c8b30",
                "7c2d61a4-3b9e-4f0e-9a51-2d0c8e4b1f73"
            ]
        }
    ]
}

Returns a JSON object containing the contents of the cdrlog, based on the given criteria. Only the calls of the extensions and call flows allowed in the app template are returned.

call_uuids contains the call ids of all legs of the call, including the legs of the devices of an extension (for example 0031-1 and 0031-2 when the same extension is used on several devices). A call record belongs to the call when its call_uuid is in call_uuids; the call shows the same call_uuids on every device, so the call record can be found from the call history of each of them. To play the call records of the listed calls, call /listcallrecords with the extensionid and call_uuidlist[] set to these call_uuids, then download the file with /downloadcallrecord.

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
filter_datestart string Yes YYYY-MM-DD HH:ii:ss
filter_dateend string Yes YYYY-MM-DD HH:ii:ss
filter_inbound integer No For incoming call logs
0⇒False 1⇒True Default value : 0
filter_outbound integer No For outgoing call logs
0⇒False 1⇒True Default value : 1
filter_internal integer No For local call logs
0⇒False 1⇒True Default value : 0
filter_external integer No For external call logs
0⇒False 1⇒True Default value : 1
filter_answered integer No to request a list by answered type
0⇒all calls 1⇒answered calls 2⇒missed calls Default value : 1
usernamelist[] array No The username, this can be found in the response from /listcdrflows
phonenumberlist[] array No The phone number, this can be found in the response from /listcdrnumbers
sortkey string No Sort the data based on this value. Value range : calltime,duration Default value : calltime
sorttype integer No Sort ascending or descending.
0⇒Ascending 1⇒Descending Default value : 1 (newest first)
pagelimit integer No Maximum number of results per page
0-300 if value is 0 all results are shown
showpage integer No The page number to display
1-n - Default value : 1
stext string No Search this string in the results.

Get cdr flows

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "fulluserlist": {
            "0001": "0001-Reception",
            "0002": "Sales",
            "0100": "Call flow - opening hours"
        },
        "extuserlist": {
            "0001": "0001-Reception",
            "0002": "Sales"
        },
        "flowuserlist": {
            "0100": "Call flow - opening hours"
        }
    }
}

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

HTTP request

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

Parameters

Parameter Type Required Description
accesstoken string Yes The temporary token generated by /applogin that is needed for connection to the API
flowlisttype integer No To request a list by flow type
0⇒all users 1⇒extension users 2⇒flow users Default value : 0

Get cdr numbers

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

    $curlHandler = curl_init();

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

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

{
    "status": true,
    "errorCode": 0,
    "message": "Operation Successful.",
    "data": {
        "numberlist": {
            "31880660550": {
                "fullnumber": "31880660550",
                "phonenumber_formats": {
                    "CountryID": "NL",
                    "National": "088 066 0550",
                    "International": "+31 88 066 0550",
                    "ITU": "31880660550",
                    "isValidNumber": 1,
                    "owner_country": "NL"
                },
                "phonenumber_formatted": "088 066 0550"
            },
            "32470123456": {
                "fullnumber": "32470123456",
                "phonenumber_formats": {
                    "CountryID": "BE",
                    "National": "0470 12 34 56",
                    "International": "+32 470 12 34 56",
                    "ITU": "32470123456",
                    "isValidNumber": 1,
                    "owner_country": "NL"
                },
                "phonenumber_formatted": "+32 470 12 34 56"
            }
        }
    }
}

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

HTTP request

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

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,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

Calls the extension first and dials call_number when it answers. In the permissions of the app template this function is called clicktocall.

HTTP request

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

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, for example 1234*0200; this can be found in the response from /listextensions
call_number integer Yes The number that is dialed after the extension answers the phone: an internal number or a number in international format, digits only and not starting with a 0 (zero)

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,
        ]),
    ]);

    $response = curl_exec($curlHandler);
    print_r( json_decode($response) );

The above command returns JSON structured like this:

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

Sets the webhook URL of the app template. Only available for RedCactus app templates.

HTTP request

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

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 The URL that is called on events, at most 500 characters

VOIPZeker Custom Error codes

The VOIPZeker API uses the following error codes:

Error Code Meaning
0 Operation successful.
1 The function is not allowed for your app template
3 Database error. For /newphonebookitem, /updatephonebookitem and /newswitch: the item already exists
6 Bad request, an input value is missing or invalid
17 Your IP address is not in the IP whitelist of the app template
19 The accesstoken is not valid, log in again with /applogin
21 Invalid Access Token
29 There is no permitted extension to be shown in the extension list
90 Access token value renew: the accesstoken has expired, request a new one with /applogin
100 User Verified Error
101 API User & TenantID mismatch
107 API User & TenantID & ExtensionID mismatch: the extension is not allowed for your app template
201 Required Tenant ID
251 Extension ID required
314 The call record file does not exist
456 Invalid Call Flow ID: the callflowid is not the id of a call flow
465 DID Number not found: the number is not a number of the customer
466 No permission for the Call Flow of the DID Number: the number is attached to a call flow that is not allowed in the app template
467 DID Number is not attached to this Call Flow
575 Extension number not recognised: an internal number of a call filter is not a line or callflow of the app template
576 The number is already in the call filter
577 The call filter does not exist
578 The call filter does not exist or is not a call filter of the customer
580 The call filter is set for a user and cannot be deleted
583 The call filter is also used for other users than the lines and callflows of your app template
584 The [ ] of a number pattern must be closed and may only contain digits

HTTP Error Codes

The VOIPZeker API uses the following HTTP error codes:

Error Code Meaning
200 OK. Some failed operations also answer 200, so always check status in the answer
201 Created -- /newphonebookitem and /newswitch
304 Not Modified -- /downloadphonebookdata with If-Modified-Since
400 Bad Request -- A parameter is missing or invalid, or provisioning or login failed. See message
401 Unauthorized -- The accesstoken is invalid or expired, or the extension or call flow is not allowed. See errorCode
403 Forbidden -- The function is not allowed for your app template, or your IP address is not whitelisted, or a DID number is attached to a call flow that is not allowed in the app template, or a call filter is also used for other users
404 Not Found -- The endpoint, the requested file, the DID number or the call filter does not exist
405 Method Not Allowed -- The endpoints only accept POST
409 Conflict -- The phone number or the switch already exists, or the DID number is not attached to the call flow (/detachdidnumbersfromcallflow), or the call filter is in use (/deletecallfilter) or already has the number (/addcallfilternumbers)
413 Payload Too Large -- The request body is larger than 12 kB
429 Too Many Requests -- The rate limit is reached, see the Retry-After header
500 Internal Server Error -- An unexpected error, try again later
502 Bad Gateway -- The VOIPZeker back end is not available, try again later
504 Gateway Timeout -- The VOIPZeker back end did not answer in time, try again later
php