# Move a value

`PUT /api/v1/value-lists/{valueList}/items/{valueListItem}/position`

Move a value to another place in its list.

## Parameters

- `valueList` (integer, required): The id of the value list, as List value lists gives it.
- `valueListItem` (integer, required): The id of the value, as List value lists gives it among the items of its list.
- `position` (integer, required): The place to move it to, counting from 1. A place past the end puts it last.

## Returns

The value in its new place. A list of another account, a list that belongs to one field, and a value of another list answer 404.

- `data` (object): The value.
- `data.type` (string): Always value_list_item.
- `data.id` (integer): The id of the value, which is what a field offering this list stores.
- `data.attributes` (object): What the value holds.
- `data.attributes.label` (string): What the value says.
- `data.attributes.country_code` (string): On the Countries list, its two letter code. Null on every other list.
- `data.attributes.is_active` (boolean): Whether the value is offered.
- `data.attributes.position` (integer): Its place in the list, counting from 1.

## 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/21/items/87/position \
  -X PUT \
  -H "Authorization: Bearer $MONICA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
      "position": 1
  }'
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/value-lists/21/items/87/position', {
  method: 'PUT',
  headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    position: 1,
  }),
})
const data = await response.json()
```

```php
$response = Http::withToken($token)->put('https://my.monicahq.com/api/v1/value-lists/21/items/87/position', [
    'position' => 1,
]);
```

## Response

`200`

```json
{
    "data": {
        "type": "value_list_item",
        "id": 87,
        "attributes": {
            "label": "Staples",
            "country_code": null,
            "is_active": true,
            "position": 1
        }
    }
}
```
