Numbers
List all numbers
This method allows you to retrieve a list of all incoming numbers in your unit.
URL
/api/v2/numbers/list
Supported Parameters
There are no supported parameters for this method.
Example JSON
{ "status":"success", "time":0.01, "flags":{}, "data": [ { "id":3466, "number":"03301222970", "context":"incoming", "created_at":"2015-05-05T14:43:36.000Z", "updated_at":"2015-10-05T14:05:45.000Z", "recording_enabled":false, "caller_id_prefix":"", "callerid_passthrough":true, "forward_sip_to":null, "aquisition": { "acquired_at":"2015-05-05T14:43:00.000Z", "subscriber": { "first_name":null, "name":null, "address1":null, "address2":null, "address3":null, "address4":null, "postcode":null, "pushed_at":null, "status":"unknown" } }, "destination": { "type":"Menu", "object": { "id":262, "name":"Main Menu" } } } ] }
Number properties
This method allows you to retrieve information about specific incoming number in your unit.
URL
/api/v2/numbers/info
Supported Paramaters
id- the ID of the number you wish to view (required)
Example JSON
{ "status":"success", "time":0.01, "flags":{}, "data": { "id":3466, "number":"03301222970", "context":"incoming", "created_at":"2015-05-05T14:43:36.000Z", "updated_at":"2015-10-05T14:05:45.000Z", "recording_enabled":false, "caller_id_prefix":"", "callerid_passthrough":true, "forward_sip_to":null, "aquisition": { "acquired_at":"2015-05-05T14:43:00.000Z", "subscriber": { "first_name":null, "name":null, "address1":null, "address2":null, "address3":null, "address4":null, "postcode":null, "pushed_at":null, "status":"unknown" } }, "destination": { "type":"Menu", "object": { "id":262, "name":"Main Menu" } } } }
Add or update a number
This method allows you to add or update an incoming number in your unit.
URL
/api/v2/numbers/save
Supported Parameters
id- the ID of the number (required if you're updating an existing number)destination_type- the type of destination for the number, for example Menudestination_id- the destination ID for the numbercaller_id_prefix- the caller ID prefixrecording_enabled- whether or not incoming call recording is enabled for this numbercallerid_passthrough- whether or not you wish to pass the caller ID when forwarding callscontext- the content to add a number into (creation only) - either incoming, or utility for an internal numbernumber- the number you wish to add (creation only)
Example JSON
{ "status":"success", "time":0.23, "flags":{}, "data": { "id":3466, "number":"03301222970", "context":"incoming", "created_at":"2015-05-05T14:43:36.000Z", "updated_at":"2015-10-08T11:14:26.295Z", "recording_enabled":true, "caller_id_prefix":"", "callerid_passthrough":true, "forward_sip_to":null, "aquisition": { "acquired_at":"2015-05-05T14:43:00.000Z", "subscriber": { "first_name":null, "name":null, "address1":null, "address2":null, "address3":null, "address4":null, "postcode":null, "pushed_at":null, "status":"unknown" } }, "destination": { "type":"Menu", "object": { "id":262, "name":"Main Menu" } } } }
List all available prefixes
This method allows you to retrieve a list of all available number prefixes that we can provide numbers for.
URL
/api/v2/numbers/available_prefixes
Supported Parameters
There are no supported parameters for this method.
Example JSON
{ "status":"success", "time":0.01, "flags":{}, "data": [ { "description":"Aberdeen (01224)", "prefix":"01224" }, { "description":"Aberfeldy (01887)", "prefix":"01887" }, { "description":"Abergavenny (01873)", "prefix":"01873" }, { "description":"Aberystwyth (01970)", "prefix":"01970" } ] }
List available numbers within a prefix
This method allows you to retrieve a list of available numbers within a specific prefix.
URL
/api/v2/numbers/acquirable_numbers
Supported Parameters
prefix- the prefix to search for (required)
Example JSON
{ "status":"success", "time":0.21, "flags":{}, "data": [ "01234069352", "01234901381", "01234901364", "01234069371", "01234901431", "01234069448", "01234375392", "01234069303", "01234375079", "01234069473" ] }
Purchase a new number
This method allows you to purchase an available number for your unit.
URL
/api/v2/numbers/acquire
Supported Parameters
number- the number you wish to purchase (required)
Example JSON
{ "status":"success", "time":0.47, "flags":{}, "data": { "id":4243, "number":"01234901769", "context":"incoming", "created_at":"2015-10-08T12:00:16.109Z", "updated_at":"2015-10-08T12:00:16.109Z", "recording_enabled":true, "caller_id_prefix":null, "callerid_passthrough":true, "forward_sip_to":null, "aquisition": { "acquired_at":"2015-10-08T12:00:16.102Z", "subscriber": { "first_name":null, "name":null, "address1":null, "address2":null, "address3":null, "address4":null, "postcode":null, "pushed_at":null, "status":"unknown" } } } }
Update subscriber information
This method allows you to update subscriber information for a specific number on your account.
URL
/api/v2/numbers/update_subscriber
Supported Parameters
id- the ID of the number you wish to update (required)first_name- the first name of the subscribername- the surname or company nameaddress1- the first line of the addressaddress2- the second line of the addressaddress3- the third line of the addressaddress4- the fourth line of the addresspostcode- the postcode of the address
Example JSON
{ "status":"success", "time":0.35, "flags":{}," data": { "id":4243, "number":"01234901769", "context":"incoming", "created_at":"2015-10-08T12:00:16.000Z", "updated_at":"2015-10-08T13:16:03.880Z", "recording_enabled":true, "caller_id_prefix":null, "callerid_passthrough":true, "forward_sip_to":null, "aquisition": { "acquired_at":"2015-10-08T12:00:16.000Z", "subscriber": { "first_name":"Alex", "name":"Telcom", "address1":"24/26 Lever Street", "address2":null, "address3":null, "address4":"Manchester", "postcode":"M1 1DZ", "pushed_at":null, "status":"validation_pending" } }, "destination":null } }
Delete a number
This method allows you to remove an incoming number from your unit.
URL
/api/v2/numbers/delete
Supported Parameters
id- the ID of the number you wish to delete (required)
Example JSON
{ "status":"success", "time":1.1, "flags":{}, "data":true }
List all access numbers
This method allows you to obtain a list of available access numbers within your unit.
URL
/api/v2/numbers/available_access_numbers
Supported Parameters
There are no supported parameters for this method.
Example JSON
{ "status":"success", "time":0.0, "flags":{}, "data":[ { "number":"*55", "description":"Access your main voicemail menu. If your extension you are dialling from matches a mailbox ID, you will be automatically logged into your mailbox using this option." }, { "number":"*56", "description":"Access your main voicemail menu, you will be required to login using your mailbox ID and password at all times." }, { "number":"*10", "description":"Plays back your current internal caller ID." }, { "number":"*50", "description":"Plays the current music on hold." }, { "number":"*30*{number}", "description":"Page an extension or call group. If enabled, the call will automatically be answered." }, { "number":"*31*{number}", "description":"Withhold your number. Your caller ID will not be displayed to callers when using this prefix." }, { "number":"*32*{number}", "description":"Send your number if your account is set to withhold caller ID by default." }, { "number":"*21*{number}", "description":"Sets up call forwarding for the extension you are dialling from - {number} should be replaced with the number you wish to forward to as if dialled from your extension." }, { "number":"*21", "description":"Cancels call forwarding" }, { "number":"*22", "description":"Plays back your current call forwarding destination (if any)" }, { "number":"*8", "description":"Picks up another ringing phone within a pickup group" }, { "number":"*01", "description":"Run an echo test" } ] }