# Remove a company from the Companies table

Takes a company an agent saved out of the Companies table, by one of its `saved_ids` from GET /tables/companies (`sav_…` or `cmp_…`). A company that is there through its leads stays as long as its leads are in the Leads table.

## Authentication

Send `Authorization: Bearer gtk_…`. Create the key under **Connect assistant → API keys**. Every `gtk_` key can call these routes, also while the Signals API is closed. A missing, invalid or revoked key is **401**.

### Path parameters

- **`id`** `string` · **required** — One of the `saved_ids` of the company.

## Response

- **`id`** `string` · **required** — The id you sent.
- **`removed`** `boolean` · **required** — Always true.
- **`dashboard_url`** `string` · **required** — The Companies table in mySDR.

## Credits

Free. This call never uses credits.

## Errors

- **400** `invalid_request` — The id is not a `sav_…` or `cmp_…`.
- **404** `not_found` — Nothing an agent saved in the Companies table has this id.
- **401** `authentication_error` — The Authorization header is missing, or the key is unknown or revoked.
- **403** `permission_error` — API access is not part of your plan, or your account is suspended.
- **429** `rate_limit_error` — More than 60 requests per minute, or more than 3 at the same time, on one key. Wait for the Retry-After header.
- **503** `service_unavailable` — The API is temporarily unavailable. Retry later.
- **500** `internal_error` — Something went wrong on our side.

## Example

### cURL

```bash
curl -X DELETE "https://mysdr.app/api/v1/tables/companies/cmp_01J9Z6P8C8V0K3W6T2N8R5M1XC" \
  -H "Authorization: Bearer $MYSDR_API_KEY"
```

### JavaScript

```javascript
const response = await fetch('https://mysdr.app/api/v1/tables/companies/cmp_01J9Z6P8C8V0K3W6T2N8R5M1XC', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.MYSDR_API_KEY}`
  }
});
const body = await response.json();
```

### Python

```python
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://mysdr.app/api/v1/tables/companies/cmp_01J9Z6P8C8V0K3W6T2N8R5M1XC",
    headers={
    "Authorization": f"Bearer {os.environ['MYSDR_API_KEY']}"
    },
    method="DELETE",
)
with urllib.request.urlopen(request) as response:
    body = json.load(response)
```

### Example response

```json
{
  "id": "cmp_01J9Z6P8C8V0K3W6T2N8R5M1XC",
  "removed": true,
  "dashboard_url": "https://mysdr.app/en/gtm/companies"
}
```
