To access the User API documentation, navigate to Support -> API (User) section.

DLS Internet Services offers a comprehensive Admin API, enabling programmatic access to a wide array of resources within the PBX system. This API facilitates the development of customized solutions for the DLS Hosted PBX, offering deep integration and substantial benefits. It supports operations such as querying, adding, updating, and deleting various PBX resources, including users, groups, call routing configurations, contacts, and more.

For authentication, every Admin API request must include two POST parameters: api_user and api_key. The api_user parameter identifies the user by their extension, auth ID, or the format ‘extension@tenant-name’, while the api_key parameter is obtained from Users – Preferences within the PBX system. To enhance security, all specific action parameters must be sent via POST, except for the api_action parameter and the optional api_format parameter, which can be specified using GET.

We continuously work on expanding the Admin API’s capabilities, planning to introduce more functionalities in future updates. If you require an API method that is not currently documented, we encourage you to reach out to DLS Internet Services. This way, you can request further information or suggest new features to be added.

The API supports responses in various formats, including JSON (the default format), XML, YAML, CSV, and plain text. You can specify your preferred response format in two ways:

  1. Using the ‘api_format’ GET parameter in the request URL, as demonstrated in the examples below:
  • For JSON format: https://demo.pbx.dls.net/api/v1/example.php?api_action=test&api_format=json
  • For XML format: https://demo.pbx.dls.net/api/v1/example.php?api_action=test&api_format=xml
  • For YAML format: https://demo.pbx.dls.net/api/v1/example.php?api_action=test&api_format=yaml
  • For CSV format: https://demo.pbx.dls.net/api/v1/example.php?api_action=test&api_format=csv
  • For plain text format: https://demo.pbx.dls.net/api/v1/example.php?api_action=test&api_format=plain
  1. Setting the ‘Accept’ HTTP header in your request, as shown in these examples:
  • For JSON: Accept: application/json
  • For XML: Accept: application/xml
  • For YAML: Accept: application/x-yaml
  • For CSV: Accept: text/csv
  • For plain text: Accept: text/plain

Response Formats

Responses will be formatted according to the specified response format:

  • JSON Response Example

    • Success: { "result": "success", "example_data": "" }
    • Error: { "result": "error", "error": "Error details here" }
  • XML Response Example

    • Success: <response><result>success</result><example_data>...</example_data></response>
    • Error: <response><result>error</result><error>Error details here</error></response>
  • YAML Response Example

    • Success:
      ---
      result: "success"
      example_data: ""
      
    • Error:
      ---
      result: "error"
      error: "Error details here"
      
  • CSV Response Example

    • Typically formatted with columns and values indicating success or error states, such as:
      result,success
      error,
      example,result,1
      example,result,2
      
  • Plain Text Response Example

    • Indicates success (0 or greater, representing the ID of the related resource) or an error (-1). For instance:
      42
      -1
      

Access to managing the predictive dialer campaigns, scripts, contact lists and contacts is made available by the DLS Hosted PBX API. The following methods are currently available to manage the predictive dialer module:

  • Add a contact list: URL: https://demo.pbx.dls.net/api/v1/dialer.php?api_action=add_contact_list Success formats: JSON: { result: “success”, id: X } XML: <response><result>success</result><id>X</id></response> Plain: X Where X represents the new contact list’s ID. POST fields that must be provided (in addition to ‘api_user’ and ‘api_key’):
    • name: The name of the new contact list to be created.
  • Add a new or existing contact to a contact list: URL: https://demo.pbx.dls.net/api/v1/dialer.php?api_action=add_contact Success formats: JSON: { result: “success”, id: X } XML: <response><result>success</result><id>X</id></response> Plain: X Where X represents the new or existing contact’s ID. POST fields that can be provided (in addition to ‘api_user’ and ‘api_key’):
    • contact_list: The name or ID of the contact list to add the contact to.
    • *company_name: The name of the company the contact works or or associates with.
    • first_name: The first name of the contact.
    • last_name: The last name of the contact.
    • phone_number: The phone number of the contact. Note that international numbers cannot be used, and that an area code must be provided.
    • address: The address of the contact.
    • *address_2: The suite, PO box, etc. for the address.
    • city: The city the contact resides in.
    • state: The state the contact resides in (must be two characters, e.x. IL).
    • zip_code: The state the contact resides in (must be two characters, e.x. IL).
    • *country: The country the contact resides in (must be two characters per ISO 3166-1, e.x. US), defaults to US.
    • *dialOnDate: The date in which the dialer will call this contact. (must be in YYYY-MM-DD format.)
    • Additional custom fields can be added by passing the custom field name prefixed with ‘custom:’, e.x. ‘custom:customer_account_id’* = Optional

The Reporting API offers access to Call Detail Record (CDR) data, enabling users to generate customized reports by selecting specific informational columns and applying various filters.

