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

# Delete Table Column

POST https://api.athenaintel.com/api/v0/tools/sheets/table/column/delete
Content-Type: application/json

Delete a column from a table within an Athena spreadsheet.

Reference: https://docs.athenaintel.com/api-reference/tools/sheets/delete-table-column

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects a DeleteTableColumnRequest.

- `asset_id` (string, required) — The ID of the spreadsheet asset
- `dimension_index` (integer, required) — 0-based dimension index within the table
- `table_id` (string, required) — Table ID where to delete column
- `sheet_id` (integer, optional, default: 1) — Sheet ID (defaults to 1)

## Response

### 200

Successful Response

- `asset_id` (string, required) — The ID of the spreadsheet asset
- `message` (string, required) — Success message or error description
- `success` (boolean, required) — Whether the operation was successful
- `new_sheet_id` (integer, optional, nullable) — ID of the newly created sheet when the operation creates one (e.g. duplicate). For rnc-engine sheets this is the engine-assigned id, which may differ from a requested new_sheet_id.

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Request**

```json
{
  "asset_id": "string",
  "dimension_index": 1,
  "table_id": "string"
}
```

**Response**

```json
{
  "asset_id": "string",
  "message": "string",
  "success": true,
  "new_sheet_id": 1
}
```

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/tools/sheets/table/column/delete"

payload = {
    "asset_id": "string",
    "dimension_index": 1,
    "table_id": "string"
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.athenaintel.com/api/v0/tools/sheets/table/column/delete';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"asset_id":"string","dimension_index":1,"table_id":"string"}'
};

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.athenaintel.com/api/v0/tools/sheets/table/column/delete"

	payload := strings.NewReader("{\n  \"asset_id\": \"string\",\n  \"dimension_index\": 1,\n  \"table_id\": \"string\"\n}")

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

	req.Header.Add("X-API-KEY", "<apiKey>")
	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.athenaintel.com/api/v0/tools/sheets/table/column/delete")

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

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"asset_id\": \"string\",\n  \"dimension_index\": 1,\n  \"table_id\": \"string\"\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.post("https://api.athenaintel.com/api/v0/tools/sheets/table/column/delete")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"asset_id\": \"string\",\n  \"dimension_index\": 1,\n  \"table_id\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.athenaintel.com/api/v0/tools/sheets/table/column/delete', [
  'body' => '{
  "asset_id": "string",
  "dimension_index": 1,
  "table_id": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/tools/sheets/table/column/delete");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"asset_id\": \"string\",\n  \"dimension_index\": 1,\n  \"table_id\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "asset_id": "string",
  "dimension_index": 1,
  "table_id": "string"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/tools/sheets/table/column/delete")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```