---
search:
  tags:
    - Torrents
    - PATCH
seo:
  description: >-
    Set file priorities. Reference for the PATCH /torrents/{hash}/files endpoint
    in the piecemeal API.
sidebar:
  label: Set file priorities
  badge: PATCH
title: Set file priorities
type: openapi-operation
---
`PATCH /torrents/{hash}/files`

**Request body** (`application/json`, required)

- `indices` (integer<int64>[] | null, required)
- `priority` (integer<int64>, required) — 0 skip, 1 normal, 6 high, 7 highest.

Request body example:

```json
{
  "indices": [
    0
  ],
  "priority": 0
}
```

**Responses**

- `204` — No Content
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `500` — Internal Server Error
