Web Services

Bizsense offers a REST web service API.

In order to use the web service API a valid key is required. The web service key can be generated from the Bizsense administrative web interface.

Lead API

Create lead resource

Item Description
URL /webservice/lead/
HTTP method POST
HTTP response code on success 201
Response data format JSON

POST Parameters

Parameter Description
first_name First name
middle_name Middle name
last_name Last name. Either first name or last name must be specified.
company_name Company name
home_phone Home phone number
work_phone Work phone number
mobile Mobile phone number
fax Fax
email Email
address_line_1 Address line #1
address_line_2 Address line #2
address_line_3 Address line #3
address_line_4 Address Line #4
city City
state State
country Country
postal_code Postal code
description Description
do_not_call Whether or not to mark as do not call. 0 for no, 1 for yes
email_opt_out Whether or not to mark as email opt out. 0 for no, 1 for yes

Ticketing API

Retrieve all tickets

Item Description
URL /webservice/ticket
HTTP method GET
HTTP response code on success 200
Response data format JSON

GET Parameters

Parameter Description
criteria Comma separated list of criteria. <by_contact_email,>
contact_email Email address of the contact

Create ticket resource

TBD

Ticket Status API

Retrieve all ticket statuses

Item Description
URL /webservice/ticketstatus
HTTP method GET
HTTP response code on success 200
Response data format JSON

Subscriber API

Creating a new subscriber

Item Description
URL /webservice/subscriber
HTTP method POST
HTTP response code on success 201
Response data format JSON

POST Parameters

Parameter Description
email Subscriber’s email address
first_name Subscriber’s first name
middle_name Subscriber’s middle name
last_name Subscriber’s last name
format Subscriber’s preferred email format. 1 for HTML and 2 for TEXT
status Subscriber’s status. 1 for confirmed, 2 for unconfirmed, 3 for active, 4 for blocked

Retrieving all subscribers

Item Description
URL /webservice/subscriber
HTTP method GET
HTTP response code on success 200
Response data format JSON

Retrieving a subscriber

Item Description
URL /webservice/subscriber/<subscriber_id>
HTTP method GET
HTTP response code on success 200
Response data format JSON

Updating a subscriber resource

Item Description
URL /webservice/subscriber/<subscriber_id>
HTTP method PUT
HTTP response code on success 200
Response data format JSON

PUT parameters

Parameter Description
email Subscriber’s email address
first_name Subscriber’s first name
middle_name Subscriber’s middle name
last_name Subscriber’s last name
format Subscriber’s preferred email format. 1 for HTML and 2 for TEXT
status Subscriber’s status. 1 for confirmed, 2 for unconfirmed, 3 for active, 4 for blocked

Deleting a subscriber

Item Description
URL /webservice/subscriber/<subscriber_id>
HTTP method DELETE
HTTP response code on success 204
Response data format JSON

Newsletter List API

Creating a new list

Item Description
URL /webservice/list
HTTP method POST
HTTP response code on success 201
Response data format JSON

POST parameters

Parameter Description
name Name of the list
description Description of the list

Retrieving all the lists

Item Description
URL /webservice/list
HTTP method GET
HTTP response code on success 200
Response data format JSON

Retrieving a list

Item Description
URL /webservice/list/<list_id>
HTTP method GET
HTTP response code on success 200
Response data format JSON

Updating a list

Item Description
URL /webservice/list/<list_id>
HTTP method PUT
HTTP response code on success 200
Response data format JSON

PUT parameters

Parameter Description
name Name of the list
description Description of the list

Deleting a list

Item Description
URL /webservice/list/<list_id>
HTTP method DELETE
HTTP response code on success 204
Response data format JSON

Message Queue API

Creating a message queue resource

Item Description
URL /webservice/messagequeue
HTTP method POST
HTTP response code on success 201
Response data format JSON

POST Parameters

Parameter Description
message_id Message id. This message must already exist in the origin server
lists[] One or more values with the same parameter name. For example lists%5B%5D=1&lists%5B%5D=2

You can specify custom text and HTML email bodies for each recipient. In order to send custom email bodies, send the following additional POST parameters:

Parameter Description
custom_content
  1. If the parameter is missing or doesn’t have the value 1, the other custom content parameters will be ignored
first_name First name of the subscriber
middle_name Middle name of the subscriber
last_name Last name of the subscriber
email Email address of the subscriber
format Email content type format preference - 1 for HTML and 2 for text
custom_text_body Custom text body
custom_html_body Custom HTML body
custom_subject Custom subject

You can also have Bizsense send a test email to one recipient instead of sending to the list. This API is being moved to /webservice/testmessagequeue. The following method is deprecated.

Parameter Description
message_id Message id. This message must already exist in the origin server
test_message 1
recipient Email address of the recipient
first_name First name of the recipient
middle_name Middle name of the recipient
last_name Last name of the recipient

List Subscriber API

Adding subscriber to list

Another way of thinking about it is creating a list subscriber resource.

Item Description
URL /webservice/listsubscriber
HTTP method POST
HTTP response code on success 201
Response data format JSON

POST Parameters

Parameter Description
list_id List ID
subscriber_id Subscriber ID

Retrieving all subscribers of a list

Item Description
URL /webservice/listsubscriber/list_subscriber_id/<list subscriber id>
HTTP method GET
HTTP response code on success 200
Response data format JSON

Removing a subscriber from a list.

Another way to put it is: deleting a list subscriber.

Item Description
URL /webservice/listsubscriber/list_subscriber_id/<list subscriber id>
HTTP method DELETE
HTTP response code on success 204
Response data format JSON