> This page is for version v2.0 (default).
> For other versions, use one of these documentation indexes:
> - v2.0 (default): https://docs.cable.tech/v-2-0/llms.txt
> - v1.0: https://docs.cable.tech/v-1-0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cable.tech/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cable.tech/_mcp/server.

# Submit a deletion request for a company and any related data

DELETE https://api.cable.tech/v2/company
Content-Type: application/json

This operation will submit a request to delete the company and any
related data.The deletion request will be processed by the system and
the data will be removed permanently from Cable's system. Deletion
requests are not processed immediately and may take some time to
complete.The status of the deletion request can be checked using the
deletion request ID and the status endpoint.This operation is not intended for regular use and should be used with caution.

Reference: https://docs.cable.tech/api-documentation/api-reference/company/delete-company

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `company_id` (string, required) — The unique identifier of the company
- `reason` (string, required) — The reason for deletion

## Response

### 200

Deletion request submitted successfully

- `company_id` (string, optional) — The unique identifier of the company
- `deletion_request_id` (string, optional) — The unique identifier of the deletion request

## Errors

### 401 Unauthorized Error

Unauthorized request

- `code` (integer, required)
- `message` (string, required)
- `errors` (list of GeneralErrorErrorsItems, optional) — Detailed information about errors in specific fields.

### 404 Not Found Error

Person does not exist

- `code` (integer, required)
- `message` (string, required)
- `errors` (list of GeneralErrorErrorsItems, optional) — Detailed information about errors in specific fields.

### 429 Too Many Requests Error

Rate limit exceeded

- `code` (integer, required)
- `message` (string, required)
- `errors` (list of GeneralErrorErrorsItems, optional) — Detailed information about errors in specific fields.

### 500 Internal Server Error

Server error

- `code` (integer, required)
- `message` (string, required)
- `errors` (list of GeneralErrorErrorsItems, optional) — Detailed information about errors in specific fields.

## Types

### GeneralErrorErrorsItems

- `field` (string, optional)
- `message` (string, optional)

## Examples

**Request**

```json
{
  "company_id": "c1234567-89ab-4def-0123-456789abcdef",
  "reason": "Company is no longer operational and requests permanent data removal."
}
```

**Response**

```json
{
  "company_id": "c1234567-89ab-4def-0123-456789abcdef",
  "deletion_request_id": "dreq-20240615-9876543210"
}
```

**SDK Code**

```python
import requests

url = "https://api.cable.tech/v2/company"

payload = {
    "company_id": "c1234567-89ab-4def-0123-456789abcdef",
    "reason": "Company is no longer operational and requests permanent data removal."
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.cable.tech/v2/company';
const options = {
  method: 'DELETE',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"company_id":"c1234567-89ab-4def-0123-456789abcdef","reason":"Company is no longer operational and requests permanent data removal."}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cable.tech/v2/company"

	payload := strings.NewReader("{\n  \"company_id\": \"c1234567-89ab-4def-0123-456789abcdef\",\n  \"reason\": \"Company is no longer operational and requests permanent data removal.\"\n}")

	req, _ := http.NewRequest("DELETE", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cable.tech/v2/company")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"company_id\": \"c1234567-89ab-4def-0123-456789abcdef\",\n  \"reason\": \"Company is no longer operational and requests permanent data removal.\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.cable.tech/v2/company")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"company_id\": \"c1234567-89ab-4def-0123-456789abcdef\",\n  \"reason\": \"Company is no longer operational and requests permanent data removal.\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.cable.tech/v2/company', [
  'body' => '{
  "company_id": "c1234567-89ab-4def-0123-456789abcdef",
  "reason": "Company is no longer operational and requests permanent data removal."
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cable.tech/v2/company");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"company_id\": \"c1234567-89ab-4def-0123-456789abcdef\",\n  \"reason\": \"Company is no longer operational and requests permanent data removal.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "company_id": "c1234567-89ab-4def-0123-456789abcdef",
  "reason": "Company is no longer operational and requests permanent data removal."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cable.tech/v2/company")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```