The Telzio Developer Hub

Welcome to the Telzio developer hub. You'll find comprehensive guides and documentation to help you start working with Telzio as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results
Suggest Edits

Getting Started with Telzio API

 

The Telzio API is a RESTful API based around resource oriented URLs. It uses standard HTTP verbs and returns JSON on all requests.

We are currently building out the API with new features, and if there’s something specific that you would like us to add, please send your suggestions to support@telzio.com

Suggest Edits

Authentication

 

All requests to the API must be authenticated with a valid API key. Authentication is performed via HTTP Basic Auth. Provide the API key as username and API secret as password.

Do not share your API key publicly, like on GitHub or in any client side code. It is your responsibility to prevent unauthorized access to your account. All API requests must be made of HTTPS.

You can create an API key by visiting the Integrations page on Telzio.

Suggest Edits

Balance

Returns your current account balance in USD.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/account/balance
curl --request GET \
  --url https://api.telzio.com/account/balance
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/account/balance' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/account/balance")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/account/balance");

xhr.send(data);
import requests

url = "https://api.telzio.com/account/balance"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
 "Balance": 197.3246
}
 
Suggest Edits

Call Details

Returning details of a specific call along with it’s call legs, price and a list of events that happened during the call.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/calls/details/CallUUID
curl --request GET \
  --url https://api.telzio.com/calls/details/CallUUID
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.telzio.com/calls/details/CallUUID' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/calls/details/CallUUID")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/calls/details/CallUUID");

xhr.send(data);
import requests

url = "https://api.telzio.com/calls/details/CallUUID"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
 "CallUUID": "dfd5d020-dc21",
 "Status": "completed",
 "Direction": "outbound",
 "From": "sip:myuser@sip.telzio.com",
 "To": "+1 888-998-9080",
 "HangupCause": "NORMAL_CLEARING",
 "Started": "2015-11-05T16:50:47.03",
 "Duration": "00:10:25",
 "BilledDuration": "00:11:00",
 "TotalPrice": 0.231,
 "TotalFreeMinutes": "00:00:00",
 "Legs": [{
    "CallUUID": "b882c9e5-e7ce",
    "Status": "completed",
    "To": "+1 888-998-9080",
    "Started": "2015-11-05T16:50:48.28",
    "Duration": "00:10:25",
    "BilledDuration": "00:11:00",
    "HangupCause": "NORMAL_CLEARING",
    "Price": 0.231,
    "Rate": 0.021,
    "FreeMinutes": "00:00:00"
 }],
 "Events": [{
    "Id": 144674224704619,
    "Time": "2015-11-05T16:50:47Z",
    "Text": "[45] CallLog - myuser wants to call 18889989080"
 },
 {
    "Id": 144674224831182,
    "Time": "2015-11-05T16:50:48Z",
    "Text": "[66] CallLog - Call was answered"
 },
 {
    "Id": 144674287343714,
    "Time": "2015-11-05T17:01:13Z",
    "Text": "[68] CallLog - Called party hung up (NORMAL_CLEARING)"
 },
 {
    "Id": 144674287345277,
    "Time": "2015-11-05T17:01:13Z",
    "Text": "[68] CallLog - Call Completed"
 },
 {
    "Id": 144674287489026,
    "Time": "2015-11-05T17:01:14Z",
    "Text": "[80] CallLog - Call recording was saved"
 }]
}

Path Params

CallUUID
string
required

The CallUUID of the call you wish to retrieve details for.

 
Suggest Edits

Call Log

Retuning a list of calls from your call log. You can filter these to only show a specific phone number. Newest calls are presented first. A maximum of 20 calls are returned, but paging can be utilized with the Offset parameter.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/calls/log
curl --request GET \
  --url https://api.telzio.com/calls/log
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/calls/log' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/calls/log")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/calls/log");

xhr.send(data);
import requests