The reporting API provides access to Call Detail Record (CDR) data. Individual informational columns can be chosen and inclusive and exclusive filter groups can be specified. URL: https://demo.pbx.dls.net/api/v1/reports.php?api_action=report

  • api_action: Must be “report”.

  • report_type: The type of report to generate. Currently only a detailed report table is supported, so “detail_table” must be specified.

  • columns[]: One or more columns to display. Can be specified multiple times in array notation or can be provided as a single comma-delimited list.

    • unique_id: The unique ID that identifies the call.
    • bridged_unique_ids: Zero or more unique IDs, comma delimited, that were bridged with the call.
    • bridged: Whether the call was ever successfully bridged with another channel; ‘Yes’ or ‘No’.
    • date: The date and time the call was placed or received.
    • callerid: The caller’s name and number, not always available.
    • last_app: The last application that executed on the call.
    • billable_duration: The billable duration of the call. In other words the amount of time after the call was initially answered by the PBX or a SIP device.
    • disposition: The disposition of the call, i.e. ANSWERED, BUSY, FAILED, or NO ANSWER. Note that the PBX will typically automatically answer inbound calls.
    • recording_link: The URL that can be used by an authorized user to listen to the call recording associated with the call.
    • transferred: Whether the call is known to have been transferred by the PBX; ‘Yes’ or ‘No’.
    • blind_transferred: Whether the call is known to have been blind transferred by the PBX; ‘Yes’ or ‘No’.
    • attended_transferred: Whether the call is known to have been attended transferred by the PBX; ‘Yes’ or ‘No’.
    • forwarded: Whether the call is known to have been forwarded by a SIP device; ‘Yes’ or ‘No’.
    • parked: Whether the call is known to have been parked by the PBX; ‘Yes’ or ‘No’.
    • direction: The direction of the call; ‘internal’, ‘inbound’, ‘directinbound’, ‘outbound’, ‘hairpin’.
    • cel_link: The URL link an authorized user can use to view Channel Event Log (CEL) information pertaining to the call.
    • src_type: The type of the source or caller of the call; can be ‘Extension’, ‘fixed-line’, ‘mobile’, ‘toll-free’, ‘premium rate’, ‘shared cost’, ‘voip’, ‘personal number’, etc.
    • src: The extension of the source or caller of the call; can be an extension number or phone number.
    • src_npa: The Numbering Plan Area (NPA) of the source or caller. For United States phone numbers, this is the area code.
    • src_nxx: The Central Office Prefix (NXX) of the source or caller. For United States phone numbers, this is the first three digits after the area code.
    • src_subscriber_number: The subscriber number of the source or caller. For United States phone numbers, this is the last four digits.
    • src_label: The source or caller label of the call; can be a user, a phone number, etc.
    • src_user_label: The label or name of the source user placing the call.
    • src_user_ext: The extension of the source user placing the call.
    • src_user_auth_id: The authorization ID of the source user placing the call.
    • src_user_tenant_name: The tenant name of the source user placing the call.
    • dst_type: The type of the destination or callee of the call; can be ‘Agent’, ‘Queue’, ‘Extension’, ‘Conference’, ‘fixed-line’, ‘mobile’, ‘toll-free’, ‘premium rate’, ‘shared cost’, ‘voip’, ‘personal number’, etc.
    • dst: The extension of the destination or callee of the call; can be an extension number, queue name, conference number, phone number, etc.
    • dst_npa: The Numbering Plan Area (NPA) of the destination or callee. For United States phone numbers, this is the area code.
    • dst_nxx: The Central Office Prefix (NXX) of the destination or callee. For United States phone numbers, this is the first three digits after the area code.
    • dst_subscriber_number: The subscriber number of the destination or callee. For United States phone numbers, this is the last four digits.
    • dst_label: The destination or callee label of the call; can be a conference bridge, a queue, a user, a phone number, etc.
    • dst_original: The original destination of the call, before it was diverted or navigated through IVR.
    • dst_user_label: The label or name of the destination user receiving the call.
    • dst_user_ext: The extension of the destination user receiving the call.
    • dst_user_auth_id: The authorization ID of the destination user receiving the call.
    • dst_user_tenant_name: The tenant name of the destination user receiving the call.
    • dst_context: The destination dialplan context the call was last in on the PBX.
    • involved_queues: Zero or more queue names, comma delimited, that the call was involved with.
    • involved_queue_count: The number of queues that the call was involved with.
    • involved_agents: Zero or more queue agents, comma delimited, that the call was involved with.
    • involved_agent_count: The number of queue agents that the call was involved with.
    • transferred_from_queues: Zero or more queue names, comma delimited, that the call was transferred from.
    • transferred_from_queues_count: The number of queues that the call was transferred from.
    • transferred_from_agents: Zero or more queue agents, comma delimited, that the call was transferred from.
    • transferred_from_agents_count: The number of queue agents that the call was transferred from.
    • abandoned_queues: Zero or more queue names, comma delimited, that the call was abandoned in.
    • queue_talk_duration: The total queue talk duration of the call.
    • queue_avg_talk_duration: The average queue talk duration of the call.
    • queue_hold_duration: The total queue hold duration of the call.
    • queue_avg_hold_duration: The average queue hold duration of the call.
  • Filters: Filters provide the ability to restrict the result set based on certain specified criteria. The flexibility of filters allows the format in which they are defined to vary based on the type of filter. As a result, understanding filtering can allow you to retrieve results more tailored to your needs.

    • Filter group: Zero or more filter groups can be defined that perform logical AND, OR, inclusive, and exclusive operations based on the filter rules within them.

      • Rules: A filter group can have one or more rules within it that actually specify the filter criteria for the records to be returned or omitted.
        • type: The type of filter rule, see below for a list of available filter rules.
        • operator: Some filter rules require values to be provided. For those that can do mathematical comparison, an operator value can be specified.
          • =: Test that the record we’re filtering against has its value equivalent to the value specified in ‘value’.
          • !=: Test that the record we’re filtering against doesn’t have its value equivalent to the value specified in ‘value’.
          • >: Test that the record we’re filtering against has its value greater than the value specified in ‘value’.
          • >=: Test that the record we’re filtering against has its value greater or equal to than the value specified in ‘value’.
          • <: Test that the record we’re filtering against has its value less than the value specified in ‘value’.
          • <=: Test that the record we’re filtering against has its value less than or equal to the value specified in ‘value’.
          • between: Test that the record we’re filtering against has its value between the range of ‘lower_value’ and ‘upper_value’.
          • !between: Test that the record we’re filtering against doesn’t have its value between the range of ‘lower_value’ and ‘upper_value’.
        • lower_value: When comparing a value range, this is the lower value to compare against.
        • upper_value: When comparing a value range, this is the upper value to compare against.
        • value: When comparing to an specific value, this is that value. For some filters this can also be an array of multiple values.
      • AND: A filter that uses AND will need all of its filter rules to match for the group to be considered matched.
      • OR: A filter that uses OR will need any of its filter rules to match for the group to be considered matched.
      • Include: An inclusive filter group means that records that match the filter group will be returned. All inclusive filter groups must match a record for that record to be returned.
      • Exclude: An exclusive filter group means that records that match the filter group will not be returned, taking priority over inclusive filter groups. Any exclusive filter group can match a record for that record to be omitted.

      Types of filters:

      • duration: Duration
      • bridged: Was Bridged
      • transferred: Was Transferred
      • blind_transferred: Was Blind Transferred
      • attended_transferred: Was Attended Transferred
      • forwarded: Was Forwarded
      • parked: Was Parked
      • direction: Call Direction
      • tn: Telephone Number(s)
      • pbxtn: PBX Telephone Number(s)
      • international: Involved an International Telephone Number
      • international_outbound: Charged as an International Call
      • tollfree: Involved a Toll Free Telephone Number
      • tollfree_inbound: Charged as a Toll Free Call
      • recorded: Has Recording
      • voicemail: Went to Voicemail
      • users: User(s)
      • tenant_users: User(s) within Tenant(s)
      • group_users: User(s) within User Group(s)
      • queue_users: User(s) within Queue(s)
      • groups: User Group(s)
      • fax: Is a Fax
      • fax_successful: Is a Successful Fax
      • fax_failed: Is a Failed Fax
      • fax_detect_failed: Failed Fax Detection
      • fax_page_count: Fax Page Count
      • recorded_conference: Has Recording from a Conference
      • conference: Is a Conference Call
      • otf_conference: On the Fly Conference Call
      • conferences: Conference(s)

