> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Data by Location

> Delete all data associated with a specific location

Use this API to delete all data (comments, recordings, or any other feature data) associated with a specific location.

# Endpoint

`POST https://api.velt.dev/v1/organizations/documents/locations/data/delete`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="apiKey" type="string" required>
      Your API key
    </ParamField>

    <ParamField body="authToken" type="string" required>
      Your Auth Token
    </ParamField>

    <ParamField body="documentId" type="string" required>
      Document ID
    </ParamField>

    <ParamField body="location" type="object" required>
      The location object containing the data to be deleted
    </ParamField>
  </Expandable>
</ParamField>

## **Example Request**

```JSON theme={null}
{
  "data": {
    "apiKey": "YOUR_API_KEY",
    "authToken": "YOUR_AUTH_TOKEN",
    "documentId": "YOUR_DOCUMENT_ID",
    "location": {
      "id": "scene_1",
      "locationName": "White scene"
    }
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Data deleted successfully.",
    "data": null
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Data deleted successfully.",
      "data": null
    }
  }
  ```
</ResponseExample>
