Create a version
POST /version
This route creates a version on an existing project. There must be at least one file attached to each new version, unless the new version’s status is draft
. .mrpack
, .jar
, .zip
, and .litemod
files are accepted.
The request is a multipart request with at least two form fields: one is data
, which includes a JSON body with the version metadata as shown below, and at least one field containing an upload file.
You can name the file parts anything you would like, but you must list each of the parts’ names in file_parts
, and optionally, provide one to use as the primary file in primary_file
.
Authorizations
Request Body
New version
object
object
The name of this version
The version number. Ideally will follow semantic versioning
The changelog for this version
A list of specific versions of projects that this version depends on
object
The ID of the version that this version depends on
The ID of the project that this version depends on
The file name of the dependency, mostly used for showing external dependencies on modpacks
The type of dependency that this version has
A list of versions of Minecraft that this version supports
The release channel for this version
The mod loaders that this version supports. In case of resource packs, use “minecraft”
Whether the version is featured or not
The ID of the project this version is for
An array of the multipart field names of each file that goes with this version
The multipart field name of the primary file
Responses
200
Expected response to a valid request
object
The name of this version
The version number. Ideally will follow semantic versioning
The changelog for this version
A list of specific versions of projects that this version depends on
object
The ID of the version that this version depends on
The ID of the project that this version depends on
The file name of the dependency, mostly used for showing external dependencies on modpacks
The type of dependency that this version has
A list of versions of Minecraft that this version supports
The release channel for this version
The mod loaders that this version supports. In case of resource packs, use “minecraft”
Whether the version is featured or not
The ID of the version, encoded as a base62 string
The ID of the project this version is for
The ID of the author who published this version
The number of times this version has been downloaded
A link to the changelog for this version. Always null, only kept for legacy compatibility.
A list of files available for download for this version
object
A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash.
object
A direct link to the file
The name of the file
Whether this file is the primary one for its version. Only a maximum of one file per version will have this set to true. If there are not any primary files, it can be inferred that the first file is the primary one.
The size of the file in bytes
The type of the additional file, used mainly for adding resource packs to datapacks
400
Request was invalid, see given error
object
The name of the error
The contents of the error
401
Incorrect token scopes or no authorization to access the requested item(s)
object
The name of the error
The contents of the error