# Reorder tags

`POST /api/tag/reorder`

URL: https://repsona.com/api/post-tag-reorder

Persists the given order as sortOrder. Admin/owner only, like tag deletion.

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `ids` | body | integer[] | required | Tag IDs in the order they should appear (up to 1,000). |

## Request

```sh
curl -X POST "https://<space>.repsona.com/api/tag/reorder" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      75,
      76
    ]
  }'
```

## Responses

- 200: Reordered
- 400: Duplicate ids
- 401: Authentication is required
- 403: Admin only
- 404: Some tags do not belong to the space

## Example response

```json
{
  "ok": true
}
```
