This repository was archived by the owner on Feb 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
FreshdeskClient.DeleteContact Method
Jean-Sebastien Carle edited this page Jul 24, 2019
·
11 revisions
| Method | Description |
|---|---|
| DeleteContact(Int64) | Deletes a contact. |
| DeleteContact(Int64, Boolean) | Deletes a contact permanently. |
Deletes a contact.
public Response DeleteContact(long contactID);| Name | Type | Description |
|---|---|---|
| contactID | Int64 | The ID of the contact to delete. |
| Type | Description |
|---|---|
| Response | The server response that was returned by the request. |
The following code example demonstrates this method.
using Freshdesk;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
string freshdeskDomain = "yourcompany.freshdesk.com";
string apiKey = "yourapikey";
FreshdeskClient freshdesk = new FreshdeskClient(freshdeskDomain, apiKey, "X");
Response response = freshdesk.DeleteContact(28000000001);
if (response.StatusCode == HttpStatusCode.NoContent)
Console.WriteLine("Iosef didn't make it.");
}
}
}ℹ️ The Response StatusCode will return HttpStatusCode.NoContent if the contact was successfully deleted.
Deletes a contact permanently.
public Response DeleteContact(long contactID, bool permanently);| Name | Type | Description |
|---|---|---|
| contactID | Int64 | The ID of the contact to delete. |
| permanently | Boolean | If true the deletion is permanent, otherwise a soft-delete is performed. |
| Type | Description |
|---|---|
| Response | The server response that was returned by the request. |
The following code example demonstrates this method.
using Freshdesk;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
string freshdeskDomain = "yourcompany.freshdesk.com";
string apiKey = "yourapikey";
FreshdeskClient freshdesk = new FreshdeskClient(freshdeskDomain, apiKey, "X");
Response response = freshdesk.DeleteContact(28000000001, true);
if (response.StatusCode == HttpStatusCode.NoContent)
Console.WriteLine("Iosef didn't make it.");
}
}
}ℹ️ The Response StatusCode will return HttpStatusCode.NoContent if the contact was successfully deleted.