url = "https://api.telzio.com/calls/log"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
 "Count": 1,
 "TotalCount": 1,
 "Offset": 0,
 "MaxResults": 20,
 "Calls": [{
    "CallUUID": "89baeb20-fd6c",
    "Status": "completed",
    "Direction": "inbound",
    "From": "+1 888-998-9080",
    "To": "+1 555-777-9999",
    "HangupCause": "NORMAL_CLEARING",
    "Started": "2015-11-05T15:02:03.45",
    "Duration": "00:00:07",
    "BilledDuration": "00:01:00"
  }]
}

Query Params

Number
int64

Filters the list based on a specific phone number in your account. Must be written with the country code but without “+”. Example: 18889989080

Offset
int32

Requests the list starting from the offset value.

MaxResults
int32

Sets the max number of results to return per page. Defaults to 20.

Direction
string

Can be either inbound or outbound.

FromDate
date

Filters all calls from this date. Example: 2015-11-01

ToDate
date

Filters all calls up to this date. Example: 2017-05-01

 
Suggest Edits

Live Calls

Returning a list of live calls on your account. All with CallUUIDs which can be used to query more details about the specific call.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/calls/live
curl --request GET \
  --url https://api.telzio.com/calls/live
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/calls/live' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/calls/live")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/calls/live");

xhr.send(data);
import requests

url = "https://api.telzio.com/calls/live"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
 "LiveCalls": [{
    "CallUUID": "d694d83c-721f",
    "Status": "in-progress",
    "Direction": "inbound",
    "From": "+1 999-333-2222",
    "To": "+1 888-998-9080",
    "Started": "2015-11-05T01:07:08.22",
    "Duration": "-00:00:01.2092851"
  },
  {
    "CallUUID": "77dadma6-9f2d",
    "Status": "ringing",
    "Direction": "outbound",
    "From": "sip:myuser@sip.telzio.com",
    "To": "+1 888-998-9080",
    "Started": "2015-11-05T01:07:06.44",
    "Duration": "00:00:00.5707149"
  }]
}
 
Suggest Edits

Hang Up Call

This request hangs up a specific call.

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.telzio.com/calls/CallUUID/hangup
curl --request POST \
  --url https://api.telzio.com/calls/CallUUID/hangup
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.telzio.com/calls/CallUUID/hangup' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/calls/CallUUID/hangup")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.telzio.com/calls/CallUUID/hangup");

xhr.send(data);
import requests

url = "https://api.telzio.com/calls/CallUUID/hangup"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "Success": True,
  "Message": "Hung up call"
}
{
  "Success": False,
  "Message": "Error when trying to hang up call"
}

Path Params

CallUUID
string
required

The CallUUID of the call you want to hang up.

 
Suggest Edits

Transfer Call

Transfer an existing call to another user/extension or external phone number

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.telzio.com/calls/CallUUID/transfer
curl --request POST \
  --url https://api.telzio.com/calls/CallUUID/transfer
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.telzio.com/calls/CallUUID/transfer' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/calls/CallUUID/transfer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.telzio.com/calls/CallUUID/transfer");

xhr.send(data);
import requests

url = "https://api.telzio.com/calls/CallUUID/transfer"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "Success": True,
  "Message": "Transfering"
}
{
  "Success": False,
  "Message": "Call {CallUUID} not found"
}

Path Params

CallUUID
string
required

The Call ID of the call you want to transfer

Body Params

Destination
string

The extension or E164 number you want to transfer the call to.

 
Suggest Edits

Dial a Number

This request creates a new outbound phone call and connects it to a user on your account.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/dial
curl --request GET \
  --url https://api.telzio.com/dial
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/dial' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/dial")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/dial");

xhr.send(data);
import requests

url = "https://api.telzio.com/dial"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "Success": True,
  "Message": "Dialing"
}
{
  "Success": False,
  "Message": "Error message goes here..."
}

Body Params

Type
string

Where to connect the call. Can be either "User" or "Callflow"

Username
string

Username of the user making the call

FromNumber
string

The E164 formatted phone number that you are making the call from. Must be an active phone number on your account. Example: +18889989080

CallFlowId
int32