JSON Example:

“filter_groups”: [
				{
					“exclusivity”: “include”, //This could also be ‘exclude’
					“logical_operator”: “and”, //This could also be ‘or’
					“rules”: [
				{
					“type”: “duration”, //Require that the call was a certain duration
					“operator”: “between”, //Specify that we’re providing a range for the duration
					“lower_value”: 30, //Require a duration of at least 30 seconds
					“upper_value”: 60, //Require a duration of at most 60 seconds
				},
				{
					“type”: “bridged”, //Make sure the call connected to another peer
				},
				],
				},
				],

options[]: One or more options that manipulate how the report executes and the format of data it returns. It can be specified multiple times in array notation or can be provided as a single comma-delimited list. Each option should be specified in the format: key=value

  • formatted_columns_names: When specified as true, the column names in the result set will be better formatted for human readability.
  • map_mirrors: When specified as true, mirrored extension calls will instead be displayed as if placed or received by the parent extension.
  • timezone: The timezone to run the report with, must be in the format: Country/City
  • formatted_dates: When specified as true, dates will be formatted for better human readability, i.e., MM/DD/YY HH:MM am/pm instead of YYYY-MM-DD HH:MM:DD
  • formatted_durations: When specified as true, durations will be formatted for better human readability, i.e. 165 will become 00:02:45
  • formatted_tns: When specified as true, phone numbers will be formatted according to the E.164 standard, i.e. 8478544799 will become (847)854-4799.
  • count_only: When specified as true, only the number of results will be returned, not an actual result set.
  • order_by: The column to order the results by. Note that not all columns are sortable.
  • order_direction: The sort direction, either ASCENDING or DESCENDING.
  • page: The desired page number of the returned result set, starting at 0, ‘ALL’ can be specified to not receive paginated results.
  • page_offset: The desired offset within the result set, starting at 0. This should not be specified at the same time as ‘page’.
  • per_page: The desired number of call records per page for the returned result set.
  • from: The start of the report date range, should be in the format: YYYY-MM-DD HH:MM:SS
  • to: The end of the report date range, should be in the format: YYYY-MM-DD HH:MM:SS

Success format:

JSON:

{
	“result”: “success”,
	“error”: “”,
	“total_results”: 3,
	“title”: “Restrict inclusive by date range ‘Mon, Oct 1, 2016 12:39 pm’ to ‘Mon, Oct 28, 2016 12:39 pm’ - America/Chicago UTC-5:00 (DST)”,
	“columns”: [
	“unique_id”,
	“date”,
	“callerid”,
	“billable_duration”,
	“src_label”,
	“dst_label”,
	],
	“results”: [
		[
		“1476370446.2”,
		“2016-10-13 09:54:06”,
		“\“Example User 1\” <123>”,
		“85”,
		“123@default - Example User 1”,
		“321@default - Example User 2”
		],
		[
		“1476370384.0”,
		“2016-10-13 09:53:04”,
		“\“DLS Internet Services\” <8478544799>”,
		“41”,
		“(847) 854-4799”,
		“123@default - Example User 1”
		],
		[
		“1476370358.2”,
		“2016-10-13 09:52:38”,
		“\“John\” <8881234567>”,
		“26”,
		“(888) 123-4567”,
		“321@default - Example User 2”
		],
	],
}

Access to provide real-time statistics for calls, users, queues, faxes, conferences, device provisioning, and predictive dialer within the system. It offers a snapshot of the current activity, allowing users to monitor and analyze key metrics for effective management and optimization of communication resources.

Get Users: URL: https://demo.pbx.dls.net/api/v1/status.php?api_action=users&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”
}

XML:

<?xml version=“1.0” standalone=“yes”?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
</request>

Success formats: 

JSON:

