> 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.

# Create Tab

POST https://api.athenaintel.com/api/v0/tools/sheets/tab/create
Content-Type: application/json

Create a new tab in an Athena spreadsheet.

Reference: https://docs.athenaintel.com/api-reference/tools/sheets/create-tab

## Authentication

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

## Request

### Body (application/json)

This endpoint expects a CreateNewSheetTabRequest.

- `asset_id` (string, required) — The ID of the spreadsheet asset
- `sheet` (Sheet, required) — Sheet Specification

## Response

### 200

Successful Response

- `asset_id` (string, required) — The ID of the spreadsheet asset
- `message` (string, required) — Success message or error description
- `sheet_id` (integer, required) — The ID of the newly created sheet tab
- `success` (boolean, required) — Whether the operation was successful

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### Sheet

- `columnCount` (integer, required) — Column count (Defaults to 100)
- `index` (integer, required) — 0-based tab position of the new sheet (0 = first tab)
- `rowCount` (integer, required) — Row count (Defaults to 1000)
- `sheetId` (integer, required) — Sheet ID (required)
- `title` (string, required)
- `columnMetadata` (list of DimensionProperties, optional, nullable) — Array of column properties, one per column (1-indexed). REQUIRED when changing column widths. Each entry defines width, visibility for that column. Example: To set column C (index 3) width to 150px: columnMetadata[3] = DimensionProperties(size=150). Example: To hide column B: columnMetadata[2] = DimensionProperties(hiddenByUser=True). Common widths: 100px (default), 150px (wide text), 200px (very wide), 50px (narrow IDs)
- `frozenColumnCount` (integer, optional, nullable)
- `frozenRowCount` (integer, optional, nullable)
- `hidden` (boolean, optional, nullable)
- `merges` (list of GridRange, optional, default: []) — List of merged cell ranges in the sheet. Each merge combines multiple cells into a single cell. The top-left cell (startRowIndex, startColumnIndex) becomes the anchor cell that displays the content. Example: To merge cells A1:C3, use GridRange(startRowIndex=1, endRowIndex=3, startColumnIndex=1, endColumnIndex=3). Defaults to empty list (no merged cells).
- `rowMetadata` (list of DimensionProperties, optional, nullable) — Array of row properties, one per row (1-indexed). REQUIRED when changing row heights. Each entry defines height, visibility for that row. Example: To set row 5 height to 50px: rowMetadata[5] = DimensionProperties(size=50). Example: To hide row 3: rowMetadata[3] = DimensionProperties(hiddenByUser=True). Common heights: 21px (default), 30px (comfortable), 50px (tall headers)
- `showGridLines` (boolean, optional, nullable)
- `tabColor_hex` (string, optional, nullable) — Tab color as hex string (e.g., '#FF0000'). Use either tabColor_hex or tabColor_theme, not both.
- `tabColor_theme` (ThemeColor, optional, nullable) — Tab color as theme reference. Use either tabColor_hex or tabColor_theme, not both.

### ValidationError

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

### DimensionProperties

Properties for a row or column dimension in the spreadsheet.

- `hiddenByFilter` (boolean, optional, nullable) — True if this row/column is hidden due to a filter being applied. Do not modify directly - managed by filter operations
- `hiddenByUser` (boolean, optional, nullable) — True if the user explicitly hid this row/column (e.g., right-click > Hide). Set to False to unhide
- `resizedByUser` (boolean, optional, nullable) — True if the user manually resized this dimension (e.g., dragged column border to resize). Must be set to True whenever you set the 'size' field
- `size` (integer, optional, nullable) — Size in pixels. For columns, this is the width. For rows, this is the height. Default: 100px for columns, 21px for rows

### GridRange

Rectangular cell range with 1-based, INCLUSIVE boundaries. Unlike the Google Sheets API's GridRange (0-based, half-open end indices), every index here is 1-based and inclusive: A1:C3 is startRowIndex=1, endRowIndex=3, startColumnIndex=1, endColumnIndex=3.

- `endColumnIndex` (integer, required) — End column index (1-based, INCLUSIVE). Last column of the range. For range A1:C5, this would be 3. For single columns, equals startColumnIndex.
- `endRowIndex` (integer, required) — End row index (1-based, INCLUSIVE). Last row of the range. For a range A1:A5, this would be 5. For single cells, equals startRowIndex.
- `startColumnIndex` (integer, required) — Start column index (1-based, INCLUSIVE). First column of the range. A=1, B=2, C=3, etc. For range A1:C5, this would be 1.
- `startRowIndex` (integer, required) — Start row index (1-based, INCLUSIVE). First row of the range. For A1 this would be 1, for A5 this would be 5.

### ThemeColor

- `theme` (integer, required)
- `tint` (double, optional, nullable)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Request**

```json
{
  "asset_id": "string",
  "sheet": {
    "columnCount": 1,
    "index": 1,
    "rowCount": 1,
    "sheetId": 1,
    "title": "string"
  }
}
```

**Response**

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

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/tools/sheets/tab/create"

payload = {
    "asset_id": "string",
    "sheet": {
        "columnCount": 1,
        "index": 1,
        "rowCount": 1,
        "sheetId": 1,
        "title": "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/tab/create';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"asset_id":"string","sheet":{"columnCount":1,"index":1,"rowCount":1,"sheetId":1,"title":"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/tab/create"

	payload := strings.NewReader("{\n  \"asset_id\": \"string\",\n  \"sheet\": {\n    \"columnCount\": 1,\n    \"index\": 1,\n    \"rowCount\": 1,\n    \"sheetId\": 1,\n    \"title\": \"string\"\n  }\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/tab/create")

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  \"sheet\": {\n    \"columnCount\": 1,\n    \"index\": 1,\n    \"rowCount\": 1,\n    \"sheetId\": 1,\n    \"title\": \"string\"\n  }\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/tab/create")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"asset_id\": \"string\",\n  \"sheet\": {\n    \"columnCount\": 1,\n    \"index\": 1,\n    \"rowCount\": 1,\n    \"sheetId\": 1,\n    \"title\": \"string\"\n  }\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/tab/create', [
  'body' => '{
  "asset_id": "string",
  "sheet": {
    "columnCount": 1,
    "index": 1,
    "rowCount": 1,
    "sheetId": 1,
    "title": "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/tab/create");
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  \"sheet\": {\n    \"columnCount\": 1,\n    \"index\": 1,\n    \"rowCount\": 1,\n    \"sheetId\": 1,\n    \"title\": \"string\"\n  }\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",
  "sheet": [
    "columnCount": 1,
    "index": 1,
    "rowCount": 1,
    "sheetId": 1,
    "title": "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/tab/create")! 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()
```