# Create a value list

`POST /api/v1/value-lists`

Create a value list, empty until you add values to it.

## Body parameters

- `name` (string, required): What the list is called, up to 255 characters.

## Returns

The new value list.

- `data` (object): The value list.
- `data.type` (string): Always value_list.
- `data.id` (integer): The id of the list.
- `data.attributes` (object): What the list holds.
- `data.attributes.name` (string): What the list is called.
- `data.attributes.items` (array): Its choices in their order, each shaped as in List value lists.

## Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in `X-RateLimit-Remaining`.

## Request

```sh
curl https://my.monicahq.com/api/v1/value-lists \
  -X POST \
  -H "Authorization: Bearer $MONICA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
      "name": "Paper suppliers"
  }'
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/value-lists', {
  method: 'POST',
  headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'Paper suppliers',
  }),
})
const data = await response.json()
```

```php
$response = Http::withToken($token)->post('https://my.monicahq.com/api/v1/value-lists', [
    'name' => 'Paper suppliers',
]);
```

## Response

`201`

```json
{
    "data": {
        "type": "value_list",
        "id": 21,
        "attributes": {
            "name": "Paper suppliers",
            "items": []
        }
    }
}
```