{
	"result": "success",
	"users": [
				{
					"ext": "630",
					"user": "Tom",
					"tenant": "default",
					"authid": "beaucrn6",
					"vmail": "6/6",
					"status": "OK (3 ms)",
					"host": "209.242.9.134",
					"port": “12447”
				},
				{
					"ext": "69",
					"user": "Jerry",
					"tenant": "default",
					"authid": "cpirg16m",
					"vmail": "0/0",
					"status": "Unmonitored",
					"host": "N/A",
					"port": “0”
				}
 			]
}

    XML:    

    <response>
        <result>success</result>
        <users>
        <array>
                <ext>630</ext>
                <user>Tom</user>
                <tenant>default</tenant>
                <authid>beaucrn6</authid>
                <vmail>6/6</vmail>
                <status>OK (3 ms)</status>
                <host>209.242.9.134</host>
                <port>12447</port>
            </array>
            <array>
                <ext>69</ext>
                <user>Jerry</user>
                <tenant>default</tenant>
                <authid>cpirg16m</authid>
                <vmail>0/0</vmail>
                <status>Unmonitored</status>
                <host>N/A</host>
                <port>0</port>
            </array>
        </users>
    </response>

Get Queues URL: https://demo.pbx.dls.net/api/v1/status.php?api_action=queues&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
	“queues”: {
		“support_queue”: {
			“queue”: “support_queue”,
			“holdtime”: “4s”,
			“waiting”: “0”,
			“complete”: “6”,
			“lost”: “1”,
			“hunt”: “ringall”,
			“agents”: {
				“beaucrn6”: {
					“name”: “Tom”,
					“tenant”: “default”,
					“tid”: “0”,
					“avail”: “1”,
					“callcount”: “6”,
					“lastcall”: “30 secs ago”,
					“status”: “Not in use”,
					“otherdata”: " (ringinuse disabled) (dynamic)",
					“penalty”: “0”,
					“paused”: “0”
					“connected_to”: “XXXXXXXXXX”
							}
						}
						“calls_waiting”: 
						[
							{
							“number”: “XXXXXXXXXX”,
							“priority”: “1”,
							“wait_time”: “0:04”
							}
						]
					},
					“testqueue”: {
					“queue”: “testqueue”,
					“holdtime”: “0s”,
					“waiting”: “0”,
					“complete”: “0”,
					“lost”: “0”,
					“hunt”: “ringall”,
					“agents”: []
					},
					}
				}

XML

<response>
	<result>success</result>
	<queues>
		<support_queue>
			<queue>support_queue</queue>
			<holdtime>4s</holdtime>
			<waiting>0</waiting>
			<complete>6</complete>
			<lost>1</lost>
			<hunt>ringall</hunt>
			<agents>
				<beaucrn6>
					<name>Tom</name>
					<tenant>default</tenant>
					<tid>0</tid>
					<avail>1</avail>
					<callcount>6</callcount>
					<lastcall>94351 secs ago</lastcall>
					<status>Not in use</status>
					<otherdata> (ringinuse disabled) (dynamic)</otherdata>
					<penalty>0</penalty>
					<paused>0</paused>
					<connected_to>XXXXXXXXXX</connected_to>
				</beaucrn6>
			</agents>
			<calls_waiting>
				<array>
					<number>8153556261</number>
					<priority>1</priority>
					<wait_time>1:17</wait_time>
				</array>
			</calls_waiting>
		</support_queue>
		<testqueue>
			<queue>testqueue</queue>
			<holdtime>0s</holdtime>
			<waiting>0</waiting>
			<complete>0</complete>
			<lost>0</lost>
			<hunt>ringall</hunt>
			<agents></agents>
		</testqueue>
	</queues>
</response>

Get Calls 

URL: https://demo.pbx.dls.net/api/v1/status.php?api_action=calls&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
	“calls”: {
		“inbound”: [
						{
						“callerid”: “1234567890”,
						“connected_to”: “Queue:support_queue”,
						“status”: “Connected”,
						“elapsed”: “0h4m3s”
						}
					],
		“outbound”: [
						{
						“ext”: “985@default-Jerma”,
						“callerid”: “+1234567890”,
						“connected_to”: “1023456789”,
						“status”: “Connected”,
						“elapsed”: “0h1m20s”
						}
					],
		“internal”: [
						{
						“ext”: “985@default-Jerry”,
						“connected_to”: “630@default-Tom”,
						“status”: “Ringing”,
						“elapsed”: “0h0m4s”
						}
					]
		}
}

XML

<response>
	<result>success</result>
		<calls>
			<inbound>
				<callerid>1234567890</callerid>
				<connected_to>Queue:support_queue</connected_to>
				<status>Connected</status>
				<elapsed>0h4m3s</elapsed>
			</inbound>
		<outbound>
			<ext>985@default-Jerma</ext>
			<callerid>+1234567890</callerid>
			<connected_to>1023456789</connected_to>
			<status>Connected</status>
			<elapsed>0h1m20s</elapsed>
		</outbound>
		<internal>
			<ext>985@default-Jerry</ext>
			<connected_to>630@default-Tom</connected_to>
			<status>Ringing</status>
			<elapsed>0h0m4s</elapsed>
		</internal>
	</calls>
</response>

Get Faxes 

