SimotelSimotel Documentation
فارسی

Contact Remove

This service is used to delete a contact.

Parameters

ParametersRequired[**]/Optional[*]Defined DataExample DataDescription
id_**-6033876dc92de036d1390923Unique ID obtained from Search

Sample Invocation

Example Code
PHP
      <details>
        <summary>Show Full Source Code PHP</summary>
        <br/>
	<?php

	$curl = curl_init();

	curl_setopt_array($curl, array(
	  CURLOPT_URL => "http://192.168.1.100/api/v4/autodialer/contacts/remove",
	  CURLOPT_RETURNTRANSFER => true,
	  CURLOPT_ENCODING => "",
	  CURLOPT_MAXREDIRS => 10,
	  CURLOPT_TIMEOUT => 0,
	  CURLOPT_FOLLOWLOCATION => true,
	  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	  CURLOPT_CUSTOMREQUEST => "POST",
	  CURLOPT_POSTFIELDS =>"{\"_id\":\"6033876dc92de036d1390923\"}",
	  CURLOPT_HTTPHEADER => array(
		"X-APIKEY: SAMPLE_API_KEY",
		"Authorization: Basic dGVzdDpBYTEyMzQ1Ng==",
		"Content-Type: application/json"
	  ),
	));

	$response = curl_exec($curl);

		if (!curl_errno($curl)) {
		$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
		echo 'response code:'.$httpcode, '<br/>';
	}

	curl_close($curl);
	echo $response;
?>
JavaScript
      <details>
        <summary>Show Full Source Code JS</summary>
        <br/>
	<html>
			<head>
				<script src="/wiki/assets/vendor/jquery/jquery.min.js"></script>
			</head>
		<body>
			<script>
				var settings = {
				  "url": "http://192.168.1.100/api/v4/autodialer/contacts/remove",
				  "method": "POST",
				  "timeout": 0,
				  "headers": {
					"X-APIKEY": "vZKtIKWsld0egNlkzHo8i5LVBqLNBSWARCQsPOSgDjFmAHM3tG",
					"Authorization": "Basic dGVzdDpBYTEyMzQ1Ng==",
					"Content-Type": "application/json"
				  },
				  "data": JSON.stringify({
					  "_id":"6033876dc92de036d1390923"
					  }),
				};

					$.ajax(settings).always(function (jqXHR) {
						console.log("response code: " + jqXHR.status + " " + jqXHR.statusText);
						console.log("response body: " + jqXHR.responseText);
					});
			</script>
		</body>
	</html>
cURL
      <details>
        <summary>Show Full Source Code Curl</summary>
        <br/>
	curl --location --request POST 'http://192.168.1.100/api/v4/autodialer/contacts/remove' \
	--header 'X-APIKEY: SAMPLE_API_KEY' \
	--header 'Authorization: Basic dGVzdDpBYTEyMzQ1Ng==' \
	--header 'Content-Type: application/json' \
	--data-raw '{"_id":"6033876dc92de036d1390923"}'
		```

          </details>
        
</details>


      
</div>

    
</details>


    
<details><summary>Example Output</summary>


```shell
{
    "success": 1,
    "message": "Requested operation is done successfully",
    "data": ""
}