### Get reseller account info response Source: https://zadarma.com/en/support/api Example JSON response for reseller account information. ```json { "status": "success", "balance": 123, "credit": 0, "currency": "USD", "reseller_fee": 10, "user_fee": 10 } ``` -------------------------------- ### GET /v1/esim/devices/ Source: https://zadarma.com/en/support/api Retrieve a list of devices supported for eSIM. ```APIDOC ## GET /v1/esim/devices/ ### Description List of supported devices for eSIM. ### Method GET ### Endpoint /v1/esim/devices/ ### Response #### Success Response (200) - **status** (string) - Status of the request. - **devices** (object) - A list of devices grouped by brand. #### Response Example { "status": "success", "devices": { "acer": ["ACER Swift 3", "ACER Swift 7"], "asus": ["ASUS Mini Transformer T103HAF", "ASUS NovaGo TP370QL", "ASUS Vivobook Flip 14 TP401NA"], "xiaomi": ["Xiaomi 12T Pro", "Xiaomi 13 Lite"] } } ``` -------------------------------- ### GET /v1/pbx/internal/ Source: https://zadarma.com/en/support/api Retrieves the list of PBX extensions. ```APIDOC ## GET /v1/pbx/internal/ ### Description Retrieves the list of PBX extensions. ### Method GET ### Endpoint /v1/pbx/internal/ ### Parameters #### Query Parameters - **user_id** (string) - Optional - Used for resellers and their sub-users. ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **pbx_id** (integer) - The user's PBX ID. - **numbers** (array) - A list of PBX extensions. ### Response Example (JSON) ```json { "status":"success", "pbx_id":1234, "numbers": [ 100, 101, ... ] } ``` ### Response Example (XML) ```xml success 1234 100 101 ... ``` ``` -------------------------------- ### GET /v1/esim/order/ Source: https://zadarma.com/en/support/api Retrieves a list of connected eSIM packages for the user. ```APIDOC ## GET /v1/esim/order/ ### Description Returns a list of connected eSIM packages. By default, it returns data for the current user, but dealers can specify a user_id to retrieve data for their sub-users. ### Method GET ### Endpoint /v1/esim/order/ ### Parameters #### Query Parameters - **user_id** (integer) - Optional - The ID of the requested user. Available only for dealers for users created by them. ### Response #### Success Response (200) - **orders** (object[]) - A list of connected packages. #### Response Example { "status": "success", "orders": [ { "iccid": "8937204017175532566", "status": "inactive", "packages": [ { "iccid": "8937204017175532566", "price": 4.5, "currency": "USD", "countries": [ { "iso2": "al", "name": "Albania", "aliases": [] } ], "duration": 30, "data": 1, "region": null, "id": "3-al-30days-1gb", "data_remaining": 1, "top_up": true, "created_at": 1730978058, "auto_prolong": false, "activated_at": null, "expired_at": null, "reference_id": "672ca10a84a28e977c0cfe39" } ], "title": null, "msisdn": null, "activation_code": "LPA:1$smdp.io$K2-2627GZ-1UM3Z3Y", "created_at": 1730978058 } ] } ``` -------------------------------- ### GET /v1/pbx/ivr/scenario/ Source: https://zadarma.com/en/support/api Retrieves the list of IVR scenarios. ```APIDOC ## GET /v1/pbx/ivr/scenario/ ### Description IVR scenario list. ### Method GET ### Endpoint /v1/pbx/ivr/scenario/ ### Parameters #### Query Parameters - **user_id** (string) - Optional - only available for use for reseller and users created by them. - **menu_id** (string) - Required - menu ID/IVR. ``` -------------------------------- ### GET /v1/pbx/webhooks/ Source: https://zadarma.com/en/support/api Retrieves PBX webhook settings. ```APIDOC ## GET /v1/pbx/webhooks/ ### Description Retrieves the PBX webhook settings. ### Method GET ### Endpoint /v1/pbx/webhooks/ ### Parameters #### Query Parameters - **user_id** (string) - Optional - Used for resellers and their sub-users. ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **url** (string) - The configured webhook URL. - **hooks** (object) - Contains boolean flags for different webhook types: - **number_lookup** (boolean) - Enable/disable number lookup webhooks. - **call_tracking** (boolean) - Enable/disable call tracking webhooks. - **sms** (boolean) - Enable/disable SMS webhooks. - **speech_recognition** (boolean) - Enable/disable speech recognition webhooks. ### Response Example ```json { "status": "success", "url": "", "hooks": { "number_lookup": "true", "call_tracking": "false", "sms": "true", "speech_recognition": "true" } } ``` ``` -------------------------------- ### GET /v1/webrtc/ Source: https://zadarma.com/en/support/api Retrieve information about the current WebRTC widget integration. ```APIDOC ## GET /v1/webrtc/ ### Description WebRTC widget integration information. ### Method GET ### Endpoint /v1/webrtc/ ### Parameters #### Query Parameters - **user_id** (string) - Optional - Only available for use for reseller and users created by them. ### Response #### Success Response (200) - **status** (string) - Status of the request. - **is_exists** (boolean) - Whether the integration exists. - **domains** (array) - List of associated domains. - **settings** (object) - Current widget settings. #### Response Example { "status": "success", "is_exists": true, "domains": ["test.domain.com"], "settings": { "shape": "square", "position": "top_right" } } ``` -------------------------------- ### Response 9 Example Source: https://zadarma.com/en/support/api Example response for a DTMF input, including caller-provided name and digits. ```APIDOC ```json Response 9: { "wait_dtmf": { "name": NAME, "digits": DIGITS, "default_behaviour": "1" } } ``` **Where:** * **name** - the name provided in the previous answer; * **digits** - digits entered by the caller; * **default_behaviour** - indicated if the caller did not press anything and the default behaviour was triggered; ``` -------------------------------- ### GET /v1/pbx/ivr/ Source: https://zadarma.com/en/support/api Retrieves the list of configured IVRs. ```APIDOC ## GET /v1/pbx/ivr/ ### Description IVR list. ### Method GET ### Endpoint /v1/pbx/ivr/ ### Parameters #### Query Parameters - **user_id** (string) - Optional - only available for use for reseller and users created by them. ``` -------------------------------- ### Document Verification Result Example Source: https://zadarma.com/en/support/api Example JSON structure for a 'wrong_document' event in document verification. Indicates user ID, document type, and a reason for rejection. ```json { "wrong_document": { "user_id":1234567, "group_id":0, "document_type":"passport", "message":"The documents you have uploaded cannot be accepted because of low image quality." } } ``` -------------------------------- ### GET /v1/info/lists/tariffs/ Source: https://zadarma.com/en/support/api Retrieves a list of available price plans (tariffs). ```APIDOC ## GET /v1/info/lists/tariffs/ ### Description Retrieves a list of available price plans (tariffs). ### Method GET ### Endpoint /v1/info/lists/tariffs/ ### Parameters #### Query Parameters - **currency** (string) - Optional - The currency to filter the tariffs by. ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request (e.g., "success"). - **currency** (string) - The currency used for the listed tariffs. - **tariffs** (array of objects) - A list of standard tariffs. - **tariff_id** (integer) - The unique identifier for the tariff. - **name** (string) - The name of the tariff. - **cost** (number) - The cost of the tariff. - **days** (string) - The duration of the tariff in days. - **package_tariffs** (array of objects) - A list of package tariffs. - **id** (integer) - The unique identifier for the package tariff. - **name** (string) - The name of the package tariff. - **tariffs** (array of objects) - A list of tariffs within the package. - **tariff_id** (integer) - The unique identifier for the tariff. - **name** (string) - The name of the tariff. - **cost** (number) - The cost of the tariff. - **cost_annual** (number) - The annual cost of the tariff. #### Response Example ```json { "status": "success", "currency": "EUR", "tariffs": [ { "tariff_id": 5, "name": "Standard", "cost": 0, "days": "30" }, ... ], "package_tariffs": [ { "id": 1, "name": "EU", "tariffs": [ { "tariff_id": 23, "name": "Office", "cost": 22, "cost_annual": 216 }, ... ] }, ... ] } ``` ``` -------------------------------- ### GET /v1/webrtc/get_key/ Source: https://zadarma.com/en/support/api Receive a key for the WebRTC widget, valid for 72 hours. ```APIDOC ## GET /v1/webrtc/get_key/ ### Description Receive a key for the webrtc-widget. Key lifetime is 72 hours. ### Method GET ### Endpoint /v1/webrtc/get_key/ ### Parameters #### Query Parameters - **sip** (string) - Required - SIP login or PBX extension. ### Response #### Success Response (200) - **status** (string) - Status of the request. - **key** (string) - The generated WebRTC key. #### Response Example { "status":"success", "key": "YOUR_KEY" } ``` -------------------------------- ### GET /v1/pbx/ivr/sounds/list Source: https://zadarma.com/en/support/api Retrieves a list of uploaded files for voice greetings. ```APIDOC ## GET /v1/pbx/ivr/sounds/list ### Description List of already uploaded files for voice greeting (IVR). ### Method GET ### Endpoint /v1/pbx/ivr/sounds/list ``` -------------------------------- ### Get eSIM Supported Devices Source: https://zadarma.com/en/support/api Returns a list of devices compatible with eSIM, categorized by brand. ```json Response 1: { "status": "success", "devices": { "acer": [ "ACER Swift 3", "ACER Swift 7" ], "asus": [ "ASUS Mini Transformer T103HAF", "ASUS NovaGo TP370QL", "ASUS Vivobook Flip 14 TP401NA" ], "xiaomi": [ "Xiaomi 12T Pro", "Xiaomi 13 Lite" ] } } ``` ```json Response 2: { "status": "error", "message": "Getting devices internal error" } ``` -------------------------------- ### GET /v1/info/lists/currencies/ Source: https://zadarma.com/en/support/api Retrieves a list of available currencies supported by the API. ```APIDOC ## GET /v1/info/lists/currencies/ ### Description Retrieves a list of available currencies supported by the API. ### Method GET ### Endpoint /v1/info/lists/currencies/ ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request (e.g., "success"). - **currencies** (array of strings) - A list of currency codes (e.g., "USD", "EUR"). #### Response Example ```json { "status": "success", "currencies": [ "USD", "EUR", "GBP", "PLN" ] } ``` ``` -------------------------------- ### GET /v1/pbx/callinfo/ Source: https://zadarma.com/en/support/api Retrieves the current call info settings for the PBX. ```APIDOC ## GET /v1/pbx/callinfo/ ### Description Retrieves the current call info settings for the PBX. ### Method GET ### Endpoint /v1/pbx/callinfo/ ### Parameters #### Query Parameters - **user_id** (string) - Optional - Used for resellers and their sub-users. ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **url** (string) - The configured URL for call info. - **notifications** (object) - Contains boolean flags for different notification types: - **notify_start** (boolean) - Notification on call start. - **notify_internal** (boolean) - Notification for internal calls. - **notify_end** (boolean) - Notification on call end. - **notify_out_start** (boolean) - Notification on outgoing call start. - **notify_out_end** (boolean) - Notification on outgoing call end. - **notify_answer** (boolean) - Notification on call answer. ### Response Example ```json { "status": "success", "url": "", "notifications": { "notify_start": "true", "notify_internal": "false", "notify_end": "true", "notify_out_start": "false", "notify_out_end": "false", "notify_answer": "false" } } ``` ``` -------------------------------- ### Get PBX Extension Information Source: https://zadarma.com/en/support/api Retrieves detailed configuration information for a PBX extension. ```json { "status": "success", "pbx_id": 12345, "number": 100, "name": "Extension 100", "caller_id": "+44000000000", "caller_id_app_change": "true", "caller_id_by_direction": "false", "lines": "3", "ip_restriction": "1.1.1.1", "record_store": "For automatic speech recognition", "record_email": "email@server.com", "supervisor_status": 1 } ``` ```xml success 12345 100 Extension 100 +44000000000 true false 3 1.1.1.1 For automatic speech recognition email@server.com 1 ``` -------------------------------- ### GET /v1/reseller/account/info/ Source: https://zadarma.com/en/support/api Retrieves reseller account information including balance and fees. ```APIDOC ## GET /v1/reseller/account/info/ ### Description Retrieves reseller account information. ### Method GET ### Endpoint /v1/reseller/account/info/ ### Response #### Success Response (200) - **status** (string) - Status of the request. - **balance** (number) - Current balance. - **credit** (number) - Current credit. - **currency** (string) - Currency code. - **reseller_fee** (number) - Reseller fee percentage. - **user_fee** (number) - User fee percentage. ``` -------------------------------- ### GET /v1/info/lists/languages/ Source: https://zadarma.com/en/support/api Retrieves a list of languages available in the personal account settings. ```APIDOC ## GET /v1/info/lists/languages/ ### Description Retrieves a list of languages available in the personal account settings. ### Method GET ### Endpoint /v1/info/lists/languages/ ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request (e.g., "success"). - **languages** (array of strings) - A list of language codes (e.g., "en", "es"). #### Response Example ```json { "status": "success", "languages": [ "en", "es", "de", "pl", "ru", "ua", "fr" ] } ``` ``` -------------------------------- ### Get WebRTC Widget Info Source: https://zadarma.com/en/support/api Retrieves current configuration and domain settings for the WebRTC widget. ```json { "status": "success", "is_exists": true, "domains": [ "test.domain.com" ], "settings": { "shape": "square", "position": "top_right" } } ``` -------------------------------- ### POST /v1/webrtc/create/ Source: https://zadarma.com/en/support/api Create a WebRTC widget integration. ```APIDOC ## POST /v1/webrtc/create/ ### Description WebRTC widget integration creation. ### Method POST ### Endpoint /v1/webrtc/create/ ### Parameters #### Request Body - **user_id** (string) - Optional - Only available for use for reseller and users created by them. - **domain** (string) - Required - Domain name. ### Response #### Success Response (200) - **status** (string) - Status of the request. #### Response Example { "status": "success" } ``` -------------------------------- ### POST /v1/esim/order/create/ Source: https://zadarma.com/en/support/api Connects a new eSIM package to the user account. ```APIDOC ## POST /v1/esim/order/create/ ### Description Connects a new eSIM package based on the provided package ID. ### Method POST ### Endpoint /v1/esim/order/create/ ### Parameters #### Request Body - **package_id** (string) - Required - Package ID for connection - **user_id** (integer) - Optional - User ID for connection (dealers only) ### Response #### Success Response (200) - **status** (string) - Success status - **order** (object) - Data about the connected package #### Response Example { "status": "success", "order": { "iccid": "8937204016150824154", "activation_code": "LPA:1$smdp.io$K2-1UYQA7-Z8B3BF", "status": "inactive" } } ``` -------------------------------- ### GET /v1/statistics/callback_widget/ Source: https://zadarma.com/en/support/api Retrieves statistics for the callback widget. You can filter by date range and optionally by widget ID. If no date range is specified, it defaults to the current month for start and current date/time for end. The maximum period for statistics is one month. ```APIDOC ## GET /v1/statistics/callback_widget/ ### Description Retrieves statistics for the callback widget, including user actions and call request details. ### Method GET ### Endpoint /v1/statistics/callback_widget/ ### Query Parameters - **start** (string) - Optional - The start date of the statistics display (format: YYYY-MM-DD HH:MM:SS). Defaults to the beginning of the current month. - **end** (string) - Optional - The end date of the statistics display (format: YYYY-MM-DD HH:MM:SS). Defaults to the current date and time. - **widget_id** (string) - Optional - The identification of the widget. If not specified, statistics from all widgets are retrieved. - **skip** (integer) - Optional - Used for pagination to skip a certain number of records. - **limit** (integer) - Optional - Used for pagination to limit the number of records returned. Maximum input lines per request is 1000. ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request (e.g., "success"). - **start** (string) - The start date of the returned statistics. - **end** (string) - The end date of the returned statistics. - **stats** (array) - An array of statistics objects, where each object contains: - **id** (string) - The unique identifier for the session. - **widget_id** (string) - The ID of the widget. - **sip** (string) - The SIP number associated with the session. - **ip** (string) - The IP address of the user. - **actions** (array) - An array of actions performed within the session: - **kind** (string) - The type of action (e.g., 'come', 'show', 'call_request', 'close'). - **date** (string) - The date and time of the action. - **referrer_url** (string) - The URL from which the user came to the page (only for 'come' event). - **url** (string) - The URL of the page with the widget (only for 'come' event). - **rate** (integer) - The rating given by the user (for 'show' event) or the call rate (for 'rate' event). - **number** (string) - The phone number entered by the user. - **request_call_date** (string) - The requested callback date and time (only for 'call_request' event). - **redial** (string) - Indicates if a callback was made for a delayed request ('true' or 'false', only for 'call_request' event). ### Request Example ```json { "start": "2016-09-01 00:00:00", "end": "2016-09-30 23:59:59", "widget_id": "1" } ``` ### Response Example ```json { "status":"success", "start":"2016-09-01 00:00:00", "end":"2016-09-30 23:59:59", "stats":[ { "id":"57d16d6a1e46c53d1f8ce323", "widget_id":"1", "sip":"00001", "ip":"127.0.0.1", "actions":[ { "kind":"come", "date":"2016-09-08 16:53:45", "referrer_url":"http://test.domain.com/page1/", "url":"http://home.domain.com/page2/" }, { "kind":"show", "date":"2016-09-08 16:53:46", "rate":15 }, { "kind":"call_request", "date":"2016-09-08 16:54:07", "number":"442037691880", "request_call_date":"2016-09-09 10:00:00", "redial":"n" }, { "kind":"close", "date":"2016-09-08 16:54:35" } ] } ] } ``` ``` -------------------------------- ### POST /v1/reseller/users/registration/new/ Source: https://zadarma.com/en/support/api Registers a new user in the system. ```APIDOC ## POST /v1/reseller/users/registration/new/ ### Description User registration. ### Method POST ### Endpoint /v1/reseller/users/registration/new/ ### Parameters #### Path Parameters - **email** (string) - client email address - **first_name** (string) - client name - **last_name** (string) - optional parameter - **middle_name** (string) - optional parameter - **organization** (string) - optional parameter - **country** (string) - ISO2 country code - **city** (string) - client city - **address** (string) - optional parameter - **phone** (string) - optional parameter - **password** (string) - optional parameter - **tariff** (string) - price plan ID (ID can be received via method GET /v1/info/lists/tariffs/) - **tariff_period** (string) - optional parameter, price plan period month | year - **language** (string) - optional parameter, language code, en - **currency** (string) - optional parameter, currency code, USD - **promocode** (string) - optional parameter, promotional code - **gmt** (string) - optional parameter, GMT - **id_card** (string) - optional parameter, ID card number, passport ### Request Example ```json { "email": "test@example.com", "first_name": "John", "last_name": "Doe", "organization": "Example Corp", "country": "US", "city": "New York", "phone": "+1234567890", "password": "securepassword", "tariff": "basic_plan_id", "tariff_period": "month", "language": "en", "currency": "USD", "promocode": "SUMMER2024", "gmt": "-5", "id_card": "123456789" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the operation. - **user_id** (integer) - The ID of the newly registered user. - **message** (string) - Confirmation message about the registration. #### Response Example ```json { "status": "success", "user_id": 12345, "message": "You registered a new user in the system." } ``` ``` -------------------------------- ### NOTIFY_OUT_START API Source: https://zadarma.com/en/support/api This notification indicates the start of an outgoing call initiated from the PBX. It includes the call start time and destination number. ```APIDOC ## NOTIFY_OUT_START the start of an outgoing call from the PBX #### Parameters glossary: * **event** – the event (NOTIFY_OUT_START) * **call_start** – the call start; * **pbx_call_id** – the call ID; * **destination** – the phone number that was called; * **internal** – (optional) extension. #### Creation of verification signature for notification about incoming calls, example on PHP: ```php $signatureTest = base64_encode(hash_hmac('sha1', $_POST['internal'] . $_POST['destination'] . $_POST['call_start'], API_SECRET)); ``` ``` -------------------------------- ### POST /v1/pbx/create/ Source: https://zadarma.com/en/support/api Creates a new PBX. ```APIDOC ## POST /v1/pbx/create/ ### Description Creates a new PBX. ### Method POST ### Endpoint /v1/pbx/create/ ### Parameters #### Request Body - **sip_id** (string) - Optional - SIP number for PBX connection. If not provided, an available SIP will be chosen. - **password** (string) - Required - Password for the first PBX number '100'. - **user_id** (string) - Optional - Used for resellers and their sub-users. ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **stop_datetime** (string) - The expiration date and time for the PBX service. ### Response Example ```json { "status": "success", "stop_datetime": "2021-12-31 23:59:59" } ``` ``` -------------------------------- ### PHP Signature for NOTIFY_OUT_START Source: https://zadarma.com/en/support/api Example in PHP for creating a verification signature for the NOTIFY_OUT_START event. It uses HMAC-SHA1 with API_SECRET. ```php $signatureTest = base64_encode(hash_hmac('sha1', $_POST['internal'] . $_POST['destination'] . $_POST['call_start'], API_SECRET)); ``` -------------------------------- ### GET /v1/pbx/record/request/ Source: https://zadarma.com/en/support/api Requests a call recording file. You can identify the call by either `call_id` or `pbx_call_id`. ```APIDOC ## GET /v1/pbx/record/request/ ### Description Call recording file request. ### Method GET ### Endpoint /v1/pbx/record/request/ ### Parameters #### Query Parameters - **call_id** (string) - Required - Unique call ID, it is specified in the name of the file with the call recording (unique for every recording). - **pbx_call_id** (string) - Required - Permanent ID of the external call to the PBX (does not alter the scenario changes, voice menu, etc., it is displayed in the statistics and notifications). - **lifetime** (integer) - Optional - The link's lifetime in seconds (minimum - 180, maximum - 5184000, default - 1800). **Note:** It is enough to specify one of the two identification parameters (pbx_call_id or call_id), if pbx_call_id is specified, several links might be returned. ### Response #### Success Response (200) - **status** (string) - The status of the operation. - **link** (string) - The URL to the call recording file (returned when only `call_id` is specified). - **links** (array of strings) - An array of URLs to call recording files (returned when `pbx_call_id` is specified). - **lifetime_till** (string) - The expiration time of the link(s). ### Response Example (Single Link - JSON) ```json { "status":"success", "link": "https://api.zadarma.com/v1/pbx/record/download/NjM3M..NzM2Mg/1-1458313316.343456-100-2016-01-11-100155.mp3", "lifetime_till": "2016-01-01 23:56:22" } ``` ### Response Example (Multiple Links - JSON) ```json { "status":"success", "links":[ "https://api.zadarma.com/v1/pbx/record/download/NjM3M..NzM2Mg/1-1458313316.343456-100-2016-01-11-100155.mp3", "https://api.zadarma.com/v1/pbx/record/download/pw7Cj..iOzn99/1-1458313475.213487-101-2016-01-11-100211.mp3" ], "lifetime_till": "2016-01-01 23:56:22" } ``` ``` -------------------------------- ### Initiate Callback Request (XML) Source: https://zadarma.com/en/support/api Use this endpoint to initiate a callback request. Requires 'from' and 'to' parameters. ```xml success 442037691880 442037691881 ``` -------------------------------- ### Edit IVR Scenario Response Example Source: https://zadarma.com/en/support/api This is an example of a successful response when editing an IVR scenario. It includes the scenario ID, title, queue strategy, and extension configurations. ```json [ "id": "630cb6b3dc666e947503a77a", "title": "Scenario 1", "queue_strategy": "off", "queue_announce_position": 0, "numbers": [ [ "number": 100, "delay": 0, "duration": 20 ], [ "number": 101, "delay": 20, "duration": 20 ], [ "number": 102, "delay": 40, "duration": 20 ] ] ] ``` -------------------------------- ### GET /v1/zcrm/deals Source: https://zadarma.com/en/support/api Retrieves a list of deals from the CRM. ```APIDOC ## GET /v1/zcrm/deals ### Description Returns the deals list. ### Method GET ### Endpoint /v1/zcrm/deals ``` -------------------------------- ### GET /v1/zcrm/customers/labels Source: https://zadarma.com/en/support/api Returns the list of all labels and their statistics. ```APIDOC ## GET /v1/zcrm/customers/labels ### Description Returns the list of all labels and their statistics. ### Method GET ### Endpoint /v1/zcrm/customers/labels ### Response #### Success Response (200) - **totalCount** (integer) - total number of labels in the system - **labels** (array) - labels array. Each label has: id (integer), label (string), count (integer) ``` -------------------------------- ### GET /v1/direct_numbers/countries/ Source: https://zadarma.com/en/support/api Lists countries from which numbers can be ordered. ```APIDOC ## GET /v1/direct_numbers/countries/ ### Description List of countries numbers can be ordered from. ### Method GET ### Endpoint /v1/direct_numbers/countries/ ### Parameters #### Query Parameters - **language** (string) - Optional - if not set Personal account language will be used. ``` -------------------------------- ### POST /v1/pbx/ivr/create/ Source: https://zadarma.com/en/support/api Creates a new IVR menu. ```APIDOC ## POST /v1/pbx/ivr/create/ ### Description Create IVR. ### Method POST ### Endpoint /v1/pbx/ivr/create/ ### Parameters #### Request Body - **user_id** (string) - Optional - only available for use for reseller and users created by them. - **buy** (boolean) - Optional - 'true' - paid menu creation. ``` -------------------------------- ### Configure PBX Call Redirection Source: https://zadarma.com/en/support/api Example responses for the PBX redirection endpoint, demonstrating successful configuration in JSON and XML. ```json { "status":"success", "current_status":"on", "pbx_id":"1234", "pbx_name":"100", "type":"phone", "destination":"442037691880", "condition":"noanswer" } ``` ```xml success on 1234 100 phone 442037691880 noanswer ``` -------------------------------- ### POST /v1/pbx/ivr/scenario/create/ Source: https://zadarma.com/en/support/api Creates a new IVR scenario. ```APIDOC ## POST /v1/pbx/ivr/scenario/create/ ### Description IVR scenario creation. ### Method POST ### Endpoint /v1/pbx/ivr/scenario/create/ ``` -------------------------------- ### Initiate Callback Request (JSON) Source: https://zadarma.com/en/support/api Use this endpoint to initiate a callback request. Requires 'from' and 'to' parameters. ```json { "status":"success", "from":442037691880, "to":442037691881, "time":1435573082 } ``` -------------------------------- ### GET /v1/zcrm/customers/custom-properties Source: https://zadarma.com/en/support/api Returns additional features (custom properties). ```APIDOC ## GET /v1/zcrm/customers/custom-properties ### Description Returns additional features. ### Method GET ### Endpoint /v1/zcrm/customers/custom-properties ### Response #### Success Response (200) - **totalCount** (integer) - total number of additional features - **customProperties** (array) - array of additional features. Each includes: id (integer), key (string), title (string) ``` -------------------------------- ### PUT /v1/webrtc/ Source: https://zadarma.com/en/support/api Update settings for an existing WebRTC widget integration. ```APIDOC ## PUT /v1/webrtc/ ### Description WebRTC widget integration setting change. ### Method PUT ### Endpoint /v1/webrtc/ ### Parameters #### Request Body - **user_id** (string) - Optional - Only available for use for reseller and users created by them. - **shape** (string) - Optional - Widget shape, possible values: 'square', 'rounded'. - **position** (string) - Optional - Widget position, possible values: 'top_left', 'top_right', 'bottom_right', 'bottom_left'. ### Response #### Success Response (200) - **status** (string) - Status of the request. #### Response Example { "status": "success" } ``` -------------------------------- ### GET /v1/sip/ Source: https://zadarma.com/en/support/api Retrieves the list of user's SIP-numbers. ```APIDOC ## GET /v1/sip/ ### Description Retrieves the list of user's SIP-numbers. ### Method GET ### Endpoint /v1/sip/ ### Response #### Success Response (200) - **status** (string) - Success status - **sips** (array) - List of SIP objects - **left** (integer) - Number of remaining SIPs that can be created #### Response Example { "status":"success", "sips":[ {"id":"00001", "display_name":"SIP 1", "lines":3}, {"id":"00002", "display_name":"SIP 2", "lines":3} ], "left":3 } ``` -------------------------------- ### GET /v1/request/callback/ Source: https://zadarma.com/en/support/api Initiates a callback request. The system will call the 'to' number and connect it to the 'from' number or SIP. ```APIDOC ## GET /v1/request/callback/ ### Description Initiates a callback request. The system will call the 'to' number and connect it to the 'from' number or SIP. ### Method GET ### Endpoint /v1/request/callback/ ### Parameters #### Query Parameters - **from** (string) - Required - Your phone/SIP number, the PBX extension or the PBX scenario, to which the CallBack is made. - **to** (string) - Required - The phone or SIP number that is being called. - **sip** (string) - Optional - SIP user's number or the PBX extension (for example: 100), which is used to make the call. The CallerID of this number will be used; this SIP/PBX extension number will be displayed in the statistics; call recording and prefix dialling will be used if enabled for this number. - **predicted** (boolean) - Optional - If this flag is specified the request is predicted (the system calls the “to” number, and only connects it to your SIP, or your phone number, if the call is successful.). ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request (e.g., "success"). - **from** (string) - The originating number for the callback. - **to** (string) - The destination number for the callback. - **time** (integer) - The timestamp when the callback was initiated. #### Response Example (JSON) ```json { "status":"success", "from":442037691880, "to":442037691881, "time":1435573082 } ``` #### Response Example (XML) ```xml success 442037691880 442037691881 ``` ``` -------------------------------- ### Get File by ID Source: https://zadarma.com/en/support/api Retrieves file information by its unique ID. ```APIDOC ## GET /v1/zcrm/files/ ### Description Gives files by its ID. ### Method GET ### Endpoint /v1/zcrm/files/ ### Parameters #### Path Parameters - **file_id** (string) - Required - The ID of the file to retrieve. ``` -------------------------------- ### GET /v1/zcrm/deals//feed Source: https://zadarma.com/en/support/api Returns records in the deal feed. ```APIDOC ## GET /v1/zcrm/deals//feed ### Description Returns records in the deal feed. ### Method GET ### Endpoint /v1/zcrm/deals//feed ### Parameters #### Path Parameters - **deal_id** (string) - Required - deal id ### Response #### Success Response (200) - **totalCount** (integer) - total number of records - **items** (array) - array of records ``` -------------------------------- ### List Tariffs (JSON) Source: https://zadarma.com/en/support/api Retrieves a list of available price plans. The response includes currency, standard tariffs, and package tariffs with their details. ```json { "status": "success", "currency": "EUR", "tariffs": [ { "tariff_id": 5, "name": "Standard", "cost": 0, "days": "30" }, ... ], "package_tariffs": [ { "id": 1, "name": "EU", "tariffs": [ { "tariff_id": 23, "name": "Office", "cost": 22, "cost_annual": 216 }, ... ] }, ... ] } ``` -------------------------------- ### POST /v1/webrtc/domain/ Source: https://zadarma.com/en/support/api Add a domain to an existing WebRTC widget integration. ```APIDOC ## POST /v1/webrtc/domain/ ### Description Add a domain to WebRTC widget integration. ### Method POST ### Endpoint /v1/webrtc/domain/ ### Parameters #### Request Body - **user_id** (string) - Optional - Only available for use for reseller and users created by them. - **domain** (string) - Required - Domain name. ### Response #### Success Response (200) - **status** (string) - Status of the request. #### Response Example { "status": "success" } ``` -------------------------------- ### GET /v1/zcrm/users Source: https://zadarma.com/en/support/api Retrieves a list of all users within the CRM system. ```APIDOC ## GET /v1/zcrm/users ### Description Returns a list of users registered in the CRM. ### Method GET ### Endpoint /v1/zcrm/users ### Response #### Success Response (200) - **totalCount** (integer) - Total number of users - **users** (array) - User array. Each element contains: - **id** (integer) - User identification - **email** (string) - User account e-mail - **name** (string) - User name - **group_id** (integer) - User group identification - **is_superadmin** (integer) - Indicates if the user is a super-administrator (1 or 0) - **enabled** (integer) - If the user is unblocked (1 or 0) - **created_at** (string) - User creation date and time (YYYY-MM-DD hh:mm:ss) - **avatar** (integer) - User avatar file identification - **role** (string) - User position - **status** (string) - User status - **language** (string) - User interface language (de, en, es, pl, ru, ua) - **color** (integer) - Task color hue (0-359) - **color_hex** (string) - Task color hex-presentation - **internal_number** (string) - User PBX extension - **timezone** (string) - User timezone - **first_day** (integer) - Week start day (0 for Sunday, 1 for Monday) - **device** (string) - Device used for calls (webphone, softphone) - **phone_widget_location** (string) - Webphone widget location (left, right) - **phones** (array) - User phone numbers array - **contacts** (array) - User contacts array #### Response Example { "totalCount": 2, "users": [ { "id": 234, "email": "john@example.com", "name": "John Beam", "group_id": 653, "is_superadmin": 1, "enabled": 1, "created_at": "2020-04-27 01:01:31", "avatar": 2457, "role": "", "status": "", "language": "en", "color": "220", "color_hex": "5678BD", "internal_number": "100", "timezone": "Europe/London", "first_day": 1, "device": "webphone", "phone_widget_location": "right", "phones": [ { "phone": "+44123456789", "type": "work" } ], "contacts": [ { "type": "email_work", "value": "ivanov@example.com" } ] } ] } ```