ID of a call flow that the call should be connected to, when the called party answers.

Destination
string

The E164 formatted phone number the call should be placed to.

 
Suggest Edits

List Recordings

List and filter recordings on your Telzio account.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/recordings
curl --request GET \
  --url https://api.telzio.com/recordings
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/recordings' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/recordings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/recordings");

xhr.send(data);
import requests

url = "https://api.telzio.com/recordings"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "Success": True,
  "ItemsReturned": 100,
  "ItemsAvailable": 2948,
  "Error": null,
  "ErrorMessage": null,
  "data": [{
    "recording_id": 123456,
    "call_id": "ast016-123456789.123456",
    "parent_call_id": null,
    "number_id": 558855,
    "direction": "outbound",
    "from": "myusername",
    "from_cnam": "My User",
    "to": "18889989080",
    "tags": [],
    "duration_seconds": 42,
    "status": "new",
    "date": "2017-10-06T19:54:32+00:00",
    "assigned_type": "user",
    "assigned_id": 123456,
    "assigned_name": "myuser",
    "recording_data_path": "/recordings/123456/download"     
  }]
}

Query Params

tag
array of strings

Filter by one or more tags

direction
string

Filter by call direction. Can be "inbound" and "outbound".

search
string

Search in all recordings

from
date-time
to
date
pageSize
int32

Limit the number of results returned

offset
int32

Request recordings starting from a certain number in the array

 
Suggest Edits

Download Recording

Request a recorded call for download as MP3

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/recordings/RecordingId/download
curl --request GET \
  --url https://api.telzio.com/recordings/RecordingId/download
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.telzio.com/recordings/RecordingId/download' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/recordings/RecordingId/download")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/recordings/RecordingId/download");

xhr.send(data);
import requests

url = "https://api.telzio.com/recordings/RecordingId/download"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

RecordingId
int32
required
 
Suggest Edits

Send SMS

Send SMS from your Telzio phone number. Please see our pricing page for SMS prices.

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.telzio.com/sms
curl --request POST \
  --url https://api.telzio.com/sms
var request = require("request");

var options = { method: 'POST', url: 'https://api.telzio.com/sms' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/sms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.telzio.com/sms");

xhr.send(data);
import requests

url = "https://api.telzio.com/sms"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "Status": "Sent",
  "ErrorMessage": null
}

Body Params

From
int64

Your Telzio phone number that you are sending the message from. Must be formatted using E.164 format without ‘+’. Example: 18889989080

To
int64

The phone number you’re sending the SMS to. Must be formatted using E.164 format without ‘+’. Example: 18889989080

Message
string

Your message.

 
Suggest Edits

List Queues

List all queues on account

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/queue/all
curl --request GET \
  --url https://api.telzio.com/queue/all
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/queue/all' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/queue/all")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/queue/all");

xhr.send(data);
import requests

url = "https://api.telzio.com/queue/all"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[{
  "QueueId": 123456,
  "QueueName": "Sales"
},
{
  "QueueId": 123456,
  "QueueName": "Customer Service"
},
{
  "QueueId": 123456,
  "QueueName": "Support"
}]
 
Suggest Edits

View Queue

List all agents and participants in a queue

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/queue/queue/QueueId/view
curl --request GET \
  --url https://api.telzio.com/queue/queue/QueueId/view
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.telzio.com/queue/queue/QueueId/view' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/queue/queue/QueueId/view")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/queue/queue/QueueId/view");

xhr.send(data);
import requests

url = "https://api.telzio.com/queue/queue/QueueId/view"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "Agents": [{
    "Username": "user1",
    "State": "Available",
    "GraceTimeSeconds": 0,
    "Gracing": false,
    "LastCallTaken": "2017-10-06T20:15:05.4417547Z",
    "LastCallEnded": "2017-10-06T20:16:11.0518403Z"
},
{
  "Username": "user2",
  "State": "Available",
  "GraceTimeSeconds": 0,
  "Gracing": false,
  "LastCallTaken": "2017-10-06T17:38:23.8142074Z",
  "LastCallEnded": "2017-10-06T17:38:31.5739817Z"
}],
"Participants": [{
  "QueueSessionId": "abcdefg12345",
  "CallerId": "+18889989080",
  "Position": 1,
  "Joined": "2017-10-06T20:19:10.5796541Z",
  "Released": false,
  "Callback": false,
  "CallbackNumber": "+18889989080",
  "RejectedByAgents": [],
  "TimeInQueue": "00:00:08.4147477"
}]
}