URL: https://demo.pbx.dls.net/api/v1/status.php?api_action=faxes&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
		“faxes”: {
		“queued_faxes”: [
						{
						“to”: “7735966400”,
						“from”: “beaucrn6”,
						“page”: “N/A”,
						“status”: “Queued”,
						“attempt”: “2/5”,
						“next_retry”: “1 minute(s)”
						},
						{
						“to”: “8474743126”,
						“from”: “beaucrn6”,
						“page”: “1/0”,
						“status”: “Processing”,
						“attempt”: “1/5”,
						“next_retry”: “Now”
						}
						],
						“fax_stats”: {
									“current_sessions”: “1”,
									“reserved_sessions”: “0”,
									“transmit_attempts”: “11”,
									“receive_attempts”: “6”,
									“completed_faxes”: “15”,
									“failed_faxes”: “7”,
									“success”: “8”,
									“switched_to_t.38”: “0”,
									“call_dropped”: “2”,
									“no_fax”: “0”,
									“negotiation_failed”: “0”,
									“train_failure”: “0”,
									“retries_exceeded”: “0”,
									“protocol_error”: “0”,
									“tx_protocol_error”: “0”,
									“rx_protocol_error”: “0”,
									“file_error”: “0”,
									“memory_error”: “0”,
									“unknown_error”: “0”
									}
			}
}

XML

<response>
	<result>success</result>
	<faxes>
		<queued_faxes>
			<array>
				<to>8474743126</to>
				<from>beaucrn6</from>
				<page>N/A</page>
				<status>Queued</status>
				<attempt>5/5</attempt>
				<next_retry>1 minute(s)</next_retry>
			</array>
		</queued_faxes>
		<fax_stats>
			<current_sessions>0</current_sessions>
			<reserved_sessions>0</reserved_sessions>
			<transmit_attempts>18</transmit_attempts>
			<receive_attempts>6</receive_attempts>
			<completed_faxes>19</completed_faxes>
			<failed_faxes>11</failed_faxes>
			<success>8</success>
			<switched_to_t.38>0</switched_to_t.38>
			<call_dropped>2</call_dropped>
			<no_fax>0</no_fax>
			<negotiation_failed>0</negotiation_failed>
			<train_failure>0</train_failure>
			<retries_exceeded>0</retries_exceeded>
			<protocol_error>0</protocol_error>
			<tx_protocol_error>0</tx_protocol_error>
			<rx_protocol_error>0</rx_protocol_error>
			<file_error>0</file_error>
			<memory_error>0</memory_error>
			<unknown_error>0</unknown_error>
		</fax_stats>
	</faxes>
</response>

Get Conferences 

URL: https://demo.pbx.dls.net/api/v1/status.php?api_action=conferences&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
	“conferences”: [
					{
					“conference_number”: “2000”,
					“users”: “1”,
					“admins”: “0”,
					“locked”: “Unlocked”
					}
					]
}

XML:

<response>
	<result>success</result>
	<conferences>
		<array>
			<conference_number>2000</conference_number>
			<users>1</users>
			<admins>0</admins>
			<locked>Unlocked</locked>
		</array>
	</conferences>
</response>

Get Provisioning 

URL: https://demo.pbx.dls.net/api/v1/status.php?api_action=provisioning&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
	“provisioning”: [
			{
				“ext”: “630@default”,
				“mac_address”: “24:9a:d8:02:f4:4e”,
				“device”: “Yealink W70P”,
				“last_provisioned”: “2024-01-30 13:42:56”,
				“provisioned”: “Yes”,
				“last_provision_delta”: “00:59:07”,
				“calls_in”: “0”,
				“calls_out”: “0”,
				“file_name”: “249ad802f44e.cfg”
			},
			{
				“ext”: “635@default”,
				“mac_address”: “00:04:f2:cc:2c:46”,
				“device”: “Polycom VVX400”,
				“last_provisioned”: “2024-01-24 11:59:55”,
				“provisioned”: “Yes”,
				“last_provision_delta”: “146:42:08”,
				“calls_in”: “0”,
				“calls_out”: “0”,
				“file_name”: “0004f2cc2c46-provision.cfg”
			},
			{
				“ext”: “985@default”,
				“mac_address”: “00:15:65:4d:f1:b7”,
				“device”: “Yealink SIP-T32G”,
				“last_provisioned”: “2024-01-12 12:00:26”,
				“provisioned”: “No”,
				“last_provision_delta”: “Over a week ago”,
				“calls_in”: “0”,
				“calls_out”: “0”,
				“file_name”: “0015654df1b7.cfg”
			}
			]
}

XML:

<response>
	<result>success</result>
		<provisioning>
		<array>
			<ext>630@default</ext>
			<mac_address>24:9a:d8:02:f4:4e</mac_address>
			<device>Yealink W70P</device>
			<last_provisioned>2024-02-01 13:45:38</last_provisioned>
			<provisioned>Yes</provisioned>
			<last_provision_delta>00:46:28</last_provision_delta>
			<calls_in>0</calls_in>
			<calls_out>0</calls_out>
			<file_name>249ad802f44e.cfg</file_name>
		</array>
		<array>
			<ext>635@default</ext>
			<mac_address>00:04:f2:cc:2c:46</mac_address>
			<device>Polycom VVX400</device>
			<last_provisioned>2024-01-24 11:59:55</last_provisioned>
			<provisioned>Yes</provisioned>
			<last_provision_delta>Over a week ago</last_provision_delta>
			<calls_in>0</calls_in>
			<calls_out>0</calls_out>
			<file_name>0004f2cc2c46-provision.cfg</file_name>
		</array>
		<array>
			<ext>985@default</ext>
			<mac_address>00:15:65:4d:f1:b7</mac_address>
			<device>Yealink SIP-T32G</device>
			<last_provisioned>2024-01-12 12:00:26</last_provisioned>
			<provisioned>No</provisioned>
			<last_provision_delta>Over a week ago</last_provision_delta>
			<calls_in>0</calls_in>
			<calls_out>0</calls_out>
			<file_name>0015654df1b7.cfg</file_name>
		</array>
		</provisioning>
</response>

Get Predictive Dialer Stats 

