Remove phone from subscriber
Removes the phone number from a specific subscriber.
Endpoint
Section titled “Endpoint”HTTP method: DELETE
https://api.sender.net/v2/subscribers/{id}/remove_phone
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id | string required | Subscriber ID |
Request Examples
Section titled “Request Examples”const url = new URL("https://api.sender.net/v2/subscribers/{id}/remove_phone");
let headers = { "Authorization": "Bearer [your-token]", "Content-Type": "application/json", "Accept": "application/json",};
let bodyContent = {};
fetch(url, { method: "DELETE", headers, body: JSON.stringify(bodyContent)}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));$client = new \GuzzleHttp\Client();
$json = [];
$response = $client->delete( 'https://api.sender.net/v2/subscribers/{id}/remove_phone', [ 'headers' => [ 'Authorization' => 'Bearer [your-token]', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => $json ]);
$body = $response->getBody()->getContents();$data = json_decode($body, true);print_r($data);import requestsimport json
url = "https://api.sender.net/v2/subscribers/{id}/remove_phone"
headers = { "Authorization": "Bearer [your-token]", "Content-Type": "application/json", "Accept": "application/json",}
payload = {}
response = requests.request('DELETE', url, headers=headers, json=payload)
print(response.json())curl -X DELETE \"https://api.sender.net/v2/subscribers/{id}/remove_phone" \-H "Authorization: Bearer [your-token]" \-H "Content-Type: application/json" \-H "Accept: application/json" \-d '{}'Response
Section titled “Response”{ "success": true, "message": "Subscriber phone removed"}