Path Params

QueueId
int32
required

The ID of the queue

 
Suggest Edits

List Users

Lists all users on your account.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/users
curl --request GET \
  --url https://api.telzio.com/users
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/users' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/users");

xhr.send(data);
import requests

url = "https://api.telzio.com/users"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

[{
  "UserId": 9626,
  "Username": "user1",
  "Extension": "301",
  "Firstname": "Test",
  "Lastname": "User 1",
  "Email": "test@domain.com",
  "Groups": [
    {
      "Id": 6385,
      "Name": "Main Group"
    },
    {
      "Id": 8977,
      "Name": "Test Group"
    }]
},
{
  "UserId": 9627,
  "Username": "user2",
  "Extension": "302",
  "Firstname": "Test",
  "Lastname": "User 2",
  "Email": "user2@domain.com",
  "Groups": [{
    "Id": 6385,
    "Name": "Main Group"
  }]
}]
 
Suggest Edits

Add User

Adds a new user to your Telzio account.

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.telzio.com/users
curl --request POST \
  --url https://api.telzio.com/users
var request = require("request");

var options = { method: 'POST', url: 'https://api.telzio.com/users' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.telzio.com/users");

xhr.send(data);
import requests

url = "https://api.telzio.com/users"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

Username
string
required

Username for the new user

FirstName
string
required

First Name for the new user

LastName
string
required

Last name for the new user

Email
string
required

Email address of the new user

Extension
string

Extension for the new user

Password
string
required

Password for the new user

Admin
boolean
required

Set to true if the user should have full account administrative access, false otherwise

NumberID
int32
required

The number id this user calls from (see List Numbers)

NumberSelectable
boolean
required

If the user can select their own number on the dashboard or in the telzio app

HoldmusicID
int32
required

Hold Music ID, see Hold Music Endpoint. Set to zero for no hold music

RecordCalls
boolean
required

If calls to or from this user should be recorded

NoAnswerDestination
string
required

None, Voicemail, CallFlow, User, Group or External

NoAnswerValue
string
required

The appropriate value depending on the value provided in NoAnswerDestination. If None or Voicemail is selected, this field should be empty. If CallFlow is used, then this must be the ID of the call flow (see Call Flows), if User is selected, this must be the username of the user, and if External is used, it must be the full E164 number to send the caller to.

NoAnswerTimeout
int32
required

How long the user rings before NoAnswerDestination is triggered

Groups
array of integers
required

GroupID's this user will belong to.

Permissions
array of strings

Permissions granted to this user. Can by any combination of: call_flow_admin, log_reader, plan_admin, user_admin, monitor_call

 
Suggest Edits

Update User

Updates a specific user on your Telzio account.

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://api.telzio.com/users/username
curl --request PUT \
  --url https://api.telzio.com/users/username
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.telzio.com/users/username' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/users/username")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.telzio.com/users/username");

xhr.send(data);
import requests

url = "https://api.telzio.com/users/username"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

username
string
required

Body Params

FirstName
string

If set, will update user's first name

LastName
string

If set, will update user's last name

Email
string

If set, will update user's email

Extension
string

If set, will update user's extension

Password
string

If set, will update user's password

Admin
boolean

If set, will change if user is account administrator

NumberID
int32

If set, will update the number the user calls from

NumberSelectable
boolean

If set, will change if user can select which number he calls from

HoldmusicID
int32

If set, will update the user's hold music

RecordCalls
boolean

If set, will change if the user's calls are recorded

NoAnswerDestination
string

If set, will update No Answer Destination settings

NoAnswerValue
string

If set, will update No Answer Destination ID

NoAnswerTimeout
string

If set, will update No Answer Action trigger timeout

groups
array of integers

If set, will update which groups this user belongs to.

permissions
array of strings

If set, will change the user's permissions

 
Suggest Edits

List Groups

Lists all groups on your Telzio account.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/groups
curl --request GET \
  --url https://api.telzio.com/groups
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/groups' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/groups")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/groups");

xhr.send(data);
import requests

url = "https://api.telzio.com/groups"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "Success": true,
    "Error": null,
    "ErrorMessage": null,
    "Data": [
        {
            "GroupID": 12,
            "Name": "Main Group",
            "Members": [
                "user1",
                "user2",
                "user3",
                "user4",
                "user5",
                "user6"
            ]
        },
        {
            "GroupID": 13,
            "Name": "Group A",
            "Members": [
                "user1",
                "user3"
            ]
        },
        {
            "GroupID": 14,
            "Name": "Group B",
            "Members": [
                "user4",
                "user5"
            ]
        }
    ],
    "ItemsReturned": 3,
    "ItemsAvailable": 3
}