URL: https://demo.pbx.dls.net/api/v1/status.php?api_action=dialer&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
	“dialer”: [
		{
			“id”: “1”,
			“name”: “My Campaign”,
			“type”: “blaster”,
			“max_attempts”: “1”,
			“caller_id”: “3”,
			“call_ratio”: “1.00”,
			“agent_queue_id”: “”,
			“script_id”: “”,
			“context_id”: “1”,
			“rule_id”: “27”,
			“step_id”: “39”,
			“min_callback_time”: “2”,
			“machine_context_id”: “44”,
			“machine_rule_id”: “20”,
			“machine_step_id”: “28”,
			“display_contacts_form”: “1”,
			“hangup_on_disposition”: “1”,
			“hide_number_in_caller_id”: “0”,
			“status”: “Stopped”
		},
	]
}

XML:

<response>
	<result>success</result>
	<dialer>
		<array>
			<id>1</id>
			<name>new camp</name>
			<type>blaster</type>
			<max_attempts>1</max_attempts>
			<caller_id>3</caller_id>
			<call_ratio>1.00</call_ratio>
			<agent_queue_id></agent_queue_id>
			<script_id></script_id>
			<context_id>1</context_id>
			<rule_id>27</rule_id>
			<step_id>39</step_id>
			<min_callback_time>2</min_callback_time>
			<machine_context_id>44</machine_context_id>
			<machine_rule_id>20</machine_rule_id>
			<machine_step_id>28</machine_step_id>
			<display_contacts_form>1</display_contacts_form>
			<hangup_on_disposition>1</hangup_on_disposition>
			<hide_number_in_caller_id>0</hide_number_in_caller_id>
			<status>Stopped</status>
		</array>
	</calls>
</response>

Get Predictive Dialer Logs URL: https://demo.pbx.dls.net/api/v1/status.php?api_action=dialerlogs&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
	“logs”: [
		{
			“campaign”: “My Campaign”,
			“output”: [
			“[Dec 29 17:32:12] STATUS: Ready for dialing”,
			“[Dec 29 17:32:12] DEBUG: Reset dispositions for contact list 8”,
			“[Dec 29 17:32:12] DEBUG: Pulling a contact to dial”,
			“[Dec 29 17:32:12] DEBUG: Created call file /var/spool/asterisk/outgoing/pdialer_pd-12-8-3”,
			“[Dec 29 17:32:12] INFO: Placing call to pd-12-8-3 at 8153556261”,
			“[Dec 29 17:32:14] DEBUG: Checking failed calls”,
			“[Dec 29 17:32:16] DEBUG: Checking failed calls”,
			“[Dec 29 17:32:17] DEBUG: Checking completed calls”
			]
		},
	]
}

XML:

<response>
	<result>success</result>
	<logs>
		<array>
		<campaign>My Campaign</campaign>
		<output>
			<value>[Dec 29 17:32:12] STATUS: Ready for dialing</value>
			<value>[Dec 29 17:32:12] DEBUG: Reset dispositions for contact list 8</value>
			<value>[Dec 29 17:32:12] DEBUG: Pulling a contact to dial</value>
			<value>[Dec 29 17:32:12] DEBUG: Created call file /var/spool/asterisk/outgoing/pdialer_pd-12-8-3</value>
			<value>[Dec 29 17:32:12] INFO: Placing call to pd-12-8-3 at 8153556261</value>
			<value>[Dec 29 17:32:14] DEBUG: Checking failed calls</value>
			<value>[Dec 29 17:32:16] DEBUG: Checking failed calls</value>
			<value>[Dec 29 17:32:17] DEBUG: Checking completed calls</value>
		</output>
		</array>
	</calls>
</response>

Access to SMS is provided by sending a specified phone number(s) or extension(s) or querying SMS from the SMS record table. SMS is limited to 200 characters. The following methods are currently available to send and query SMS via the API:

Send SMS: 

URL: https://demo.pbx.dls.net/api/v1/sms.php?api_action=send_sms&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
	“dst”:“100,2223334444”,
	“account_code”:“505”,
	“body”:“This is a successful message.”
}
{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
	“dst”:[
				“100”,
				“200”
			],
	“account_code”:“505”,
	“body”:“This is a successful message.”
}

XML:

<?xml version=“1.0” standalone=“yes”?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
	<dst>100</dst>
	<dst>200</dst>
	<account_code>505</account_code>
	<body>This is a successful message.</body>
</request>
<?xml version=“1.0” standalone=“yes”?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
	<dst>100,100</dst>
	<account_code>505</account_code>
	<body>This is a successful message.</body>
</request>

Success formats: 

JSON:

{
	“result”:“success”,
	“src”:“100”,
	“dst”:[
	“100”,"+2223334444"
			],
			“body”:“This is a successful message.”,
			“account_code”:“505”,
			“message_id”: “1525443917.5aec6d4dd217b”
}

XML:

<response>
	<result>success</result>
	<src>N</src>
	<dst>
	<value>X</value>
	<value>X</value>
	</dst>
	<body>Y</body>
	<account_code>Z</account_code>
	<message_id>1525443917.5aec6d4dd217b</message_id>
</response>

POST fields that must be provided (in addition to ‘api_user’ and ‘api_key’):

  • dst: The destination phone number(s) or extensions(s) to send the SMS to in E.164 formatting. Separate values by commas to send to multiple destinations.
  • body: The content of the SMS.
  • account_code: (*optional) The account code to be associated with the SMS.

