---
title: "Get versions from hashes"
method: POST
path: "/version_files"
tags: ["version-files"]
---

# Get versions from hashes

`POST /version_files`

This is the same as [`/version_file/{hash}`](#operation/versionFromHash) except it accepts multiple hashes.

## Request body

- HashList — A list of hashes and the algorithm used to create them
  - `hashes` string[], required
  - `algorithm` 'sha1' | 'sha512', required

## Response `200`

Expected response to a valid request

- HashVersionMap — A map from hashes to versions

## Other responses

- `400` — Request was invalid, see given error

## Changes

- **2025-12-19** `0bffa67217e1` — 1 breaking, 3 info
  - the `additionalProperties/allOf[subschema #2]/files/items/file_type` response's property type changed from `string` to no type for status `200`
  - added `#/components/schemas/FileTypeEnum, subschema #2` to the `additionalProperties/allOf[subschema #2]/files/items/file_type` response property `allOf` list for the response status `200`
  - removed the `optional-resource-pack` enum value from the `additionalProperties/allOf[subschema #2]/files/items/file_type` response property for the response status `200`
  - removed the `required-resource-pack` enum value from the `additionalProperties/allOf[subschema #2]/files/items/file_type` response property for the response status `200`
- **2024-10-19** `3f6661cf21f2` — 2 breaking, 2 warning, 1 info
  - the response property `additionalProperties/allOf[subschema #2]/files/items/file_type` became nullable for the status `200`
  - the `additionalProperties/allOf[subschema #2]/files/items/file_type` response's property type changed from no type to `string` for status `200`
  - added the new `optional-resource-pack` enum value to the `additionalProperties/allOf[subschema #2]/files/items/file_type` response property for the response status `200`
  - added the new `required-resource-pack` enum value to the `additionalProperties/allOf[subschema #2]/files/items/file_type` response property for the response status `200`
  - …1 more

[Change history](https://skmtc.dev/modrinth/apis/labrinth/changes/version_files/post.md)

---

[API](https://skmtc.dev/modrinth/apis/labrinth.md) · [All operations](https://skmtc.dev/modrinth/apis/labrinth/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/modrinth/labrinth/revisions/0bffa67217e1/schema)