Query Params

pagesize
int32

Number items returned per page

pageindex
int32

Page Index to retrieve

 
Suggest Edits

List Hold Music

Lists available hold music tunes.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/holdmusic
curl --request GET \
  --url https://api.telzio.com/holdmusic
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/holdmusic' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/holdmusic")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/holdmusic");

xhr.send(data);
import requests

url = "https://api.telzio.com/holdmusic"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "Success": true,
    "Error": null,
    "ErrorMessage": null,
    "Data": [
        {
            "HoldmusicID": 1,
            "Name": "Classical"
        },
        {
            "HoldmusicID": 2,
            "Name": "Optimistic"
        },
        {
            "HoldmusicID": 3,
            "Name": "Jazz"
        },
        {
            "HoldmusicID": 4,
            "Name": "Rock"
        },
        {
            "HoldmusicID": 5,
            "Name": "Lounge"
        },
        {
            "HoldmusicID": 6,
            "Name": "Electronic"
        },
        {
            "HoldmusicID": 8,
            "Name": "Surfer Funk"
        },
        {
            "HoldmusicID": 9,
            "Name": "Dubstep"
        },
        {
            "HoldmusicID": 10,
            "Name": "Beep"
        }
    ],
    "ItemsReturned": 9,
    "ItemsAvailable": 9
}

Query Params

PageSize
int32
PageIndex
int32
 
Suggest Edits

List Call Flows

Lists all call flows on your Telzio account.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/flows
curl --request GET \
  --url https://api.telzio.com/flows
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/flows' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/flows")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/flows");

xhr.send(data);
import requests

url = "https://api.telzio.com/flows"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "Success": true,
  "Error": null,
  "ErrorMessage": null,
  "Data": [{
    "FlowID": 1,
    "Name": "Main Call Flow",
    "Extension": 1000,
    "Numbers": [{
        "NumberID": 11409,
        "E164": "+1-323-555-1010"
      }]
  },
  {
    "FlowID": 2,
    "Name": "Holiday Flow",
    "Extension": null,
    "Numbers": [
      {
        "NumberID": 11409,
        "E164": "+1-323-555-1010"
      }]
  },
  {
    "FlowID": 3,
    "Name": "DK Flow",
    "Extension": null,
    "Numbers": [{
      "NumberID": 12411,
      "E164": "+45 40 00 50 00"
    }]
  },
  {
    "FlowID": 4,
    "Name": "Test Flow",
    "Extension": "114",
    "Numbers": []
  }],
  "ItemsReturned": 4,
  "ItemsAvailable": 4
}

Query Params

PageSize
int32
PageIndex
int32
 
Suggest Edits

List Numbers

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.telzio.com/numbers
curl --request GET \
  --url https://api.telzio.com/numbers
var request = require("request");