Query SMS: URL: https://demo.pbx.dls.net/api/v1/sms.php?api_action=query_sms&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
	“filters[]”:{
		“from”:“05/01/2017 10:58 am”,
		“to”:“07/30/2017 10:58 am”,
		“src”:[
				“100”,
				“z64xxx2n”,
				“+12223334456”
				],
		“dst_original”:[
				“+12223334456”,
				“+12223334459”
						],
		“dst”:“100”,
		“start_cdr_id”: 5256,
		“end_cdr_id”: 5356,
		“status”:“success”,
		“direction”:“inbound”,
		“message_id”:"XXX.XXX",
		“account_code”:“XXX”
		},
	“results_limit”:10,
	“results_offset”:0,
	“order_by”:“desc”
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
	<filters[]>
		<from>05/01/2017 10:58 am</from>
		<to>07/30/2017 10:58am</to>
		<src>100</src>
		<src>z64xxx2n</src>
		<src>+12223334456</src>
		<dst_original>+12223334456</dst_original>
		<start_cdr_id>5256</start_cdr_id>
		<end_cdr_id>5356</end_cdr_id>
		<dst>100</dst>
		<status>success</status>
		<direction>inbound</direction>
		<message_id>XXX.XXX</message_id>
		<account_code>XXX</account_code>
	</filters[]>
	<results_limit>10</results_limit>
	<results_offset>0</results_offset>
	<order_by>desc</order_by>
</request>

Success formats: 

JSON:

{
		“result”:“success”,
		“total_results”:“171”,
		“results_limit”:“10”,
		“results_offset”:“0”,
		“results”:[
				{
					“id”:“3131”,
					“timestamp”:“2017-06-22 15:36:41”,
					“src_label”:“100@default - Phone Name”,
					“dst_original_label”:"",
					“dst_label”:“2224445555”,
					“status”:“success”,
					“direction”:“outbound”,
					“message”:“Test Message”,
					“account_code”:“213985”,
					“message_id”:“1498157871.594c132f4c2fa”
				},
				{
					“id”:“3121”,
					“timestamp”:“2017-06-22 13:57:51”,
					“src_label”:“100@default - Phone Name”,
					“dst_original_label”:"",
					“dst_label”:“2224445555”,
					“status”:“success”,
					“direction”:“outbound”,
					“message”:“Test Message”,
					“account_code”:"",
					“message_id”:“1498157871.594c132f4c2fa”
				}
				]
}

XML:

<?xml version=“1.0” encoding=“UTF-8” ?>
<result>success</result>
	<total_results>171</total_results>
	<results_limit>10</results_limit>
	<results_offset>0</results_offset>
<results>
	<id>3131</id>
	<timestamp>2017-06-22 15:36:41</timestamp>
	<src_label>100@default - Phone Name</src_label>
	<dst_original_label></dst_original_label>
	<dst_label>2224445555</dst_label>
	<status>success</status>
	<direction>outbound</direction>
	<message>Test Message</message>
	<account_code>213985</account_code>
	<message_id>1498157871.594c132f4c2fa</message_id>
</results>
<results>
	<id>3121</id>
	<timestamp>2017-06-22 13:57:51</timestamp>
	<src_label>100@default - Phone Name</src_label>
	<dst_original_label></dst_original_label>
	<dst_label>2224445555</dst_label>
	<status>success</status>
	<direction>outbound</direction>
	<message>Test Message</message>
	<account_code></account_code>
	<message_id>1498157871.594c132f4c2fa</message_id>
</results>

POST fields that can be provided (in addition to ‘api_user’ and ‘api_key’):

filters[]: 

The following filters can be applied. Filters must be passed as an array.

  • src: The source of the SMS . Can be a phone number in E.164 formatting or a user’s authid. Can be passed as a single value or a 1 dimensional array of values.
  • dst_original: The original destination of the SMS. Can be a phone number in E.164 formatting or a user’s authid. Can be passed as a single value or a 1 dimensional array of values. If a system number is configured to forward to a user or outbound phone number, the system phone number will be displayed as the original destination.
  • dst: The destination of the SMS. Can be a phone number in E.164 formatting or a user’s authid. Can be passed as a single value or a 1 dimensional array of values.
  • status: The status of the SMS. Please note, a ‘success’ status indicates that the message was successfully sent, not that the message was succesfully delivered or read by the recipient. Can be ‘success’ or ‘failure’.
  • direction: The direction of the SMS. Can be ‘inbound’, ‘internal’, ‘hairpin’, or ‘outbound’. A hairpin SMS is a message that was inbound to a system phone number but was forwarded to an outbound phone number. Can be passed as a single value or a 1 dimensional array of values.
  • from: The starting date of the query, in the format of YYYY-MM-DD HH:MM:SS or unix timestamp.
  • to: The ending date of the query, in the format of YYYY-MM-DD HH:MM:SS or unix timestamp.
  • message_id: The message ID associated with an SMS. Can be passed as a single value or a 1 dimensional array of values.
  • cdr_id: The CDR ID associated with an SMS. Can be passed in as a single value or a 1 dimensional array of values.
  • start_cdr_id: The starting CDR ID associated with an SMS. A larger end_cdr_id value must also be provided.
  • end_cdr_id: The ending CDR ID associated with an SMS. A smaller start_cdr_id value must also be provided.
  • account_code: The account code associated with an SMS. Can be passed as a single value or a 1 dimensional array of values.
  • results_limit: The number of results to return. Useful for creating paginated results.
  • results_offset: An offset value for the query. Useful when combined with ‘limit’ to create paginated results.
  • order_by: Orders query results by the timestamp of the SMS. Use ‘ASC’ (ascending) or ‘DESC’ (descending) values.

Access to query campaign opt-in lists and tenant opt-out lists related to the Campaign Registry. This endpoint also allows users to add numbers to opt-in and opt-out lists and remove them. NOTE: You are legally required to obtain permission (consent) to exchange messages from each consumer or business you will be interacting with via SMS. There are severe penalties for disregarding customer consent. Please refer to the Telephone Consumer Protection Act (TCPA) for more information. The following methods are currently available for this endpoint:

Query Lists: 

URL: https://demo.pbx.dls.net/api/v1/subscribers.php?api_action=query_lists&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
}

