# Add a column to a page

Adds a column to a record page. `kind` is one of text, number, date, select, checkbox, url, email, phone, person, tags, currency, percent, rating, relation, datetime, long_text, address, file, formula, lookup, and `config` is validated against that kind — a select's options, a relation's target (`config.definitionKey`: any page OR any custom board, whose key is the board's `definitionKey`, `board-…`), a formula or lookup's references, which are checked against columns that actually exist. `source` defaults to `own` and otherwise must read `crm:<object>.<field>` or `app:<object>.<field>`; `priority` defaults to 50 (0-1000) and `minWidth` to 160 (40-800). The new column goes last in the page's order. Workspace admin.

Access class: `def:admin`.

## Endpoint

`POST /v1/definitions/{key}/columns`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "alignEnd": true,
    "config": {},
    "kind": "string",
    "label": "string",
    "minWidth": 1,
    "priority": 1,
    "source": "string"
  },
  "params": {
    ":key": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "alignEnd": true,
    "calculation": "string",
    "config": {},
    "defaultEnabled": true,
    "id": "",
    "kind": "string",
    "label": "string",
    "minWidth": 1.5,
    "position": 1.5,
    "priority": 1.5,
    "source": "string",
    "starred": true
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