var options = { method: 'GET', url: 'https://api.telzio.com/numbers' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.telzio.com/numbers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.telzio.com/numbers");

xhr.send(data);
import requests

url = "https://api.telzio.com/numbers"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "Success": true,
    "Error": null,
    "ErrorMessage": null,
    "Data": [
        {
            "NumberID": 124,
            "E164": "+13235551010"
        },
        {
            "NumberID": 8628,
            "E164": "+3235551020"
        },
        {
            "NumberID": 8722,
            "E164": "+4540001000"
        }
    ],
    "ItemsReturned": 3,
    "ItemsAvailable": 3
}

Query Params

PageSize
int32
PageIndex
int32
 
Suggest Edits

About Webhooks

Telzio can send HTTP requests to your API when certain events occurs on your phone system.
Learn more about webhooks on Wikipedia

 

General

When configuring your webhook you have two choices of format: JSON or x-www-form-urlencoded.

The consuming API has 15 seconds to accept the event. If a success http status code has not been returned with these 15 seconds, the event will be discarded and the engine will proceed to the next one.

Only one event is dispatched at a time, and in sequence. There is no parallel dispatch against a single customer end point, and the engine will not try to resend a failed request.

If a consuming API consistently fails over a period of time, the engine will suspend delivery until the customer manually re-enables distribution of events.

Authentication

The Telzio webhook supports authenticating against the customer API using either a, by the customer specified, Bearer Token or Basic Authentication. In both cases the customer enters either the token or credentials for basic auth on the Telzio website.

In case of Bearer token authentication, the engine will issue all HTTP Requests with the following Header:
Authorization: Bearer {token}

In case of Basic Authentication it will be as follows:
Authorization: Basic {digest string}

We highly encourage consumers to support HTTPS and use either Basic or Bearer-token based authentication.

JSON Encoded Events

This is an example of a call created event being posted as JSON. This example assumes that the hook has been configured to be http://www.example.com/webhook

POST /webhook
Host: www.example.com
X-Telzio-Event-Type: call_created
Content-Type: application/json; charset=utf-8

{
  "EventType":"call_created",
  "call_id":"9309b4a2-d59f",
  "direction":"outbound",
  "from":"jonas1",
  "from_cnam":"Jonas 1",
  "to":"78791245",
  "rate":0.0,
  "date":"2016-03-01T08:31:55.0000000"
}

Form-Urlencoded Events

POST /webhook
Host: www.example.com
X-Telzio-Event-Type: call_created
Content-Type: application/x-www-form-urlencoded

EventType=call_created&call_id=5909179e-e6c2&direction=outbound&from=jonas1&from_cnam=Jonas1&to=78791245&rate=0.0&date=2016-03-01T09%3A41%3A12.0000000
Suggest Edits

Call Created

 

This webhook event is fired whenever a parent call is created.

Parameters

Parameter
Type
Description

EventType

string

Has the value “call_created” for this event

call_id

string

A unique identifier for this call.
Example: 004-124343223-233543

Direction

string

Either “inbound” or “outbound”

From

string

Either a username or E164 number (+ prefixed)

from_cnam

string

CNAM of caller, if present

to

string

Extension dialed by user for outbound, E164 number dialed for inbound

rate

decimal

Minute rate for this call.

date

string

ISO 8601 Formatted date string

Suggest Edits

Call Ended

 

This webhook event is fired when a call is ended

Parameters

Parameter
Type
Description

EventType

string

Has the value “call_ended” for this event

call_id

string

A unique identifier for this call.
Example: 004-124343223-233543

parent_call_id

string

Id of parent call if this is a child call. Null if this is a parent call.

call_status

string

Call status of this call when it was ended.

reason

string

A hint as to why the call was ended.

from

string

Either a username or E164 number (+ prefixed)

to

string

Either a username or E164 number (+ prefixed)

duration

integer

The duration of the call from start to finish in seconds

billed_duration

integer

The part of the call where voice was exchanged in seconds

price

decimal

Total price of this call.

rate

decimal

Minute rate of this call.

free_minutes

integer

Free Minutes spent from call by this call in seconds.

