---
title: Delete Data
slug: tutorials/delete-data
description: Learn how to use the DELETE request in the API endpoint to instantly remove all records associated with a particular audio, transcript, or chat interaction from a database. Discover the HTTP status codes that signify the success or failure of the deletion
docTags: 
createdAt: 2022-06-14T17:57:37.000Z
---

# <font color="#3694fc">//  </font>Overview&#x20;

Leveraging the unique **`interactionIdentifier`** provided upon declaring the [audio](docId\:PqLj1vqO7gTf0iqj1LBVN), [chat](docId\:iD41ifX7uC0RZDlb7RbtO), or [transcription](docId:8OMp8XUfyRY9gaB1YIvul), this enpoint enables you to **instantly delete all results** associated with the interaction from our database.

:::hint{type="info"}
**NOTE:&#x20;**&#x41;ll source data is permanently deleted once a deletion request is received and processed. This ensures your data is handled securely and in compliance with privacy best practices.

Please refer to the [ElevateAI Data Retention & Security Guidelines](docId\:wpnftWRWnSmcwaxWXW0wt) for additional details.<font color="#3694fc"> </font>
:::

When the <font color="#eb144c">`DELETE`</font> request **successfully executes**, an **`HTTP`** status is returned to indicate the request was successful and all data associated with the **`interactionIdentifier`** has been removed from our database.&#x20;

If an error occurs when requesting to declare the interaction, a standard **`HTTP`** response code is retuned to indicate the request was unsuccessful, along with a **`JSON`** response containing additional details to [assist with troubleshooting.](https://docs.elevateai.com/#Qofti)&#x20;

***

# <font color="#3694fc">//  </font>Request Parameters & Code Example

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://api.elevateai.com/v1/interactions/{interactionIdentifier}",
  "name": "Delete All Data",
  "method": "DELETE",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "interactionIdentifier",
        "type": "string",
        "description": "interactionIdentifier returned upon successfully declaring the interaction"
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "X-API-Token",
        "type": "string",
        "description": "Valid API key associated with your account for authentication and usage tracking"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "z4oJaIchyK2u3vEsn0Hc_",
        "code": "",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "cIJoi5JJVVJWM3m-ebgiB",
        "code": "{\r\n  \"errorMessage\": \"string\"\r\n}",
        "language": "400",
        "customLabel": ""
      },
      {
        "id": "6qtTbZWCFEZJoynVEKZ7J",
        "code": "{\r\n  \"errorMessage\": \"string\"\r\n}",
        "language": "401",
        "customLabel": ""
      },
      {
        "id": "kED3nZp5YCf_nIV5WBK6L",
        "code": "{\r\n  \"errorMessage\": \"string\"\r\n}",
        "language": "404",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "z4oJaIchyK2u3vEsn0Hc_"
  },
  "examples": {
    "languages": [
      {
        "id": "2DiP3DMgAFbPnowOCLU4r",
        "code": "curl --location -g --request DELETE 'https://api.elevateai.com/v1/interactions/{InteractionIdentifier}' \\\n--header 'X-API-Token: {Your API Token}'",
        "language": "curl",
        "customLabel": ""
      },
      {
        "id": "XtzZfoZqf6D0LWSE_Gi85",
        "code": "var request = require('request');\nvar options = {\n  'method': 'DELETE',\n  'url': 'https://api.elevateai.com/v1/interactions/{InteractionIdentifier}',\n  'headers': {\n    'X-API-Token': '{Your API Token}'\n  }\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});\n",
        "language": "nodejs",
        "customLabel": ""
      },
      {
        "id": "GaOoi2EhyhUKWdaocmEd9",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"X-API-Token\", \"{Your API Token}\");\n\nvar requestOptions = {\n  method: 'DELETE',\n  headers: myHeaders,\n  redirect: 'follow'\n};\n\nfetch(\"https://api.elevateai.com/v1/interactions/{InteractionIdentifier}\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));",
        "language": "javascript",
        "customLabel": ""
      },
      {
        "id": "mXN1xXD2W6r7IKOruTPnD",
        "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.elevateai.com\")\npayload = ''\nheaders = {\n  'X-API-Token': '{Your API Token}'\n}\nconn.request(\"DELETE\", \"/v1/interactions/{InteractionIdentifier}\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "language": "python",
        "customLabel": ""
      },
      {
        "id": "Ir7pqYVcMXlrkBXZN3Fg5",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.elevateai.com/v1/interactions/{InteractionIdentifier}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"X-API-Token\"] = \"{Your API Token}\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "language": "ruby",
        "customLabel": ""
      },
      {
        "id": "fxu181kPopQIIkHDdVai6",
        "code": "var client = new RestClient(\"https://api.elevateai.com/v1/interactions/{InteractionIdentifier}\");\r\nclient.Timeout = -1;\r\nvar request = new RestRequest(Method.DELETE);\r\nrequest.AddHeader(\"X-API-Token\", \"{Your API Token}\");\r\nIRestResponse response = client.Execute(request);\r\nConsole.WriteLine(response.Content);",
        "language": "csharp",
        "customLabel": ""
      },
      {
        "id": "BPXZ2Pg8s6XU1vsuGemQf",
        "code": "<?php\r\n\r\n$curl = curl_init();\r\n\r\ncurl_setopt_array($curl, array(\r\n  CURLOPT_URL => 'https://api.elevateai.com/v1/interactions/%7BInteractionIdentifier%7D',\r\n  CURLOPT_RETURNTRANSFER => true,\r\n  CURLOPT_ENCODING => '',\r\n  CURLOPT_MAXREDIRS => 10,\r\n  CURLOPT_TIMEOUT => 0,\r\n  CURLOPT_FOLLOWLOCATION => true,\r\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n  CURLOPT_CUSTOMREQUEST => 'DELETE',\r\n  CURLOPT_HTTPHEADER => array(\r\n    'X-API-Token: {Your API Token}'\r\n  ),\r\n));\r\n\r\n$response = curl_exec($curl);\r\n\r\ncurl_close($curl);\r\necho $response;",
        "language": "php",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "mXN1xXD2W6r7IKOruTPnD"
  },
  "description": "",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  },
  "autoGeneratedAnchorSlug": "delete-all-data",
  "legacyHash": "U9KXw8CTNz6EF-RpPewHN"
}
```
:::

**Need more help?** Contact the [ElevateAI Support team](mailto\:support@elevateai.com). &#x20;
