Subiz API

Accounts

Accounts Overview

{
  "id": 1,
Integer (Int64) *

Account ID

  "license_id": 1,
Integer (Int64)

The license ID

  "plan": {
  "plan": { ... }
Object

Plan

    "name": "Standard",
String

Name

    "max_slots": 100,
Integer (Int64)

Max Slots

    "max_agents": 100,
Integer (Int64)

Max Agents

    "max_triggers": 3,
Integer (Int64)

Max Triggers

    "department": "active"
String

Whether the department feature is enabled or not

  },
  "is_trial": 0,
Integer (Int64)

Whether the account is

  "expiry_date": "2016-03-27T04:05:30Z",
String (Date-time)

Expiry date

  "created_at": "2014-04-02T10:48:44Z"
String (Date-time)

Creation date of the account

}

Get account info

Open in API Explorer
GET /account

Returns all information for the specified account

Example Request

Format:
curl --request GET \
  --url https://api.subiz.com/v1/account \
  --header 'accept: application/json' \
  --header 'api-key: YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.subiz.com/v1/account")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["api-key"] = 'YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.subiz.com",
  "port": null,
  "path": "/v1/account",
  "headers": {
    "accept": "application/json",
    "api-key": "YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.subiz.com")

headers = {
    'accept': "application/json",
    'api-key': "YOUR API KEY HERE"
    }

conn.request("GET", "/v1/account", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.subiz.com/v1/account",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "api-key: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.subiz.com/v1/account"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("api-key", "YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Responses

200 OK

The account.

Accounts Account
{
  "id": 1,
Integer (Int64) *

Account ID

  "license_id": 1,
Integer (Int64)

The license ID

  "plan": {
  "plan": { ... }
Object

Plan

    "name": "Standard",
String

Name

    "max_slots": 100,
Integer (Int64)

Max Slots

    "max_agents": 100,
Integer (Int64)

Max Agents

    "max_triggers": 3,
Integer (Int64)

Max Triggers

    "department": "active"
String

Whether the department feature is enabled or not

  },
  "is_trial": 0,
Integer (Int64)

Whether the account is

  "expiry_date": "2016-03-27T04:05:30Z",
String (Date-time)

Expiry date

  "created_at": "2014-04-02T10:48:44Z"
String (Date-time)

Creation date of the account

}

Reset API key

Open in API Explorer
POST /account/reset_api_key

Reset account API key

Example Request

Format:
curl --request POST \
  --url https://api.subiz.com/v1/account/reset_api_key \
  --header 'accept: application/json' \
  --header 'api-key: YOUR API KEY HERE' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001'
require 'uri'
require 'net/http'

url = URI("https://api.subiz.com/v1/account/reset_api_key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["api-key"] = 'YOUR API KEY HERE'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.subiz.com",
  "port": null,
  "path": "/v1/account/reset_api_key",
  "headers": {
    "accept": "application/json",
    "api-key": "YOUR API KEY HERE",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.subiz.com")

payload = ""

headers = {
    'accept': "application/json",
    'api-key': "YOUR API KEY HERE",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001"
    }

conn.request("POST", "/v1/account/reset_api_key", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.subiz.com/v1/account/reset_api_key",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "api-key: YOUR API KEY HERE",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.subiz.com/v1/account/reset_api_key"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("api-key", "YOUR API KEY HERE")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Responses

200 OK

Success

(Empty Response)
default Default

Unexpected error

(Empty Response)