date

datetime

ISO 8601 Formatted date string.

Suggest Edits

Call Hung Up

 

This event is fired when a call hangs up. Normally this will cause the connected call to also be hung up. This event can be used to determine which end of a conversation hang up.

Parameters

Parameter
Type
Description

EventType

string

Has the value “call_hungup” for this event

call_id

string

A unique identifier for this call.
Example: 004-124343223-233543

date

datetime

ISO 8601 Formatted date string

Suggest Edits

Call Status Changed

 

This event is fired whenever the status of a call is changed. For instance this can be when a call is answered, canceled or isn’t answered.

Parameters

Parameter
Type
Description

EventType

string

Has the value “call_hungup” for this event

call_id

string

A unique identifier for this call.
Example: 004-124343223-233543

status

string

The new status being transitioned into.

date

datetime

ISO 8601 Formatted date string

Status Types

Status
Meaning
Possible From

initializing

Call has been created and is processing

Has the value “child_call_connected” for this event

ringing

Call is ringing (either getting a dial tone or a phone is ringing)

initializing

in-progress

Call is connected and voice communication is possible

initializing, ringing

cancel

Caller hung up before a the line was answered

initializing, ringing

noanswer

Caller was hung up without being connected (rang out)

initializing, ringing, in-progress

completed

Call was hung up after voice communication had successfully been established

in-progress

Suggest Edits

Child Call Connected

 

This event is fired whenever a parent call is connected with a child call, and voice communication is established.

Parameters

Parameters
Type
Description

EventType

string

Has the value “child_call_connected” for this event

call_id

string

A unique identifier for this call.
Example: 004-124343223-233543

parent_call_id

string

Id of parent call this call belongs to.

Suggest Edits

Child Call Created

 

This event is fired when a child call (a B leg on a call) is created. These always contain a reference to the parent call that caused them to be created. All child calls are outbound.

Parameters

Parameter
Type
Description

EventType

string

Has the value “child_call_created” for this event

call_id

string

A unique identifier for this call.
Example: 004-124343223-233543

parent_call_id

string

Id of parent call this call belongs to.

from

string

Either a username or E164 number (+ prefixed)

to

string

Extension dialed by user for outbound, E164 number dialed for inbound.

rate

decimal

Minute rate for this call.

date

datetime

ISO 8601 Formatted date string.

Suggest Edits

Recording Ready

 

This webhook event is fired when a call is recorded and the mp3 file is ready to be downloaded.

Parameters

Parameter
Type
Description

EventType

string

Has the value “call_recording_ready” for this event

call_id

string

Unique identifier of parent call where this message was received.

recording_id

string

An ID for the recording.

username

string

Username who received this voicemail.

call_flow

string

Call flow which this recording was made in.

From

string

E164 number this recording is from.

from_name

string

Name of caller, if present.

to

string

E164 number dialed when message was recorded.

date

datetime

ISO 8601 Formatted date string.

url

string

Url where the recording can be downloaded from.

Suggest Edits

SMS Sent/Received

 

This event is fired when an SMS is received or sent on the account

Parameters

Parameter
Type
Description

EventType

string

Has the value “sms_processed” for this event

sms_id

string

Unique identifier for the SMS Message

From

string

E164 number this SMS was sent from

to

string

E164 number this SMS was sent from

message

string

Content of the message

direction

string

Inbound or outbound

date

datetime

ISO 8601 Formatted date string

Suggest Edits

Voicemail Received

 

This event is fired when a voicemail is received.

Parameters

Parameter
Type
Description

EventType

string

Has the value “voicemail_received” for this event

call_id

string

Unique identifier of parent call where this message was received

username

string

Username who received this voicemail

From

string

E164 number this recording is from

from_name

string

Name of caller, if present

to

string

E164 number dialed when message was recorded

date

datetime

ISO 8601 Formatted date string

transcription

string

Automatic transcription text of the audio recording, if present

url

string

Url where the recording can be downloaded from

duration

integer

Recording duration, in seconds.