---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
alternate:
  - https://yandex.ru/support/wiki/en/api-ref/grids/grids__add_columns.md
  - https://yandex.ru/support/wiki/ru/api-ref/grids/grids__add_columns.md
  - href: https://yandex.ru/support/wiki/en/api-ref/grids/grids__add_columns.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/support/wiki/en/llms.txt?revision=r22094953
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/wiki/en/llms.txt?revision=r22094953

<div class="openapi">

# Add Columns

<!-- markdownlint-disable-file -->

Adds columns to a dynamic table.

For common headers and authentication methods, see [Access to the API](https://yandex.ru/support/wiki/en/api-ref/access.md#headers). For sample scenarios, see [API usage examples](https://yandex.ru/support/wiki/en/api-ref/examples.md).

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api.wiki.yandex.net/v1/grids/{idx}/columns
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_idx_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid4&gt;

Dynamic table UUID. The value of `idx` is the same as the `id` field value in the response to `POST /v1/grids`, or `results[].id` in the response to `GET /v1/pages/{idx}/grids`. In `/v1/pages/{idx}/grids`, `idx` is the numeric page ID.

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "revision": "example",
  "position": 0,
  "columns": [
    {
      "id": "example",
      "slug": "example",
      "title": "example",
      "type": "string",
      "required": true,
      "width": 0,
      "width_units": "%",
      "pinned": "left",
      "color": "blue",
      "multiple": true,
      "format": "yfm",
      "ticket_field": "assignee",
      "select_options": [
        "example"
      ],
      "mark_rows": true,
      "description": "example"
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_columns_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [NewColumnSchema](#entity-NewColumnSchema)[]

The columns to add. Slugs must be unique within the table.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "id": "example",
    "slug": "example",
    "title": "example",
    "type": "string",
    "required": true,
    "width": 0,
    "width_units": "%",
    "pinned": "left",
    "color": "blue",
    "multiple": true,
    "format": "yfm",
    "ticket_field": "assignee",
    "select_options": [
      "example"
    ],
    "mark_rows": true,
    "description": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_position_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

The insertion position, starting from zero. If omitted, columns are added to the end of the table.
{.table-cell}
||
||

_revision_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

The table version used as the basis for the changes.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### ColumnType {#entity-ColumnType}

Data type of a dynamic table column.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `string`, `number`, `date`, `select`, `staff`, `checkbox`, `ticket`, `ticket_field`

</div>

<div class="openapi-entity">

### WidthUnits {#entity-WidthUnits}

Column width units.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `%`, `px`

</div>

<div class="openapi-entity">

### ColumnPinTypes {#entity-ColumnPinTypes}

Side where the column is pinned.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `left`, `right`

</div>

<div class="openapi-entity">

### BGColor {#entity-BGColor}

Background color of a row or column.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `blue`, `yellow`, `pink`, `red`, `green`, `mint`, `grey`, `orange`, `magenta`, `purple`, `copper`, `ocean`

</div>

<div class="openapi-entity">

### TextFormat {#entity-TextFormat}

Text format:
- `yfm`: Yandex Flavored Markdown.
- `wom`: Wiki Old Markup (legacy markup).
- `plain`: Plain text.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `yfm`, `wom`, `plain`

</div>

<div class="openapi-entity">

### TicketField {#entity-TicketField}

A Tracker issue field whose value is displayed in the column.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `assignee`, `components`, `created_at`, `deadline`, `description`, `end`, `estimation`, `fixversions`, `followers`, `last_comment_updated_at`, `original_estimation`, `parent`, `pending_reply_from`, `priority`, `project`, `queue`, `reporter`, `resolution`, `resolved_at`, `sprint`, `start`, `status`, `status_start_time`, `status_type`, `storypoints`, `subject`, `tags`, `type`, `updated_at`, `votes`

</div>

<div class="openapi-entity">

### NewColumnSchema {#entity-NewColumnSchema}

Schema for creating a new column in a dynamic table

#|
|| **Name** | **Description** ||
||

_required_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

Whether the column is required
{.table-cell}
||
||

_slug_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Unique text identifier of the column (used in formulas and the API)

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_title_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Column title (displayed in the interface)

_Min length:_{.json-schema-reset .json-schema-assertion} `1`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **ColumnType**

  **Type**: [ColumnType](#entity-ColumnType)

  Data type of a dynamic table column.

  _Enum:_{.json-schema-reset .json-schema-value} `string`, `number`, `date`, `select`, `staff`, `checkbox`, `ticket`, `ticket_field`

{% endcut %}

Column data type

_Example:_{.json-schema-reset .json-schema-example} `string`
{.table-cell}
||
||

_color_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **BGColor**

  **Type**: [BGColor](#entity-BGColor)

  Background color of a row or column.

  _Enum:_{.json-schema-reset .json-schema-value} `blue`, `yellow`, `pink`, `red`, `green`, `mint`, `grey`, `orange`, `magenta`, `purple`, `copper`, `ocean`

{% endcut %}

Column background color

_Example:_{.json-schema-reset .json-schema-example} `blue`
{.table-cell}
||
||

_description_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Column description

_Max length:_{.json-schema-reset .json-schema-assertion} `1024`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_format_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **TextFormat**

  **Type**: [TextFormat](#entity-TextFormat)

  Text format:
  - `yfm`: Yandex Flavored Markdown.
  - `wom`: Wiki Old Markup (legacy markup).
  - `plain`: Plain text.

  _Enum:_{.json-schema-reset .json-schema-value} `yfm`, `wom`, `plain`

{% endcut %}

Only for `string`. The text format.

_Example:_{.json-schema-reset .json-schema-example} `yfm`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Unique column identifier

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_mark_rows_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Only for `checkbox`. Marks the row as completed in the interface.
{.table-cell}
||
||

_multiple_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Only for `select` and `staff`. Enables multiple selection.
{.table-cell}
||
||

_pinned_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **ColumnPinTypes**

  **Type**: [ColumnPinTypes](#entity-ColumnPinTypes)

  Side where the column is pinned.

  _Enum:_{.json-schema-reset .json-schema-value} `left`, `right`

{% endcut %}

Column pinning (left, right, or unpinned)

_Example:_{.json-schema-reset .json-schema-example} `left`
{.table-cell}
||
||

_select_options_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

Only for `select`. Defines the available options.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_ticket_field_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **TicketField**

  **Type**: [TicketField](#entity-TicketField)

  A Tracker issue field whose value is displayed in the column.

  _Enum:_{.json-schema-reset .json-schema-value} `assignee`, `components`, `created_at`, `deadline`, `description`, `end`, `estimation`, `fixversions`, `followers`, `last_comment_updated_at`, `original_estimation`, `parent`, `pending_reply_from`, `priority`, `project`, `queue`, `reporter`, `resolution`, `resolved_at`, `sprint`, `start`, `status`, `status_start_time`, `status_type`, `storypoints`, `subject`, `tags`, `type`, `updated_at`, `votes`

{% endcut %}

Only for `ticket_field`. A field of an issue in Yandex Tracker.

_Example:_{.json-schema-reset .json-schema-example} `assignee`
{.table-cell}
||
||

_width_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Column width
{.table-cell}
||
||

_width_units_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **WidthUnits**

  **Type**: [WidthUnits](#entity-WidthUnits)

  Column width units.

  _Enum:_{.json-schema-reset .json-schema-value} `%`, `px`

{% endcut %}

Column width units

_Example:_{.json-schema-reset .json-schema-example} `%`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example",
  "slug": "example",
  "title": "example",
  "type": "string",
  "required": true,
  "width": 0,
  "width_units": "%",
  "pinned": "left",
  "color": "blue",
  "multiple": true,
  "format": "yfm",
  "ticket_field": "assignee",
  "select_options": [
    "example"
  ],
  "mark_rows": true,
  "description": "example"
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "revision": "example"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_revision_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Table revision after the operation.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.