XML:

<?xml version=“1.0” standalone=“yes”?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
</request>

Success formats: 

JSON:

{
	“result”:“success”,
	“optin”: [
		{
			“campaign_id”: “XXXXXXX”,
			“campaign_name”: “Name of the campaign”,
			“total_subscribers”: “190”,
			“subscribed_at”: [
								{
									“number”: “5555555555”,
									“reason”: “MANUAL”,
									“subscribe_text”: “N\A”,
									“subscribed_at”: “2023-06-22 10:16:25”
								},
								{…}
							]
			},
			{…}
			],
			“optout”: [
						{
							“tenant_id”: “0”,
							“campaign_name”: “name of the tenant”,
							“total_unsubscribers”: “24”,
							“unsubscribed_at”: [
						{
							“number”: “5555555555”,
							“reason”: “MANUAL”,
							“unsubscribe_text”: “N\A”,
							“unsubscribed_at”: “2023-06-22 10:16:25”
						},
						{…}
					]
		},
	{…}
	]
}

XML:

<?xml version=“1.0” standalone=“yes”?>
<response>
	<result>success</result>
		<optin>
			<array>
				<campaign_id>XXXXX</campaign_id>
				<campaign_name>Name of the campaign</campaign_name>
				<total_subscribers>222</total_subscribers>
				<subscribers>
					<array>
						<number>5555555555</number>
						<reason>MANUAL</reason>
						<subscribe_text>N\A</subscribe_text>
						<subscribed_at>2023-06-22 10:16:25</subscribed_at>
					</array>
					…
				</subscribers>
			</array>
		…
		</optin>
		<optout>
			<array>
				<tenant_id>0</tenant_id>
				<tenant_name>default</tenant_name>
				<total_unsubscribers>1</total_unsubscribers>
				<unsubscribers>
					<array>
						<number>1122334444</number>
						<reason>MANUAL</reason>
						<unsubscribe_text>N\A</unsubscribe_text>
						<unsubscribed_at>2023-07-03 13:08:43</unsubscribed_at>
					</array>
				…
				</unsubscribers>
			</array>
			…
	</optout>
</response>

No POST fields are required in the request body (besides ‘api_user’ and ‘api_key’):

Add Subscriber Opt-In: URL: https://demo.pbx.dls.net/api/v1/subscribers.php?api_action=add_subscriber&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
	“phone_number”: 1112224444,
	“campaign_id”: “XXXXXXX”
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
	<phone_number>1112224444</phone_number>
	<campaign_id>XXXXXXX</campaign_id>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
	“success”: “Successfully added a new subscriber”
}

XML:

<?xml version=“1.0” encoding=“UTF-8” ?>
<result>success</result>
<success>Sucessfully added a new subscriber</success>

POST fields that must be provided (in addition to ‘api_user’ and ‘api_key’):

  • phone_number: The number to add to the opt-in list.
  • campaign_id: The campaign id of the campaign whose opt-in list the phone number provided should be added to.

Remove Subscriber Opt-In: 

URL: https://demo.pbx.dls.net/api/v1/subscribers.php?api_action=remove_subscriber&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
	“phone_number”: 1112224444,
	“campaign_id”: “XXXXXXX”
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
	<phone_number>1112224444</phone_number>
	<campaign_id>XXXXXXX</campaign_id>
</request>

Success formats: JSON:

{
	“result”: “success”,
	“success”: “Successfully removed the subscriber”
}

XML:

<?xml version=“1.0” encoding=“UTF-8” ?>
<result>success</result>
<success>Sucessfully removed the subscriber</success>

POST fields that must be provided (in addition to ‘api_user’ and ‘api_key’):

  • phone_number: The number to remove from the opt-in list.
  • campaign_id: The campaign id of the campaign whose opt-in list the phone number provided should be removed from.

Add Subscriber Opt-Out: URL: https://demo.pbx.dls.net/api/v1/subscribers.php?api_action=add_unsubscriber&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
	“phone_number”: 1112224444,
	“tenant_id”: “0”
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
	<phone_number>1112224444</phone_number>
	<tenant_id>0</tenant_id>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
	“success”: “Successfully added unsubscriber to the provided tenants opt-out list”.
}

XML

<?xml version=“1.0” encoding=“UTF-8” ?>
<result>success</result>
<success>Successfully added unsubscriber to the provided tenants opt-out list.</success>

POST fields that must be provided (in addition to ‘api_user’ and ‘api_key’):

  • phone_number: The number to add to the opt-out list.
  • tenant_id: The tenant id of the tenant whose opt-out list the phone number provided should be added to.

Remove Subscriber Opt-Out: 

URL: https://demo.pbx.dls.net/api/v1/subscribers.php?api_action=remove_unsubscriber&api_format=json 

Request formats: 

JSON:

{
	“api_user”:“100@default”,
	“api_key”:“XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX”,
	“phone_number”: 1112224444,
	“tenant_id”: “0”
}

XML:

<?xml version=“1.0” standalone=“yes” ?>
<request>
	<api_user>100@default</api_user>
	<api_key>XXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXX</api_key>
	<phone_number>1112224444</phone_number>
	<tenant_id>0</tenant_id>
</request>

Success formats: 

JSON:

{
	“result”: “success”,
	“success”: “Successfully removed the unsubscriber from the provided tenants opt-out list”.
}

XML:

<?xml version=“1.0” encoding=“UTF-8” ?>
<result>success</result>
<success>Successfully removed the unsubscriber from the provided tenants opt-out list.</success>

POST fields that must be provided (in addition to ‘api_user’ and ‘api_key’):

  • phone_number: The number to remove from the opt-out list.
  • tenant_id: The tenant id of the tenant whose opt-out list the phone number provided should be removed from.