# Create a transaction category

Add a NEW workspace category, placed at the end of the workspace's order. The identifier is lowercase letters, digits and underscores, starting with a letter, and must not already exist — an existing identifier is refused (409) rather than overwritten; to change a category, save it by its identifier instead. Kind is one of expense, income, transfer, asset, liability or equity. Keywords are vendor or memo words that suggest this category for a bank line. Takes the brokerage's books: an owner or admin, or a seat holding an accounting grant (`get_accounting_me_access`); anyone else is refused with 403.

Access class: `workspace:books`.

## Endpoint

`POST /v1/accounting/categories`

## Request body

Content type: `application/json`.

```json
{
  "active": true,
  "color": "string",
  "guidance": "string",
  "icon": "string",
  "identifier": "string",
  "keywords": [
    "string"
  ],
  "kind": "string",
  "name": "string",
  "position": 1,
  "tags": [
    "string"
  ],
  "uses": 1
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "active": true,
    "color": "string",
    "guidance": "string",
    "icon": "string",
    "identifier": "string",
    "keywords": [
      "string"
    ],
    "kind": "string",
    "name": "string",
    "position": 1,
    "tags": [
      "string"
    ],
    "uses": 1
  }
}
```

### 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"
}
```
