├── static
├── img
│ ├── favicon.ico
│ └── logo.svg
├── font
│ ├── inter-400.woff2
│ ├── inter-500.woff2
│ ├── inter-700.woff2
│ ├── montserrat-600.woff2
│ └── font-faces.css
├── welcome-channel.yaml
├── _redirects
└── openapi.yaml
├── babel.config.js
├── tsconfig.json
├── README.md
├── environment.d.ts
├── .gitignore
├── .github
└── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── bug_report.yml
│ └── enhancement.yml
├── package.json
├── src
└── css
│ └── custom.css
├── LICENSE
└── docusaurus.config.ts
/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modrinth/docs/HEAD/static/img/favicon.ico
--------------------------------------------------------------------------------
/static/font/inter-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modrinth/docs/HEAD/static/font/inter-400.woff2
--------------------------------------------------------------------------------
/static/font/inter-500.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modrinth/docs/HEAD/static/font/inter-500.woff2
--------------------------------------------------------------------------------
/static/font/inter-700.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modrinth/docs/HEAD/static/font/inter-700.woff2
--------------------------------------------------------------------------------
/static/font/montserrat-600.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modrinth/docs/HEAD/static/font/montserrat-600.woff2
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3 | };
4 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@docusaurus/tsconfig",
3 | "compilerOptions": {
4 | "baseUrl": "."
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Modrinth's documentation is now known as `docs` in Modrinth's monorepo here: https://github.com/modrinth/code/tree/main/apps/docs
2 | This repo is archived and will no longer be updated.
3 |
--------------------------------------------------------------------------------
/environment.d.ts:
--------------------------------------------------------------------------------
1 | declare global {
2 | namespace NodeJS {
3 | interface ProcessEnv {
4 | CF_PAGES_BRANCH?: string
5 | CF_PAGES_COMMIT_SHA?: string
6 | }
7 | }
8 | }
9 |
10 | export {}
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Dependencies
2 | /node_modules
3 |
4 | # Production
5 | /build
6 |
7 | # Generated files
8 | .docusaurus
9 | .cache-loader
10 |
11 | # Misc
12 | .DS_Store
13 | .env.local
14 | .env.development.local
15 | .env.test.local
16 | .env.production.local
17 |
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 | .idea
22 |
23 | .vercel
24 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: true
2 | contact_links:
3 | - name: Discord
4 | about: Ask questions on our Discord Server.
5 | url: https://discord.modrinth.com
6 | - name: Roadmap
7 | about: View our Roadmap. Please do not open issues for items on our roadmap.
8 | url: https://roadmap.modrinth.com
9 | - name: Discussions (Feature requests)
10 | about: |
11 | Please use Issues for reporting bugs and suggesting enhancements to existing features.
12 | Suggestions for new features should be made as a Discussion.
13 | url: https://github.com/orgs/modrinth/discussions/categories/feature-requests
14 | - name: Documentation
15 | about: Useful documentation about Modrinth, its API, and how you can contribute.
16 | url: https://docs.modrinth.com
17 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "modrinth-docs",
3 | "private": true,
4 | "scripts": {
5 | "docusaurus": "docusaurus",
6 | "dev": "docusaurus start",
7 | "build": "docusaurus build",
8 | "clear": "docusaurus clear",
9 | "serve": "docusaurus serve"
10 | },
11 | "dependencies": {
12 | "@docusaurus/core": "^3.1.0",
13 | "@docusaurus/preset-classic": "^3.1.0",
14 | "docusaurus-plugin-dotenv": "^1.0.1",
15 | "react": "^18.0.0",
16 | "redocusaurus": "^2.0.0"
17 | },
18 | "browserslist": {
19 | "production": [
20 | ">0.5%",
21 | "not dead",
22 | "not op_mini all"
23 | ],
24 | "development": [
25 | "last 1 chrome version",
26 | "last 1 firefox version",
27 | "last 1 safari version"
28 | ]
29 | },
30 | "engines": {
31 | "node": ">=18.0"
32 | },
33 | "packageManager": "pnpm@8.14.1",
34 | "devDependencies": {
35 | "@docusaurus/tsconfig": "^3.1.0",
36 | "@docusaurus/types": "^3.1.0",
37 | "@types/node": "^20.9.0"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: Bug report
2 | description: Create a report to help us improve Modrinth
3 | labels: [bug]
4 | body:
5 | - type: textarea
6 | attributes:
7 | label: Describe the bug
8 | description: A clear and concise description of what the bug is.
9 | validations:
10 | required: false
11 | - type: textarea
12 | attributes:
13 | label: Steps to reproduce
14 | description: Steps to reproduce the behavior.
15 | placeholder: |
16 | 1. Go to '...'
17 | 2. Click on '...'
18 | 3. Scroll down to '...'
19 | 4. See error
20 | validations:
21 | required: false
22 | - type: textarea
23 | attributes:
24 | label: Expected behavior
25 | description: A clear and concise description of what you expected to happen.
26 | validations:
27 | required: false
28 | - type: textarea
29 | attributes:
30 | label: Additional context
31 | description: Add any other context about the problem here.
32 | validations:
33 | required: false
34 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/enhancement.yml:
--------------------------------------------------------------------------------
1 | name: Enhancement
2 | description: Suggest an enhancement for an existing Modrinth feature
3 | labels: [enhancement]
4 | body:
5 | - type: textarea
6 | attributes:
7 | label: Is your suggested enhancement related to a problem? Please describe.
8 | description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9 | validations:
10 | required: false
11 | - type: textarea
12 | attributes:
13 | label: Describe the solution you'd like
14 | description: A clear and concise description of what you want to happen.
15 | validations:
16 | required: false
17 | - type: textarea
18 | attributes:
19 | label: Describe alternatives you've considered
20 | description: A clear and concise description of any alternative solutions or features you've considered.
21 | validations:
22 | required: false
23 | - type: textarea
24 | attributes:
25 | label: Additional context
26 | description: Add any other context or screenshots about the suggested enhancement here.
27 | validations:
28 | required: false
29 |
--------------------------------------------------------------------------------
/static/font/font-faces.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Inter';
3 | font-style: normal;
4 | font-weight: 400;
5 | font-stretch: 100%;
6 | src: url(inter-400.woff2) format('woff2');
7 | unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
8 | }
9 |
10 | @font-face {
11 | font-family: 'Inter';
12 | font-style: normal;
13 | font-weight: 500;
14 | font-stretch: 100%;
15 | src: url(inter-500.woff2) format('woff2');
16 | unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
17 | }
18 |
19 | @font-face {
20 | font-family: 'Inter';
21 | font-style: normal;
22 | font-weight: 700;
23 | font-stretch: 100%;
24 | src: url(inter-700.woff2) format('woff2');
25 | unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
26 | }
27 |
28 | @font-face {
29 | font-family: 'Montserrat';
30 | font-style: normal;
31 | font-weight: 600;
32 | font-stretch: 100%;
33 | src: url(montserrat-600.woff2) format('woff2');
34 | unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
35 | }
--------------------------------------------------------------------------------
/static/img/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/css/custom.css:
--------------------------------------------------------------------------------
1 | :root[data-theme='dark'] {
2 | --ifm-color-primary: #1cdf8b;
3 | --ifm-color-primary-dark: #1bd96a;
4 | --ifm-color-primary-darker: rgb(31, 165, 136);
5 | --ifm-color-primary-darkest: rgb(26, 136, 112);
6 | --ifm-color-primary-light: #2ef19f;
7 | --ifm-color-primary-lighter: #55f5ae;
8 | --ifm-color-primary-lightest: #55f5ae;
9 | --ifm-code-font-size: 95%;
10 | --landing-maze-bg: linear-gradient(0deg, #31375f 0%, rgba(8, 14, 55, 0) 100%),
11 | url('https://cdn.modrinth.com/landing-new/landing.webp');
12 | }
13 |
14 | :root {
15 | --ifm-color-primary: #30b27b;
16 | --ifm-color-primary-dark: rgb(31, 165, 136);
17 | --ifm-color-primary-darker: rgb(26, 136, 112);
18 | --ifm-color-primary-darkest: rgb(22, 113, 94);
19 | --ifm-color-primary-light: #1cdf8b;
20 | --ifm-color-primary-lighter: #2ef19f;
21 | --ifm-color-primary-lightest: #55f5ae;
22 | --ifm-font-family-base: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Roboto,
23 | Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
24 | --landing-maze-bg: linear-gradient(0deg, var(--ifm-color-secondary) 0%, rgba(8, 14, 55, 0) 100%),
25 | url('https://cdn.modrinth.com/landing-new/landing-light.webp');
26 | }
27 |
28 | .hero--primary {
29 | --ifm-hero-text-color: var(--ifm-font-color-base);
30 | }
31 |
32 | .button {
33 | background-color: var(--ifm-color-primary);
34 | border: none;
35 | }
36 |
37 | .docusaurus-highlight-code-line {
38 | background-color: rgba(0, 0, 0, 0.1);
39 | display: block;
40 | margin: 0 calc(-1 * var(--ifm-pre-padding));
41 | padding: 0 var(--ifm-pre-padding);
42 | }
43 |
44 | html[data-theme='dark'] .docusaurus-highlight-code-line {
45 | background-color: rgba(0, 0, 0, 0.3);
46 | }
47 |
48 | .navbar__title {
49 | font-family: "Montserrat", sans-serif;
50 | font-size: 1.5rem;
51 | font-weight: 600;
52 | }
53 |
54 | .dsla-search-wrapper {
55 | min-width: 200px;
56 | }
57 |
58 | nav .dsla-search-wrapper {
59 | @media (max-width: 440px) {
60 | display: none;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/static/welcome-channel.yaml:
--------------------------------------------------------------------------------
1 | - type: text
2 | text: https://cdn.discordapp.com/attachments/734084240408444949/975414177550200902/welcome-channel.png
3 |
4 | - type: embed
5 | embeds:
6 | - title: __Welcome to Modrinth's Discord server!__
7 | url: https://modrinth.com
8 | color: 0x1bd96a
9 | description: "Modrinth is the place for Minecraft mods, plugins, data packs, shaders, resource packs, and
10 | modpacks. Discover, play, and share Minecraft content through our open-source platform built for the community."
11 |
12 | - type: embed
13 | embeds:
14 | - title: "**:scroll: __Rules__**"
15 | color: 0x4f9cff
16 | description: "Modrinth's rules are easy to follow. Despite this, please keep in mind that this is not an entirely
17 | open forum. First and foremost, this Discord server is intended to facilitate the development of Modrinth and
18 | for communication regarding Modrinth. Ultimately, it is up to the discretion of the moderators whether your
19 | messages are in violation of our rules.\n\n
20 | Modrinth's rules are split up into two categories: the **__DOs__** and the **__DO NOTs__**."
21 | - title: ":white_check_mark: Do:"
22 | color: 0x1bd96a
23 | description: >-
24 | 1. Treat every user with respect and consider the opinions and viewpoints of others
25 |
26 | 2. Stay on-topic in all channels; all channels are only for discussion of **Modrinth itself** with the
27 | exceptions of <#783091855616901200>, <#1109517383074328686>, and <#1061855024252207167>
28 |
29 | 3. Follow Discord's rules, including the [Community Guidelines](https://discord.com/guidelines) and the [Terms
30 | of Service](https://discord.com/terms) (this also means that discussions regarding "cracked" launchers and
31 | Discord client modifications are **prohibited under all circumstances**)
32 |
33 | 4. Contact the moderators at any time via the <@&895382919772766219> ping
34 |
35 | 5. Respect the use of accessibility and self-identity tools such as [PluralKit](https://pluralkit.me)
36 | - title: ":no_entry: Do not:"
37 | color: 0xff496e
38 | description: >-
39 | 6. Harass, bother, provoke, or insult anyone, including by sending unsolicited DMs or friend requests
40 |
41 | 7. Cause problems or impede Modrinth's development
42 |
43 | 8. Discuss drama from other places, including bashing or hating on other websites and platforms (though
44 | constructive criticism for the betterment of Modrinth is encouraged)
45 |
46 | 9. Report Modrinth content in the Discord (use the Report button on the website)
47 |
48 | 10. Assume staff member's opinions reflect those of Modrinth
49 | - title: ":pencil2: Nickname policy:"
50 | color: 0xffa347
51 | description: >-
52 | We want to keep this server clean and therefore require that display names of all members on the server are
53 | readable, accessible, and free of attention-seeking elements, which includes, but is not limited to, display
54 | names that begin with hoisting characters, have an excessive number of emojis in them, or use "fancy fonts",
55 | "glitch effects" and any other Unicode characters, which are either very inaccessible to screen readers or cause
56 | annoyance to other members.
57 |
58 | When we find that your display name does not adhere to this policy, we will try to correct it by changing your
59 | nickname on the server. Repetitive attempts to revert to a violating display name may result in your removal
60 | from the server. We will also permanently remove any users whose profiles contain inappropriate content.
61 | - type: links
62 | color: 0x4f9cff
63 | title: "**:link: __Links__**"
64 | links:
65 | Website: https://modrinth.com
66 | Support: https://support.modrinth.com
67 | Status page: https://status.modrinth.com
68 | Roadmap: https://roadmap.modrinth.com
69 | Blog and newsletter: https://blog.modrinth.com/subscribe?utm_medium=social&utm_source=discord&utm_campaign=welcome
70 | API documentation: https://docs.modrinth.com
71 | Modrinth source code: https://github.com/modrinth
72 | Help translate Modrinth: https://crowdin.com/project/modrinth
73 | Follow Modrinth on Mastodon: https://floss.social/@modrinth
74 | Follow Modrinth on Twitter: https://twitter.com/modrinth
75 |
76 | - type: text
77 | text: |
78 | **Main server:**
79 | **Testing server:**
80 |
--------------------------------------------------------------------------------
/static/_redirects:
--------------------------------------------------------------------------------
1 | /api-spec / 308
2 |
3 | /docs/getting-started/ /#section/Getting-Started 308
4 | /api /#section/Getting-Started 308
5 | /docs/migrations/information/ /#section/Versioning 308
6 | /api/migration /#section/Versioning 308
7 | /docs/migrations/v1-to-v2/ /#section/Versioning 308
8 | /api/migration/v1-to-v2 /#section/Versioning 308
9 | /docs/details/versioning/ /#section/Versioning 308
10 | /docs/tutorials/forge_updates/ /#tag/misc/operation/forgeUpdates 308
11 | /docs/tutorials/api_search/ /#tag/projects/operation/searchProjects 308
12 |
13 | /faq/app/crashing https://support.modrinth.com/en/articles/8792916 308
14 | /faq/etas https://support.modrinth.com/en/articles/8793126 308
15 | /faq/join-filters https://support.modrinth.com/en/articles/8793174 308
16 | /faq/dependents https://support.modrinth.com/en/articles/8793204 308
17 | /faq/snapshots https://support.modrinth.com/en/articles/8793207 308
18 | /faq/account-locked https://support.modrinth.com/en/articles/8793305 308
19 | /faq/2fa https://support.modrinth.com/en/articles/8793322 308
20 | /faq/password-requirements https://support.modrinth.com/en/articles/8793324 308
21 | /faq/auth-methods https://support.modrinth.com/en/articles/8793347 308
22 | /faq/notifications https://support.modrinth.com/en/articles/8793352 308
23 | /faq/review-times https://support.modrinth.com/en/articles/8793355 308
24 | /faq/featured-versions https://support.modrinth.com/en/articles/8793360 308
25 | /faq/additional-files https://support.modrinth.com/en/articles/8793363 308
26 | /faq/version-numbers https://support.modrinth.com/en/articles/8793369 308
27 | /faq/app/power-outage https://support.modrinth.com/en/articles/8797509 308
28 | /faq/app/share https://support.modrinth.com/en/articles/8797522 308
29 | /faq/app/network https://support.modrinth.com/en/articles/8797363 308
30 | /faq/app/unpair https://support.modrinth.com/en/articles/8797558 308
31 | /faq/app/repair https://support.modrinth.com/en/articles/8797637 308
32 | /faq/app/intermediary https://support.modrinth.com/en/articles/8797637 308
33 | /faq/app/file-location https://support.modrinth.com/en/articles/8797641 308
34 | /faq/app/java https://support.modrinth.com/en/articles/8797659 308
35 | /faq/app/32bit-java https://support.modrinth.com/en/articles/8797659 308
36 | /faq/app/duplicate-instances https://support.modrinth.com/en/articles/8797660 308
37 | /faq/app/exclamation-point https://support.modrinth.com/en/articles/8797699 308
38 | /faq/app/unsupported https://support.modrinth.com/en/articles/8797705 308
39 | /faq/app/russia https://support.modrinth.com/en/articles/8797714 308
40 | /faq/app/msa https://support.modrinth.com/en/articles/8797739 308
41 | /faq/app/own-minecraft https://support.modrinth.com/en/articles/8797739 308
42 | /faq/app/underage https://support.modrinth.com/en/articles/8797749 308
43 | /faq/app/invalid-session https://support.modrinth.com/en/articles/8797761 308
44 | /faq/app/webview2 https://support.modrinth.com/en/articles/8797765 308
45 | /faq/app/program-files https://support.modrinth.com/en/articles/8797783 308
46 | /faq/app/catalina https://support.modrinth.com/en/articles/8797807 308
47 | /faq/app/gnome https://support.modrinth.com/en/articles/8797810 308
48 | /faq/app/linux-links https://support.modrinth.com/en/articles/8797813 308
49 | /faq/app/packaging https://support.modrinth.com/en/articles/8797818 308
50 | /docs/modpacks/modpack_permissions/ https://support.modrinth.com/en/articles/8797527 308
51 | /modpacks/permissions https://support.modrinth.com/en/articles/8797527 308
52 | /what https://support.modrinth.com/en/articles/8800818 308
53 | /roadmap https://support.modrinth.com/en/articles/8800954 308
54 | /docs/tutorials/maven/ https://support.modrinth.com/en/articles/8801191 308
55 | /maven https://support.modrinth.com/en/articles/8801191 308
56 | /ads https://support.modrinth.com/en/articles/8801452 308
57 | /docs/details/carbon/ https://support.modrinth.com/en/articles/8801452 308
58 | /docs/details/ads/ https://support.modrinth.com/en/articles/8801452 308
59 | /markdown https://support.modrinth.com/en/articles/8801962 308
60 | /docs/tutorials/markdown/ https://support.modrinth.com/en/articles/8801962 308
61 | /contributing https://support.modrinth.com/en/articles/8802215 308
62 | /docs/details/contributing/ https://support.modrinth.com/en/articles/8802215 308
63 | /modpacks https://support.modrinth.com/en/articles/8802250 308
64 | /modpacks/play https://support.modrinth.com/en/articles/8802250 308
65 | /docs/modpacks/playing_modpacks/ https://support.modrinth.com/en/articles/8802250 308
66 | /docs/modpacks/creating_modpacks/ https://support.modrinth.com/en/articles/8802250 308
67 | /docs/modpacks/creation/ https://support.modrinth.com/en/articles/8802250 308
68 | /modpacks/create https://support.modrinth.com/en/articles/8802250 308
69 | /faq/app/modpack-basics https://support.modrinth.com/en/articles/8802250 308
70 | /modpacks/format https://support.modrinth.com/en/articles/8802351 308
71 | /docs/modpacks/format_definition/ https://support.modrinth.com/en/articles/8802351 308
72 |
73 | /redacted https://www.youtube.com/watch?v=qWNQUvIk954
74 |
75 | /fa* https://support.modrinth.com 308
76 | /docs/* /:splat 308
77 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Creative Commons Legal Code
2 | CC0 1.0 Universal
3 | Official translations of this legal tool are available
4 |
5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
6 |
7 | Statement of Purpose
8 |
9 | The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
10 |
11 | Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
12 |
13 | For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
14 |
15 | 1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
16 |
17 | the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
18 | moral rights retained by the original author(s) and/or performer(s);
19 | publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
20 | rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
21 | rights protecting the extraction, dissemination, use and reuse of data in a Work;
22 | database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
23 | other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
24 |
25 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
26 |
27 | 3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
28 |
29 | 4. Limitations and Disclaimers.
30 |
31 | No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
32 | Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
33 | Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
34 | Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
35 |
--------------------------------------------------------------------------------
/docusaurus.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from '@docusaurus/types'
2 |
3 | const textLogo: string = ``
11 |
12 | const config: Config = {
13 | title: 'Modrinth API Documentation',
14 | url: 'https://docs.modrinth.com',
15 | baseUrl: '/',
16 | trailingSlash: false,
17 | onBrokenLinks: 'throw',
18 | onBrokenMarkdownLinks: 'throw',
19 | favicon: 'img/favicon.ico',
20 | organizationName: 'modrinth',
21 | projectName: 'docs',
22 | themeConfig: {
23 | navbar: {
24 | title: 'modrinth',
25 | logo: {
26 | alt: 'Modrinth Logo',
27 | src: 'img/logo.svg',
28 | },
29 | items: [
30 | {
31 | href: 'https://modrinth.com/',
32 | label: 'Main website',
33 | },
34 | {
35 | href: 'https://support.modrinth.com/',
36 | label: 'Support website',
37 | },
38 | ],
39 | },
40 | footer: {
41 | links: [
42 | {
43 | items: [
44 | {
45 | html: textLogo,
46 | },
47 | {
48 | html: 'Modrinth is open source.'
49 | },
50 | {
51 | html: `modrinth/docs ${process.env.CF_PAGES_BRANCH || 'master'}@${process.env.CF_PAGES_COMMIT_SHA?.substring(0, 7) || 'unknown'}`,
52 | },
53 | {
54 | html: `Public Domain/CC0-1.0 (except Modrinth branding)`,
55 | },
56 | ],
57 | },
58 | {
59 | title: 'Company',
60 | items: [
61 | {
62 | label: 'Terms',
63 | href: 'https://modrinth.com/legal/terms',
64 | },
65 | {
66 | label: 'Privacy',
67 | href: 'https://modrinth.com/legal/privacy',
68 | },
69 | {
70 | label: 'Rules',
71 | href: 'https://modrinth.com/legal/rules',
72 | },
73 | {
74 | label: 'Careers',
75 | href: 'https://careers.modrinth.com',
76 | },
77 | ],
78 | },
79 | {
80 | title: 'Resources',
81 | items: [
82 | {
83 | label: 'Main website',
84 | href: 'https://modrinth.com',
85 | },
86 | {
87 | label: 'Blog',
88 | href: 'https://blog.modrinth.com/subscribe?utm_medium=website&utm_source=footer&utm_campaign=footer',
89 | },
90 | {
91 | label: 'Status',
92 | href: 'https://status.modrinth.com',
93 | },
94 | {
95 | label: 'GitHub',
96 | href: 'https://github.com/modrinth',
97 | },
98 | ],
99 | },
100 | {
101 | title: 'Interact',
102 | items: [
103 | {
104 | label: 'Discord',
105 | href: 'https://discord.modrinth.com',
106 | },
107 | {
108 | label: 'Twitter',
109 | href: 'https://twitter.com/modrinth',
110 | },
111 | {
112 | label: 'Mastodon',
113 | href: 'https://floss.social/@modrinth',
114 | },
115 | {
116 | label: 'Crowdin',
117 | href: 'https://crowdin.com/project/modrinth',
118 | },
119 | ],
120 | },
121 | ],
122 | copyright: `NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG.`,
123 | },
124 | colorMode: {
125 | respectPrefersColorScheme: true,
126 | },
127 | metadata: [
128 | {
129 | name: 'publisher',
130 | content: 'Rinth, Inc.',
131 | },
132 | {
133 | name: 'theme-color',
134 | content: '#1bd96a',
135 | },
136 | {
137 | name: 'twitter:card',
138 | content: 'summary',
139 | },
140 | {
141 | name: 'twitter:site',
142 | content: '@modrinth',
143 | },
144 | ],
145 | image: 'https://cdn.modrinth.com/modrinth-new.png',
146 | },
147 | presets: [
148 | [
149 | '@docusaurus/preset-classic',
150 | {
151 | docs: false,
152 | blog: false,
153 | theme: {
154 | customCss: './src/css/custom.css',
155 | },
156 | },
157 | ],
158 | [
159 | 'redocusaurus',
160 | {
161 | debug: Boolean(process.env.DEBUG || process.env.CI),
162 | specs: [
163 | {
164 | spec: './static/openapi.yaml',
165 | route: '/',
166 | },
167 | ],
168 | theme: {
169 | primaryColor: '#00af5c',
170 | primaryColorDark: '#1bd96a',
171 | options: {
172 | disableSearch: true,
173 | },
174 | },
175 | },
176 | ],
177 | ],
178 | plugins: [
179 | [
180 | "docusaurus-plugin-dotenv",
181 | {
182 | systemvars: true,
183 | },
184 | ],
185 | ],
186 | // ...
187 | headTags: [
188 | {
189 | tagName: 'link',
190 | attributes: {
191 | as: 'style',
192 | rel: 'stylesheet preload prefetch',
193 | href: '/font/font-faces.css',
194 | },
195 | },
196 | ],
197 | }
198 |
199 | // noinspection JSUnusedGlobalSymbols
200 | export default config
--------------------------------------------------------------------------------
/static/openapi.yaml:
--------------------------------------------------------------------------------
1 | openapi: '3.0.0'
2 |
3 | info:
4 | version: v2.7.0/15cf3fc
5 | title: Labrinth
6 | termsOfService: https://modrinth.com/legal/terms
7 | contact:
8 | name: Modrinth Support
9 | url: https://support.modrinth.com
10 | email: support@modrinth.com
11 | description: |
12 | This documentation doesn't provide a way to test our API. In order to facilitate testing, we recommend the following tools:
13 |
14 | - [cURL](https://curl.se/) (recommended, command-line)
15 | - [ReqBIN](https://reqbin.com/) (recommended, online)
16 | - [Postman](https://www.postman.com/downloads/)
17 | - [Insomnia](https://insomnia.rest/)
18 | - Your web browser, if you don't need to send headers or a request body
19 |
20 | Once you have a working client, you can test that it works by making a `GET` request to `https://staging-api.modrinth.com/`:
21 |
22 | ```json
23 | {
24 | "about": "Welcome traveler!",
25 | "documentation": "https://docs.modrinth.com",
26 | "name": "modrinth-labrinth",
27 | "version": "2.7.0"
28 | }
29 | ```
30 |
31 | If you got a response similar to the one above, you can use the Modrinth API!
32 | When you want to go live using the production API, use `api.modrinth.com` instead of `staging-api.modrinth.com`.
33 |
34 | ## Authentication
35 | This API has two options for authentication: personal access tokens and [OAuth2](https://en.wikipedia.org/wiki/OAuth).
36 | All tokens are tied to a Modrinth user and use the `Authorization` header of the request.
37 |
38 | Example:
39 | ```
40 | Authorization: mrp_RNtLRSPmGj2pd1v1ubi52nX7TJJM9sznrmwhAuj511oe4t1jAqAQ3D6Wc8Ic
41 | ```
42 |
43 | You do not need a token for most requests. Generally speaking, only the following types of requests require a token:
44 | - those which create data (such as version creation)
45 | - those which modify data (such as editing a project)
46 | - those which access private data (such as draft projects, notifications, emails, and payout data)
47 |
48 | Each request requiring authentication has a certain scope. For example, to view the email of the user being requested, the token must have the `USER_READ_EMAIL` scope.
49 | You can find the list of available scopes [on GitHub](https://github.com/modrinth/labrinth/blob/master/src/models/v3/pats.rs#L17). Making a request with an invalid scope will return a 401 error.
50 |
51 | Please note that certain scopes and requests cannot be completed with a personal access token or using OAuth.
52 | For example, deleting a user account can only be done through Modrinth's frontend.
53 |
54 | ### OAuth2
55 | Applications interacting with the authenticated API should create an OAuth2 application.
56 | You can do this in [the developer settings](https://modrinth.com/settings/applications).
57 |
58 | Once you have created a client, use the following URL to have a user authorize your client:
59 | ```
60 | https://modrinth.com/auth/authorize?client_id=&redirect_uri=&scope=++
61 | ```
62 |
63 | Then, use the following URL to get the token:
64 | ```
65 | https://api.modrinth.com/_internal/oauth/token
66 | ```
67 |
68 | This route will be changed in the future to move the `_internal` part to `v3`.
69 |
70 | ### Personal access tokens
71 | Personal access tokens (PATs) can be generated in from [the user settings](https://modrinth.com/settings/account).
72 |
73 | ### GitHub tokens
74 | For backwards compatibility purposes, some types of GitHub tokens also work for authenticating a user with Modrinth's API, granting all scopes.
75 | **We urge any application still using GitHub tokens to start using personal access tokens for security and reliability purposes.**
76 | GitHub tokens will cease to function to authenticate with Modrinth's API as soon as version 3 of the API is made generally available.
77 |
78 | ## Cross-Origin Resource Sharing
79 | This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with the [W3C spec](https://www.w3.org/TR/cors/).
80 | This allows for cross-domain communication from the browser.
81 | All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
82 |
83 | ## Identifiers
84 | The majority of items you can interact with in the API have a unique eight-digit base62 ID.
85 | Projects, versions, users, threads, teams, and reports all use this same way of identifying themselves.
86 | Version files use the sha1 or sha512 file hashes as identifiers.
87 |
88 | Each project and user has a friendlier way of identifying them; slugs and usernames, respectively.
89 | While unique IDs are constant, slugs and usernames can change at any moment.
90 | If you want to store something in the long term, it is recommended to use the unique ID.
91 |
92 | ## Ratelimits
93 | The API has a ratelimit defined per IP. Limits and remaining amounts are given in the response headers.
94 | - `X-Ratelimit-Limit`: the maximum number of requests that can be made in a minute
95 | - `X-Ratelimit-Remaining`: the number of requests remaining in the current ratelimit window
96 | - `X-Ratelimit-Reset`: the time in seconds until the ratelimit window resets
97 |
98 | Ratelimits are the same no matter whether you use a token or not.
99 | The ratelimit is currently 300 requests per minute. If you have a use case requiring a higher limit, please [contact us](mailto:admin@modrinth.com).
100 |
101 | ## User Agents
102 | To access the Modrinth API, you **must** use provide a uniquely-identifying `User-Agent` header.
103 | Providing a user agent that only identifies your HTTP client library (such as "okhttp/4.9.3") increases the likelihood that we will block your traffic.
104 | It is recommended, but not required, to include contact information in your user agent.
105 | This allows us to contact you if we would like a change in your application's behavior without having to block your traffic.
106 | - Bad: `User-Agent: okhttp/4.9.3`
107 | - Good: `User-Agent: project_name`
108 | - Better: `User-Agent: github_username/project_name/1.56.0`
109 | - Best: `User-Agent: github_username/project_name/1.56.0 (launcher.com)` or `User-Agent: github_username/project_name/1.56.0 (contact@launcher.com)`
110 |
111 | ## Versioning
112 | Modrinth follows a simple pattern for its API versioning.
113 | In the event of a breaking API change, the API version in the URL path is bumped, and migration steps will be published below.
114 |
115 | When an API is no longer the current one, it will immediately be considered deprecated.
116 | No more support will be provided for API versions older than the current one.
117 | It will be kept for some time, but this amount of time is not certain.
118 |
119 | We will exercise various tactics to get people to update their implementation of our API.
120 | One example is by adding something like `STOP USING THIS API` to various data returned by the API.
121 |
122 | Once an API version is completely deprecated, it will permanently return a 410 error.
123 | Please ensure your application handles these 410 errors.
124 |
125 | ### Migrations
126 | Inside the following spoiler, you will be able to find all changes between versions of the Modrinth API, accompanied by tips and a guide to migrate applications to newer versions.
127 |
128 | Here, you can also find changes for [Minotaur](https://github.com/modrinth/minotaur), Modrinth's official Gradle plugin. Major versions of Minotaur directly correspond to major versions of the Modrinth API.
129 |
130 | API v1 to API v2
131 |
132 | These bullet points cover most changes in the v2 API, but please note that fields containing `mod` in most contexts have been shifted to `project`. For example, in the search route, the field `mod_id` was renamed to `project_id`.
133 |
134 | - The search route has been moved from `/api/v1/mod` to `/v2/search`
135 | - New project fields: `project_type` (may be `mod` or `modpack`), `moderation_message` (which has a `message` and `body`), `gallery`
136 | - New search facet: `project_type`
137 | - Alphabetical sort removed (it didn't work and is not possible due to limits in MeiliSearch)
138 | - New search fields: `project_type`, `gallery`
139 | - The gallery field is an array of URLs to images that are part of the project's gallery
140 | - The gallery is a new feature which allows the user to upload images showcasing their mod to the CDN which will be displayed on their mod page
141 | - Internal change: Any project file uploaded to Modrinth is now validated to make sure it's a valid Minecraft mod, Modpack, etc.
142 | - For example, a Forge 1.17 mod with a JAR not containing a mods.toml will not be allowed to be uploaded to Modrinth
143 | - In project creation, projects may not upload a mod with no versions to review, however they can be saved as a draft
144 | - Similarly, for version creation, a version may not be uploaded without any files
145 | - Donation URLs have been enabled
146 | - New project status: `archived`. Projects with this status do not appear in search
147 | - Tags (such as categories, loaders) now have icons (SVGs) and specific project types attached
148 | - Dependencies have been wiped and replaced with a new system
149 | - Notifications now have a `type` field, such as `project_update`
150 |
151 | Along with this, project subroutes (such as `/v2/project/{id}/version`) now allow the slug to be used as the ID. This is also the case with user routes.
152 |
153 | Minotaur v1 to Minotaur v2
154 |
155 | Minotaur 2.x introduced a few breaking changes to how your buildscript is formatted.
156 |
157 | First, instead of registering your own `publishModrinth` task, Minotaur now automatically creates a `modrinth` task. As such, you can replace the `task publishModrinth(type: TaskModrinthUpload) {` line with just `modrinth {`.
158 |
159 | To declare supported Minecraft versions and mod loaders, the `gameVersions` and `loaders` arrays must now be used. The syntax for these are pretty self-explanatory.
160 |
161 | Instead of using `releaseType`, you must now use `versionType`. This was actually changed in v1.2.0, but very few buildscripts have moved on from v1.1.0.
162 |
163 | Dependencies have been changed to a special DSL. Create a `dependencies` block within the `modrinth` block, and then use `scope.type("project/version")`. For example, `required.project("fabric-api")` adds a required project dependency on Fabric API.
164 |
165 | You may now use the slug anywhere that a project ID was previously required.
166 |
167 |
168 |
169 | # The above snippet about User Agents was adapted from https://crates.io/policies, copyright (c) 2014 The Rust Project Developers under MIT license
170 |
171 | servers:
172 | - url: https://api.modrinth.com/v2
173 | description: Production server
174 | - url: https://staging-api.modrinth.com/v2
175 | description: Staging server
176 |
177 | components:
178 | parameters:
179 | ProjectIdentifier:
180 | name: id|slug
181 | in: path
182 | required: true
183 | description: The ID or slug of the project
184 | schema:
185 | type: string
186 | example: [AABBCCDD, my_project]
187 | MultipleProjectIdentifier:
188 | in: query
189 | name: ids
190 | description: The IDs and/or slugs of the projects
191 | schema:
192 | type: string
193 | example: "[\"AABBCCDD\", \"EEFFGGHH\"]"
194 | required: true
195 | UserIdentifier:
196 | name: id|username
197 | in: path
198 | required: true
199 | description: The ID or username of the user
200 | schema:
201 | type: string
202 | example: [EEFFGGHH, my_user]
203 | VersionIdentifier:
204 | name: id
205 | in: path
206 | required: true
207 | description: The ID of the version
208 | schema:
209 | type: string
210 | example: [IIJJKKLL]
211 | TeamIdentifier:
212 | name: id
213 | in: path
214 | required: true
215 | description: The ID of the team
216 | schema:
217 | type: string
218 | example: [MMNNOOPP]
219 | ReportIdentifier:
220 | name: id
221 | in: path
222 | required: true
223 | description: The ID of the report
224 | schema:
225 | type: string
226 | example: [RRSSTTUU]
227 | ThreadIdentifier:
228 | name: id
229 | in: path
230 | required: true
231 | description: The ID of the thread
232 | schema:
233 | type: string
234 | example: [QQRRSSTT]
235 | NotificationIdentifier:
236 | name: id
237 | in: path
238 | required: true
239 | description: The ID of the notification
240 | schema:
241 | type: string
242 | example: [NNOOPPQQ]
243 | AlgorithmIdentifier:
244 | name: algorithm
245 | in: query
246 | required: true
247 | description: The algorithm of the hash
248 | schema:
249 | type: string
250 | enum: [sha1, sha512]
251 | example: sha512
252 | default: sha1
253 | MultipleHashQueryIdentifier:
254 | name: multiple
255 | in: query
256 | required: false
257 | description: Whether to return multiple results when looking for this hash
258 | schema:
259 | type: boolean
260 | default: false
261 | FileHashIdentifier:
262 | name: hash
263 | in: path
264 | required: true
265 | description: The hash of the file, considering its byte content, and encoded in hexadecimal
266 | schema:
267 | type: string
268 | example: 619e250c133106bacc3e3b560839bd4b324dfda8
269 | requestBodies:
270 | Image:
271 | content:
272 | image/png:
273 | schema:
274 | type: string
275 | format: binary
276 | image/jpeg:
277 | schema:
278 | type: string
279 | format: binary
280 | image/bmp:
281 | schema:
282 | type: string
283 | format: binary
284 | image/gif:
285 | schema:
286 | type: string
287 | format: binary
288 | image/webp:
289 | schema:
290 | type: string
291 | format: binary
292 | image/svg:
293 | schema:
294 | type: string
295 | format: binary
296 | image/svgz:
297 | schema:
298 | type: string
299 | format: binary
300 | image/rgb:
301 | schema:
302 | type: string
303 | format: binary
304 | schemas:
305 | # Version
306 | BaseVersion:
307 | type: object
308 | properties:
309 | name:
310 | type: string
311 | description: The name of this version
312 | example: "Version 1.0.0"
313 | version_number:
314 | type: string
315 | description: "The version number. Ideally will follow semantic versioning"
316 | example: "1.0.0"
317 | changelog:
318 | type: string
319 | description: "The changelog for this version"
320 | example: "List of changes in this version: ..."
321 | nullable: true
322 | dependencies:
323 | type: array
324 | items:
325 | $ref: "#/components/schemas/VersionDependency"
326 | description: A list of specific versions of projects that this version depends on
327 | game_versions:
328 | type: array
329 | items:
330 | type: string
331 | description: A list of versions of Minecraft that this version supports
332 | example: ["1.16.5", "1.17.1"]
333 | version_type:
334 | type: string
335 | description: The release channel for this version
336 | enum: [release, beta, alpha]
337 | example: release
338 | loaders:
339 | type: array
340 | items:
341 | type: string
342 | description: The mod loaders that this version supports
343 | example: ["fabric", "forge"]
344 | featured:
345 | type: boolean
346 | description: Whether the version is featured or not
347 | example: true
348 | status:
349 | type: string
350 | enum: [listed, archived, draft, unlisted, scheduled, unknown]
351 | example: listed
352 | requested_status:
353 | type: string
354 | enum: [listed, archived, draft, unlisted]
355 | nullable: true
356 | VersionDependency:
357 | type: object
358 | properties:
359 | version_id:
360 | type: string
361 | description: The ID of the version that this version depends on
362 | example: IIJJKKLL
363 | nullable: true
364 | project_id:
365 | type: string
366 | description: The ID of the project that this version depends on
367 | example: QQRRSSTT
368 | nullable: true
369 | file_name:
370 | type: string
371 | description: The file name of the dependency, mostly used for showing external dependencies on modpacks
372 | example: sodium-fabric-mc1.19-0.4.2+build.16.jar
373 | nullable: true
374 | dependency_type:
375 | type: string
376 | enum: [ required, optional, incompatible, embedded ]
377 | description: The type of dependency that this version has
378 | example: required
379 | required:
380 | - dependency_type
381 |
382 | # https://github.com/modrinth/labrinth/blob/master/src/routes/versions.rs#L169-L190
383 | EditableVersion:
384 | allOf:
385 | - $ref: '#/components/schemas/BaseVersion'
386 | - type: object
387 | properties:
388 | primary_file:
389 | type: array
390 | items:
391 | type: string
392 | example: [sha1, aaaabbbbccccddddeeeeffffgggghhhhiiiijjjj]
393 | description: The hash format and the hash of the new primary file
394 | file_types:
395 | type: array
396 | items:
397 | $ref: '#/components/schemas/EditableFileType'
398 | description: A list of file_types to edit
399 | EditableFileType:
400 | type: object
401 | properties:
402 | algorithm:
403 | type: string
404 | description: The hash algorithm of the hash specified in the hash field
405 | example: sha1
406 | hash:
407 | type: string
408 | description: The hash of the file you're editing
409 | example: aaaabbbbccccddddeeeeffffgggghhhhiiiijjjj
410 | file_type:
411 | type: string
412 | enum: [ required-resource-pack, optional-resource-pack ]
413 | description: The hash algorithm of the file you're editing
414 | example: required-resource-pack
415 | nullable: true
416 | required:
417 | - algorithm
418 | - hash
419 | - file_type
420 | # https://github.com/modrinth/labrinth/blob/master/src/routes/version_creation.rs#L27-L57
421 | CreatableVersion:
422 | allOf:
423 | - $ref: '#/components/schemas/BaseVersion'
424 | - type: object
425 | properties:
426 | project_id:
427 | type: string
428 | description: The ID of the project this version is for
429 | example: AABBCCDD
430 | file_parts:
431 | type: array
432 | items:
433 | type: string
434 | description: An array of the multipart field names of each file that goes with this version
435 | primary_file:
436 | type: string
437 | description: The multipart field name of the primary file
438 | required:
439 | - file_parts
440 | - project_id
441 | - name
442 | - version_number
443 | - game_versions
444 | - version_type
445 | - loaders
446 | - featured
447 | - dependencies
448 | CreateVersionBody:
449 | type: object
450 | properties:
451 | data:
452 | $ref: '#/components/schemas/CreatableVersion'
453 | required: [ data ]
454 | Version:
455 | allOf:
456 | - $ref: '#/components/schemas/BaseVersion'
457 | - type: object
458 | properties:
459 | id:
460 | type: string
461 | description: The ID of the version, encoded as a base62 string
462 | example: IIJJKKLL
463 | project_id:
464 | type: string
465 | description: The ID of the project this version is for
466 | example: AABBCCDD
467 | author_id:
468 | type: string
469 | description: The ID of the author who published this version
470 | example: EEFFGGHH
471 | date_published:
472 | type: string
473 | format: ISO-8601
474 | downloads:
475 | type: integer
476 | description: The number of times this version has been downloaded
477 | changelog_url:
478 | type: string
479 | description: A link to the changelog for this version. Always null, only kept for legacy compatibility.
480 | deprecated: true
481 | example: null
482 | nullable: true
483 | files:
484 | type: array
485 | items:
486 | $ref: '#/components/schemas/VersionFile'
487 | description: A list of files available for download for this version
488 | required:
489 | - id
490 | - project_id
491 | - author_id
492 | - date_published
493 | - downloads
494 | - files
495 | - name
496 | - version_number
497 | - game_versions
498 | - version_type
499 | - loaders
500 | - featured
501 | VersionFile:
502 | type: object
503 | properties:
504 | hashes:
505 | $ref: '#/components/schemas/VersionFileHashes'
506 | url:
507 | type: string
508 | example: "https://cdn.modrinth.com/data/AABBCCDD/versions/1.0.0/my_file.jar"
509 | description: A direct link to the file
510 | filename:
511 | type: string
512 | example: "my_file.jar"
513 | description: The name of the file
514 | primary:
515 | type: boolean
516 | example: false
517 | description: 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.
518 | size:
519 | type: integer
520 | example: 1097270
521 | description: The size of the file in bytes
522 | file_type:
523 | type: string
524 | enum: [ required-resource-pack, optional-resource-pack ]
525 | description: The type of the additional file, used mainly for adding resource packs to datapacks
526 | example: required-resource-pack
527 | nullable: true
528 | required:
529 | - hashes
530 | - url
531 | - filename
532 | - primary
533 | - size
534 | VersionFileHashes:
535 | type: object
536 | properties:
537 | sha512:
538 | type: string
539 | example: 93ecf5fe02914fb53d94aa3d28c1fb562e23985f8e4d48b9038422798618761fe208a31ca9b723667a4e05de0d91a3f86bcd8d018f6a686c39550e21b198d96f
540 | sha1:
541 | type: string
542 | example: c84dd4b3580c02b79958a0590afd5783d80ef504
543 | description: A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash.
544 | GetLatestVersionFromHashBody:
545 | type: object
546 | properties:
547 | loaders:
548 | type: array
549 | items:
550 | type: string
551 | example: [ fabric ]
552 | game_versions:
553 | type: array
554 | items:
555 | type: string
556 | example: [ "1.18", 1.18.1 ]
557 | required:
558 | - loaders
559 | - game_versions
560 | HashVersionMap:
561 | description: "A map from hashes to versions"
562 | type: object
563 | additionalProperties:
564 | $ref: '#/components/schemas/Version'
565 | HashList:
566 | description: "A list of hashes and the algorithm used to create them"
567 | type: object
568 | properties:
569 | hashes:
570 | type: array
571 | items:
572 | type: string
573 | example: [ ea0f38408102e4d2efd53c2cc11b88b711996b48d8922f76ea6abf731219c5bd1efe39ddf9cce77c54d49a62ff10fb685c00d2e4c524ab99d20f6296677ab2c4, 925a5c4899affa4098d997dfa4a4cb52c636d539e94bc489d1fa034218cb96819a70eb8b01647a39316a59fcfe223c1a8c05ed2e2ae5f4c1e75fa48f6af1c960 ]
574 | algorithm:
575 | type: string
576 | enum: [ sha1, sha512 ]
577 | example: sha512
578 | required:
579 | - hashes
580 | - algorithm
581 | GetLatestVersionsFromHashesBody:
582 | allOf:
583 | - $ref: '#/components/schemas/HashList'
584 | - type: object
585 | properties:
586 | loaders:
587 | type: array
588 | items:
589 | type: string
590 | example: [ fabric ]
591 | game_versions:
592 | type: array
593 | items:
594 | type: string
595 | example: [ "1.18", 1.18.1 ]
596 | required:
597 | - loaders
598 | - game_versions
599 | # Project
600 | # Fields that can be used in everything. Search, direct project lookup, project editing, you name it.
601 | BaseProject:
602 | type: object
603 | properties:
604 | slug:
605 | type: string
606 | description: "The slug of a project, used for vanity URLs. Regex: ```^[\\w!@$()`.+,\"\\-']{3,64}$```"
607 | example: my_project
608 | title:
609 | type: string
610 | description: The title or name of the project
611 | example: My Project
612 | description:
613 | type: string
614 | description: A short description of the project
615 | example: A short description
616 | categories:
617 | type: array
618 | items:
619 | type: string
620 | example: [technology, adventure, fabric]
621 | description: A list of the categories that the project has
622 | client_side:
623 | type: string
624 | enum: [required, optional, unsupported, unknown]
625 | description: The client side support of the project
626 | example: required
627 | server_side:
628 | type: string
629 | enum: [required, optional, unsupported, unknown]
630 | description: The server side support of the project
631 | example: optional
632 | # Fields added to search results and direct project lookups that cannot be edited.
633 | ServerRenderedProject:
634 | allOf:
635 | - $ref: '#/components/schemas/BaseProject'
636 | - type: object
637 | properties:
638 | project_type:
639 | type: string
640 | enum: [mod, modpack, resourcepack, shader]
641 | description: The project type of the project
642 | example: mod
643 | downloads:
644 | type: integer
645 | description: The total number of downloads of the project
646 | icon_url:
647 | type: string
648 | example: https://cdn.modrinth.com/data/AABBCCDD/b46513nd83hb4792a9a0e1fn28fgi6090c1842639.png
649 | description: The URL of the project's icon
650 | nullable: true
651 | color:
652 | type: integer
653 | example: 8703084
654 | description: The RGB color of the project, automatically generated from the project icon
655 | nullable: true
656 | thread_id:
657 | type: string
658 | example: TTUUVVWW
659 | description: The ID of the moderation thread associated with this project
660 | monetization_status:
661 | type: string
662 | enum: [monetized, demonetized, force-demonetized]
663 | required:
664 | - project_type
665 | - downloads
666 | # The actual result in search.
667 | ProjectResult:
668 | allOf:
669 | - $ref: '#/components/schemas/ServerRenderedProject'
670 | - type: object
671 | properties:
672 | project_id:
673 | type: string
674 | description: The ID of the project
675 | example: AABBCCDD
676 | author:
677 | type: string
678 | description: The username of the project's author
679 | example: my_user
680 | display_categories:
681 | type: array
682 | items:
683 | type: string
684 | description: A list of the categories that the project has which are not secondary
685 | example: ["technology", "fabric"]
686 | versions:
687 | type: array
688 | items:
689 | type: string
690 | description: A list of the minecraft versions supported by the project
691 | example: ["1.8", "1.8.9"]
692 | follows:
693 | type: integer
694 | description: The total number of users following the project
695 | date_created:
696 | type: string
697 | format: ISO-8601
698 | description: The date the project was added to search
699 | date_modified:
700 | type: string
701 | format: ISO-8601
702 | description: The date the project was last modified
703 | latest_version:
704 | type: string
705 | description: The latest version of minecraft that this project supports
706 | example: 1.8.9
707 | license:
708 | type: string
709 | description: The SPDX license ID of a project
710 | example: MIT
711 | gallery:
712 | type: array
713 | description: All gallery images attached to the project
714 | example: [https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png, https://cdn.modrinth.com/data/AABBCCDD/images/c21776867afb6046fdc3c21dbcf5cc50ae27a236.png]
715 | items:
716 | type: string
717 | featured_gallery:
718 | type: string
719 | description: The featured gallery image of the project
720 | nullable: true
721 | required:
722 | - slug
723 | - title
724 | - description
725 | - client_side
726 | - server_side
727 | - project_id
728 | - author
729 | - versions
730 | - follows
731 | - date_created
732 | - date_modified
733 | - license
734 | # Fields that appear everywhere EXCEPT search.
735 | NonSearchProject:
736 | allOf:
737 | - $ref: '#/components/schemas/BaseProject'
738 | - type: object
739 | properties:
740 | body:
741 | type: string
742 | description: A long form description of the project
743 | example: A long body describing my project in detail
744 | status:
745 | type: string
746 | enum: [approved, archived, rejected, draft, unlisted, processing, withheld, scheduled, private, unknown]
747 | description: The status of the project
748 | example: approved
749 | requested_status:
750 | type: string
751 | enum: [approved, archived, unlisted, private, draft]
752 | description: The requested status when submitting for review or scheduling the project for release
753 | nullable: true
754 | additional_categories:
755 | type: array
756 | items:
757 | type: string
758 | description: A list of categories which are searchable but non-primary
759 | example: [technology, adventure, fabric]
760 | issues_url:
761 | type: string
762 | description: An optional link to where to submit bugs or issues with the project
763 | example: https://github.com/my_user/my_project/issues
764 | nullable: true
765 | source_url:
766 | type: string
767 | description: An optional link to the source code of the project
768 | example: https://github.com/my_user/my_project
769 | nullable: true
770 | wiki_url:
771 | type: string
772 | description: An optional link to the project's wiki page or other relevant information
773 | example: https://github.com/my_user/my_project/wiki
774 | nullable: true
775 | discord_url:
776 | type: string
777 | description: An optional invite link to the project's discord
778 | example: https://discord.gg/AaBbCcDd
779 | nullable: true
780 | donation_urls:
781 | type: array
782 | items:
783 | $ref: '#/components/schemas/ProjectDonationURL'
784 | description: A list of donation links for the project
785 | ProjectDonationURL:
786 | type: object
787 | properties:
788 | id:
789 | type: string
790 | description: The ID of the donation platform
791 | example: patreon
792 | platform:
793 | type: string
794 | description: The donation platform this link is to
795 | example: Patreon
796 | url:
797 | type: string
798 | description: The URL of the donation platform and user
799 | example: https://www.patreon.com/my_user
800 | # Fields available only when editing or creating a project
801 | ModifiableProject:
802 | allOf:
803 | - $ref: '#/components/schemas/NonSearchProject'
804 | - type: object
805 | properties:
806 | license_id:
807 | type: string
808 | description: The SPDX license ID of a project
809 | example: LGPL-3.0-or-later
810 | license_url:
811 | type: string
812 | description: The URL to this license
813 | nullable: true
814 | # Fields that can be edited through a PATCH request. https://github.com/modrinth/labrinth/blob/master/src/routes/projects.rs#L195-L269
815 | EditableProject:
816 | allOf:
817 | - $ref: '#/components/schemas/ModifiableProject'
818 | - type: object
819 | properties:
820 | moderation_message:
821 | type: string
822 | description: The title of the moderators' message for the project
823 | nullable: true
824 | moderation_message_body:
825 | type: string
826 | description: The body of the moderators' message for the project
827 | nullable: true
828 | # Fields only available for project creation. https://github.com/modrinth/labrinth/blob/master/src/routes/project_creation.rs#L129-L197
829 | CreatableProject:
830 | allOf:
831 | - $ref: '#/components/schemas/ModifiableProject'
832 | - type: object
833 | properties:
834 | project_type:
835 | type: string
836 | enum: [mod, modpack]
837 | example: modpack
838 | initial_versions:
839 | type: array
840 | items:
841 | $ref: '#/components/schemas/EditableVersion'
842 | description: A list of initial versions to upload with the created project. Deprecated - please upload version files after initial upload.
843 | deprecated: true
844 | is_draft:
845 | type: boolean
846 | description: Whether the project should be saved as a draft instead of being sent to moderation for review. Deprecated - please always mark this as true.
847 | example: true
848 | deprecated: true
849 | gallery_items:
850 | type: array
851 | description: Gallery images to be uploaded with the created project. Deprecated - please upload gallery images after initial upload.
852 | deprecated: true
853 | items:
854 | $ref: '#/components/schemas/CreatableProjectGalleryItem'
855 | required:
856 | - project_type
857 | - slug
858 | - title
859 | - description
860 | - body
861 | - categories
862 | - client_side
863 | - server_side
864 | - license_id
865 | CreatableProjectGalleryItem:
866 | type: object
867 | nullable: true
868 | properties:
869 | item:
870 | type: string
871 | description: The name of the multipart item where the gallery media is located
872 | featured:
873 | type: boolean
874 | description: Whether the image is featured in the gallery
875 | example: true
876 | title:
877 | type: string
878 | description: The title of the gallery image
879 | example: My awesome screenshot!
880 | nullable: true
881 | description:
882 | type: string
883 | description: The description of the gallery image
884 | example: This awesome screenshot shows all of the blocks in my mod!
885 | nullable: true
886 | ordering:
887 | type: integer
888 | description: The order of the gallery image. Gallery images are sorted by this field and then alphabetically by title.
889 | example: 0
890 | Project:
891 | allOf:
892 | - $ref: '#/components/schemas/NonSearchProject'
893 | - $ref: '#/components/schemas/ServerRenderedProject'
894 | - type: object
895 | properties:
896 | id:
897 | type: string
898 | example: AABBCCDD
899 | description: The ID of the project, encoded as a base62 string
900 | team:
901 | type: string
902 | example: MMNNOOPP
903 | description: The ID of the team that has ownership of this project
904 | body_url:
905 | type: string
906 | deprecated: true
907 | default: null
908 | description: The link to the long description of the project. Always null, only kept for legacy compatibility.
909 | example: null
910 | nullable: true
911 | moderator_message:
912 | $ref: '#/components/schemas/ModeratorMessage'
913 | published:
914 | type: string
915 | format: ISO-8601
916 | description: The date the project was published
917 | updated:
918 | type: string
919 | format: ISO-8601
920 | description: The date the project was last updated
921 | approved:
922 | type: string
923 | format: ISO-8601
924 | description: The date the project's status was set to an approved status
925 | nullable: true
926 | queued:
927 | type: string
928 | format: ISO-8601
929 | description: The date the project's status was submitted to moderators for review
930 | nullable: true
931 | followers:
932 | type: integer
933 | description: The total number of users following the project
934 | license:
935 | $ref: '#/components/schemas/ProjectLicense'
936 | versions:
937 | type: array
938 | items:
939 | type: string
940 | example: [IIJJKKLL, QQRRSSTT]
941 | description: A list of the version IDs of the project (will never be empty unless `draft` status)
942 | game_versions:
943 | type: array
944 | items:
945 | type: string
946 | example: ["1.19", "1.19.1", "1.19.2", "1.19.3"]
947 | description: A list of all of the game versions supported by the project
948 | loaders:
949 | type: array
950 | items:
951 | type: string
952 | example: ["forge", "fabric", "quilt"]
953 | description: A list of all of the loaders supported by the project
954 | gallery:
955 | type: array
956 | items:
957 | $ref: '#/components/schemas/GalleryImage'
958 | description: A list of images that have been uploaded to the project's gallery
959 | required:
960 | - id
961 | - team
962 | - published
963 | - updated
964 | - followers
965 | - title
966 | - description
967 | - categories
968 | - client_side
969 | - server_side
970 | - slug
971 | - body
972 | - status
973 | ModeratorMessage:
974 | deprecated: true
975 | type: object
976 | properties:
977 | message:
978 | type: string
979 | description: The message that a moderator has left for the project
980 | body:
981 | type: string
982 | description: The longer body of the message that a moderator has left for the project
983 | nullable: true
984 | nullable: true
985 | example: null
986 | description: A message that a moderator sent regarding the project
987 | ProjectLicense:
988 | type: object
989 | properties:
990 | id:
991 | type: string
992 | description: The SPDX license ID of a project
993 | example: LGPL-3.0-or-later
994 | name:
995 | type: string
996 | description: The long name of a license
997 | example: GNU Lesser General Public License v3 or later
998 | url:
999 | type: string
1000 | description: The URL to this license
1001 | nullable: true
1002 | description: The license of the project
1003 | GalleryImage:
1004 | type: object
1005 | nullable: true
1006 | properties:
1007 | url:
1008 | type: string
1009 | description: The URL of the gallery image
1010 | example: https://cdn.modrinth.com/data/AABBCCDD/images/009b7d8d6e8bf04968a29421117c59b3efe2351a.png
1011 | featured:
1012 | type: boolean
1013 | description: Whether the image is featured in the gallery
1014 | example: true
1015 | title:
1016 | type: string
1017 | description: The title of the gallery image
1018 | example: My awesome screenshot!
1019 | nullable: true
1020 | description:
1021 | type: string
1022 | description: The description of the gallery image
1023 | example: This awesome screenshot shows all of the blocks in my mod!
1024 | nullable: true
1025 | created:
1026 | type: string
1027 | format: ISO-8601
1028 | description: The date and time the gallery image was created
1029 | ordering:
1030 | type: integer
1031 | description: The order of the gallery image. Gallery images are sorted by this field and then alphabetically by title.
1032 | example: 0
1033 | required:
1034 | - url
1035 | - featured
1036 | - created
1037 | ProjectDependencyList:
1038 | type: object
1039 | properties:
1040 | projects:
1041 | type: array
1042 | items:
1043 | $ref: '#/components/schemas/Project'
1044 | description: Projects that the project depends upon
1045 | versions:
1046 | type: array
1047 | items:
1048 | $ref: '#/components/schemas/Version'
1049 | description: Versions that the project depends upon
1050 | PatchProjectsBody:
1051 | type: object
1052 | properties:
1053 | categories:
1054 | description: Set all of the categories to the categories specified here
1055 | type: array
1056 | items:
1057 | type: string
1058 | add_categories:
1059 | description: Add all of the categories specified here
1060 | type: array
1061 | items:
1062 | type: string
1063 | remove_categories:
1064 | description: Remove all of the categories specified here
1065 | type: array
1066 | items:
1067 | type: string
1068 | additional_categories:
1069 | description: Set all of the additional categories to the categories specified here
1070 | type: array
1071 | items:
1072 | type: string
1073 | add_additional_categories:
1074 | description: Add all of the additional categories specified here
1075 | type: array
1076 | items:
1077 | type: string
1078 | remove_additional_categories:
1079 | description: Remove all of the additional categories specified here
1080 | type: array
1081 | items:
1082 | type: string
1083 | donation_urls:
1084 | description: Set all of the donation links to the donation links specified here
1085 | type: array
1086 | items:
1087 | $ref: '#/components/schemas/ProjectDonationURL'
1088 | add_donation_urls:
1089 | description: Add all of the donation links specified here
1090 | type: array
1091 | items:
1092 | $ref: '#/components/schemas/ProjectDonationURL'
1093 | remove_donation_urls:
1094 | description: Remove all of the donation links specified here
1095 | type: array
1096 | items:
1097 | $ref: '#/components/schemas/ProjectDonationURL'
1098 | issues_url:
1099 | type: string
1100 | description: An optional link to where to submit bugs or issues with the projects
1101 | example: https://github.com/my_user/my_project/issues
1102 | nullable: true
1103 | source_url:
1104 | type: string
1105 | description: An optional link to the source code of the projects
1106 | example: https://github.com/my_user/my_project
1107 | nullable: true
1108 | wiki_url:
1109 | type: string
1110 | description: An optional link to the projects' wiki page or other relevant information
1111 | example: https://github.com/my_user/my_project/wiki
1112 | nullable: true
1113 | discord_url:
1114 | type: string
1115 | description: An optional invite link to the projects' discord
1116 | example: https://discord.gg/AaBbCcDd
1117 | nullable: true
1118 | CreateProjectBody:
1119 | type: object
1120 | properties:
1121 | data:
1122 | $ref: '#/components/schemas/CreatableProject'
1123 | icon:
1124 | type: string
1125 | format: binary
1126 | enum: [ "*.png", "*.jpg", "*.jpeg", "*.bmp", "*.gif", "*.webp", "*.svg", "*.svgz", "*.rgb" ]
1127 | description: Project icon file
1128 | required: [ data ]
1129 | ProjectIdentifier:
1130 | type: object
1131 | properties:
1132 | id:
1133 | type: string
1134 | example: AABBCCDD
1135 | Schedule:
1136 | type: object
1137 | properties:
1138 | time:
1139 | type: string
1140 | format: ISO-8601
1141 | example: "2023-02-05T19:39:55.551839Z"
1142 | requested_status:
1143 | type: string
1144 | enum: [ approved, archived, unlisted, private, draft ]
1145 | description: The requested status when scheduling the project for release
1146 | required:
1147 | - time
1148 | - requested_status
1149 | # Search
1150 | SearchResults:
1151 | type: object
1152 | properties:
1153 | hits:
1154 | type: array
1155 | items:
1156 | $ref: '#/components/schemas/ProjectResult'
1157 | description: The list of results
1158 | offset:
1159 | type: integer
1160 | description: The number of results that were skipped by the query
1161 | example: 0
1162 | limit:
1163 | type: integer
1164 | description: The number of results that were returned by the query
1165 | example: 10
1166 | total_hits:
1167 | type: integer
1168 | description: The total number of results that match the query
1169 | example: 10
1170 | required:
1171 | - hits
1172 | - offset
1173 | - limit
1174 | - total_hits
1175 | # User
1176 | UserIdentifier:
1177 | properties:
1178 | user_id:
1179 | type: string
1180 | example: EEFFGGHH
1181 | required:
1182 | - user_id
1183 | EditableUser:
1184 | type: object
1185 | properties:
1186 | username:
1187 | type: string
1188 | description: The user's username
1189 | example: my_user
1190 | name:
1191 | type: string
1192 | example: My User
1193 | description: The user's display name
1194 | nullable: true
1195 | email:
1196 | type: string
1197 | format: email
1198 | description: The user's email (only displayed if requesting your own account). Requires `USER_READ_EMAIL` PAT scope.
1199 | nullable: true
1200 | bio:
1201 | type: string
1202 | example: My short biography
1203 | description: A description of the user
1204 | payout_data:
1205 | $ref: '#/components/schemas/UserPayoutData'
1206 | required:
1207 | - username
1208 | UserPayoutData:
1209 | type: object
1210 | description: Various data relating to the user's payouts status (you can only see your own)
1211 | nullable: true
1212 | properties:
1213 | balance:
1214 | type: integer
1215 | description: The payout balance available for the user to withdraw (note, you cannot modify this in a PATCH request)
1216 | example: 10.11223344556677889900
1217 | payout_wallet:
1218 | type: string
1219 | enum: [ paypal, venmo ]
1220 | description: The wallet that the user has selected
1221 | example: paypal
1222 | payout_wallet_type:
1223 | type: string
1224 | enum: [ email, phone, user_handle ]
1225 | description: The type of the user's wallet
1226 | example: email
1227 | payout_address:
1228 | type: string
1229 | description: The user's payout address
1230 | example: support@modrinth.com
1231 | User:
1232 | allOf:
1233 | - $ref: '#/components/schemas/EditableUser'
1234 | - type: object
1235 | properties:
1236 | id:
1237 | type: string
1238 | example: EEFFGGHH
1239 | description: The user's ID
1240 | avatar_url:
1241 | type: string
1242 | example: https://avatars.githubusercontent.com/u/11223344?v=1
1243 | description: The user's avatar url
1244 | created:
1245 | type: string
1246 | format: ISO-8601
1247 | description: The time at which the user was created
1248 | role:
1249 | type: string
1250 | enum: [admin, moderator, developer]
1251 | description: The user's role
1252 | example: developer
1253 | badges:
1254 | type: integer
1255 | format: bitfield
1256 | example: 63
1257 | description: |
1258 | Any badges applicable to this user. These are currently unused and undisplayed, and as such are subject to change
1259 |
1260 | In order from first to seventh bit, the current bits are:
1261 | - (unused)
1262 | - EARLY_MODPACK_ADOPTER
1263 | - EARLY_RESPACK_ADOPTER
1264 | - EARLY_PLUGIN_ADOPTER
1265 | - ALPHA_TESTER
1266 | - CONTRIBUTOR
1267 | - TRANSLATOR
1268 | auth_providers:
1269 | type: array
1270 | items:
1271 | type: string
1272 | example: [github, gitlab, steam, microsoft, google, discord]
1273 | description: A list of authentication providers you have signed up for (only displayed if requesting your own account)
1274 | nullable: true
1275 | email_verified:
1276 | type: boolean
1277 | description: Whether your email is verified (only displayed if requesting your own account)
1278 | nullable: true
1279 | has_password:
1280 | type: boolean
1281 | description: Whether you have a password associated with your account (only displayed if requesting your own account)
1282 | nullable: true
1283 | has_totp:
1284 | type: boolean
1285 | description: Whether you have TOTP two-factor authentication connected to your account (only displayed if requesting your own account)
1286 | nullable: true
1287 | github_id:
1288 | deprecated: true
1289 | type: integer
1290 | description: Deprecated - this is no longer public for security reasons and is always null
1291 | example: null
1292 | nullable: true
1293 | required:
1294 | - id
1295 | - avatar_url
1296 | - created
1297 | - role
1298 | UserPayoutHistory:
1299 | type: object
1300 | properties:
1301 | all_time:
1302 | type: string
1303 | description: The all-time balance accrued by this user in USD
1304 | example: 10.11223344556677889900
1305 | last_month:
1306 | type: string
1307 | description: The amount in USD made by the user in the previous 30 days
1308 | example: 2.22446688002244668800
1309 | payouts:
1310 | type: array
1311 | description: A history of all of the user's past transactions
1312 | items:
1313 | $ref: '#/components/schemas/UserPayoutHistoryEntry'
1314 | UserPayoutHistoryEntry:
1315 | type: object
1316 | properties:
1317 | created:
1318 | type: string
1319 | format: ISO-8601
1320 | description: The date of this transaction
1321 | amount:
1322 | type: integer
1323 | description: The amount of this transaction in USD
1324 | example: 10.00
1325 | status:
1326 | type: string
1327 | description: The status of this transaction
1328 | example: success
1329 | # Notifications
1330 | Notification:
1331 | type: object
1332 | properties:
1333 | id:
1334 | type: string
1335 | description: The id of the notification
1336 | example: UUVVWWXX
1337 | user_id:
1338 | type: string
1339 | description: The id of the user who received the notification
1340 | example: EEFFGGHH
1341 | type:
1342 | type: string
1343 | enum: [project_update, team_invite, status_change, moderator_message]
1344 | description: The type of notification
1345 | example: project_update
1346 | nullable: true
1347 | title:
1348 | type: string
1349 | description: The title of the notification
1350 | example: "**My Project** has been updated!"
1351 | text:
1352 | type: string
1353 | description: The body text of the notification
1354 | example: "The project, My Project, has released a new version: 1.0.0"
1355 | link:
1356 | type: string
1357 | description: A link to the related project or version
1358 | example: mod/AABBCCDD/version/IIJJKKLL
1359 | read:
1360 | type: boolean
1361 | example: false
1362 | description: Whether the notification has been read or not
1363 | created:
1364 | type: string
1365 | format: ISO-8601
1366 | description: The time at which the notification was created
1367 | actions:
1368 | type: array
1369 | items:
1370 | $ref: '#/components/schemas/NotificationAction'
1371 | description: A list of actions that can be performed
1372 | required:
1373 | - id
1374 | - user_id
1375 | - title
1376 | - text
1377 | - link
1378 | - read
1379 | - created
1380 | - actions
1381 | NotificationAction:
1382 | type: object
1383 | description: An action that can be performed on a notification
1384 | properties:
1385 | title:
1386 | type: string
1387 | description: The friendly name for this action
1388 | example: Accept
1389 | action_route:
1390 | type: array
1391 | items:
1392 | type: string
1393 | description: The HTTP code and path to request in order to perform this action.
1394 | example: [POST, 'team/{id}/join']
1395 | # Reports
1396 | CreatableReport:
1397 | type: object
1398 | properties:
1399 | report_type:
1400 | type: string
1401 | description: The type of the report being sent
1402 | example: copyright
1403 | item_id:
1404 | type: string
1405 | description: The ID of the item (project, version, or user) being reported
1406 | example: EEFFGGHH
1407 | item_type:
1408 | type: string
1409 | enum: [project, user, version]
1410 | description: The type of the item being reported
1411 | example: project
1412 | body:
1413 | type: string
1414 | description: The extended explanation of the report
1415 | example: This is a reupload of my mod, AABBCCDD!
1416 | required:
1417 | - report_type
1418 | - item_id
1419 | - item_type
1420 | - body
1421 | Report:
1422 | type: object
1423 | allOf:
1424 | - $ref: '#/components/schemas/CreatableReport'
1425 | - type: object
1426 | properties:
1427 | id:
1428 | type: string
1429 | description: The ID of the report
1430 | example: VVWWXXYY
1431 | reporter:
1432 | type: string
1433 | description: The ID of the user who reported the item
1434 | example: UUVVWWXX
1435 | created:
1436 | type: string
1437 | format: ISO-8601
1438 | description: The time at which the report was created
1439 | closed:
1440 | type: boolean
1441 | description: Whether the report is resolved
1442 | thread_id:
1443 | type: string
1444 | example: TTUUVVWW
1445 | description: The ID of the moderation thread associated with this report
1446 | required:
1447 | - reporter
1448 | - created
1449 | - closed
1450 | - thread_id
1451 | # Threads
1452 | Thread:
1453 | type: object
1454 | properties:
1455 | id:
1456 | type: string
1457 | example: WWXXYYZZ
1458 | description: The ID of the thread
1459 | type:
1460 | type: string
1461 | enum: [project, report, direct_message]
1462 | project_id:
1463 | type: string
1464 | nullable: true
1465 | description: The ID of the associated project if a project thread
1466 | report_id:
1467 | type: string
1468 | nullable: true
1469 | description: The ID of the associated report if a report thread
1470 | messages:
1471 | type: array
1472 | items:
1473 | $ref: '#/components/schemas/ThreadMessage'
1474 | members:
1475 | type: array
1476 | items:
1477 | $ref: '#/components/schemas/User'
1478 | required:
1479 | - id
1480 | - type
1481 | - messages
1482 | - members
1483 | ThreadMessage:
1484 | type: object
1485 | properties:
1486 | id:
1487 | type: string
1488 | description: The ID of the message itself
1489 | example: MMNNOOPP
1490 | author_id:
1491 | type: string
1492 | description: The ID of the author
1493 | example: QQRRSSTT
1494 | nullable: true
1495 | body:
1496 | $ref: '#/components/schemas/ThreadMessageBody'
1497 | created:
1498 | type: string
1499 | format: ISO-8601
1500 | description: The time at which the message was created
1501 | required:
1502 | - id
1503 | - body
1504 | - created
1505 | ThreadMessageBody:
1506 | type: object
1507 | description: The contents of the message. **Fields will vary depending on message type.**
1508 | properties:
1509 | type:
1510 | type: string
1511 | enum: [ status_change, text, thread_closure, deleted ]
1512 | description: The type of message
1513 | example: status_change
1514 | body:
1515 | type: string
1516 | description: The actual message text. **Only present for `text` message type**
1517 | example: This is the text of the message.
1518 | private:
1519 | type: boolean
1520 | description: Whether the message is only visible to moderators. **Only present for `text` message type**
1521 | example: false
1522 | replying_to:
1523 | type: string
1524 | description: The ID of the message being replied to by this message. **Only present for `text` message type**
1525 | nullable: true
1526 | example: SSTTUUVV
1527 | old_status:
1528 | type: string
1529 | enum: [ approved, archived, rejected, draft, unlisted, processing, withheld, scheduled, private, unknown ]
1530 | description: The old status of the project. **Only present for `status_change` message type**
1531 | example: processing
1532 | new_status:
1533 | type: string
1534 | enum: [ approved, archived, rejected, draft, unlisted, processing, withheld, scheduled, private, unknown ]
1535 | description: The new status of the project. **Only present for `status_change` message type**
1536 | example: approved
1537 | required:
1538 | - type
1539 | # Team
1540 | TeamMember:
1541 | type: object
1542 | properties:
1543 | team_id:
1544 | type: string
1545 | example: MMNNOOPP
1546 | description: The ID of the team this team member is a member of
1547 | user:
1548 | $ref: '#/components/schemas/User'
1549 | role:
1550 | type: string
1551 | example: Member
1552 | description: The user's role on the team
1553 | permissions:
1554 | type: integer
1555 | format: bitfield
1556 | example: 127
1557 | description: |
1558 | The user's permissions in bitfield format (requires authorization to view)
1559 |
1560 | In order from first to tenth bit, the bits are:
1561 | - UPLOAD_VERSION
1562 | - DELETE_VERSION
1563 | - EDIT_DETAILS
1564 | - EDIT_BODY
1565 | - MANAGE_INVITES
1566 | - REMOVE_MEMBER
1567 | - EDIT_MEMBER
1568 | - DELETE_PROJECT
1569 | - VIEW_ANALYTICS
1570 | - VIEW_PAYOUTS
1571 | accepted:
1572 | type: boolean
1573 | example: true
1574 | description: Whether or not the user has accepted to be on the team (requires authorization to view)
1575 | payouts_split:
1576 | type: integer
1577 | example: 100
1578 | description: The split of payouts going to this user. The proportion of payouts they get is their split divided by the sum of the splits of all members.
1579 | ordering:
1580 | type: integer
1581 | example: 0
1582 | description: The order of the team member.
1583 | required:
1584 | - team_id
1585 | - user
1586 | - role
1587 | - accepted
1588 | # Tags
1589 | CategoryTag:
1590 | type: object
1591 | properties:
1592 | icon:
1593 | type: string
1594 | description: The SVG icon of a category
1595 | example:
1596 | name:
1597 | type: string
1598 | description: The name of the category
1599 | example: "adventure"
1600 | project_type:
1601 | type: string
1602 | description: The project type this category is applicable to
1603 | example: mod
1604 | header:
1605 | type: string
1606 | description: The header under which the category should go
1607 | example: "resolutions"
1608 | required:
1609 | - icon
1610 | - name
1611 | - project_type
1612 | - header
1613 | LoaderTag:
1614 | type: object
1615 | properties:
1616 | icon:
1617 | type: string
1618 | description: The SVG icon of a loader
1619 | example:
1620 | name:
1621 | type: string
1622 | description: The name of the loader
1623 | example: fabric
1624 | supported_project_types:
1625 | type: array
1626 | items:
1627 | type: string
1628 | description: The project type
1629 | description: The project types that this loader is applicable to
1630 | example: [mod, modpack]
1631 | required:
1632 | - icon
1633 | - name
1634 | - supported_project_types
1635 | GameVersionTag:
1636 | type: object
1637 | properties:
1638 | version:
1639 | type: string
1640 | description: The name/number of the game version
1641 | example: 1.18.1
1642 | version_type:
1643 | type: string
1644 | enum: [release, snapshot, alpha, beta]
1645 | description: The type of the game version
1646 | example: release
1647 | date:
1648 | type: string
1649 | format: ISO-8601
1650 | description: The date of the game version release
1651 | major:
1652 | type: boolean
1653 | description: Whether or not this is a major version, used for Featured Versions
1654 | example: true
1655 | required:
1656 | - version
1657 | - version_type
1658 | - date
1659 | - major
1660 | DonationPlatformTag:
1661 | type: object
1662 | properties:
1663 | short:
1664 | type: string
1665 | description: The short identifier of the donation platform
1666 | example: bmac
1667 | name:
1668 | type: string
1669 | description: The full name of the donation platform
1670 | example: Buy Me a Coffee
1671 | required:
1672 | - short
1673 | - name
1674 | ModifyTeamMemberBody:
1675 | properties:
1676 | role:
1677 | type: string
1678 | example: Contributor
1679 | permissions:
1680 | type: integer
1681 | format: bitfield
1682 | example: 127
1683 | description: |
1684 | The user's permissions in bitfield format
1685 |
1686 | In order from first to tenth bit, the bits are:
1687 | - UPLOAD_VERSION
1688 | - DELETE_VERSION
1689 | - EDIT_DETAILS
1690 | - EDIT_BODY
1691 | - MANAGE_INVITES
1692 | - REMOVE_MEMBER
1693 | - EDIT_MEMBER
1694 | - DELETE_PROJECT
1695 | - VIEW_ANALYTICS
1696 | - VIEW_PAYOUTS
1697 | payouts_split:
1698 | type: integer
1699 | example: 100
1700 | description: The split of payouts going to this user. The proportion of payouts they get is their split divided by the sum of the splits of all members.
1701 | ordering:
1702 | type: integer
1703 | example: 0
1704 | description: The order of the team member.
1705 | LicenseTag:
1706 | type: object
1707 | description: A short overview of a license
1708 | properties:
1709 | short:
1710 | type: string
1711 | description: The short identifier of the license
1712 | example: lgpl-3
1713 | name:
1714 | type: string
1715 | description: The full name of the license
1716 | example: GNU Lesser General Public License v3
1717 | required:
1718 | - short
1719 | - name
1720 | License:
1721 | type: object
1722 | description: A full license
1723 | properties:
1724 | title:
1725 | type: string
1726 | example: GNU Lesser General Public License v3.0 or later
1727 | body:
1728 | type: string
1729 | example: Insert the entire text of the LGPL-3.0 here...
1730 | # Errors
1731 | InvalidInputError:
1732 | type: object
1733 | properties:
1734 | error:
1735 | type: string
1736 | description: The name of the error
1737 | example: "invalid_input"
1738 | description:
1739 | type: string
1740 | description: The contents of the error
1741 | example: "Error while parsing multipart payload"
1742 | required:
1743 | - error
1744 | - description
1745 | AuthError:
1746 | type: object
1747 | properties:
1748 | error:
1749 | type: string
1750 | description: The name of the error
1751 | example: "unauthorized"
1752 | description:
1753 | type: string
1754 | description: The contents of the error
1755 | example: "Authentication Error: Invalid Authentication Credentials"
1756 | required:
1757 | - error
1758 | - description
1759 | # Other
1760 | Statistics:
1761 | type: object
1762 | properties:
1763 | projects:
1764 | type: integer
1765 | description: Number of projects on Modrinth
1766 | versions:
1767 | type: integer
1768 | description: Number of projects on Modrinth
1769 | files:
1770 | type: integer
1771 | description: Number of version files on Modrinth
1772 | authors:
1773 | type: integer
1774 | description: Number of authors (users with projects) on Modrinth
1775 | ForgeUpdates:
1776 | type: object
1777 | description: Mod version information that can be consumed by Forge's update checker
1778 | properties:
1779 | homepage:
1780 | type: string
1781 | description: A link to the mod page
1782 | example: https://modrinth.com
1783 | promos:
1784 | $ref: '#/components/schemas/ForgeUpdateCheckerPromos'
1785 | ForgeUpdateCheckerPromos:
1786 | type: object
1787 | description: A list of the recommended and latest versions for each Minecraft release
1788 | properties:
1789 | "{version}-recommended":
1790 | type: string
1791 | description: The mod version that is recommended for `{version}`. Excludes versions with the `alpha` and `beta` version types.
1792 | "{version}-latest":
1793 | type: string
1794 | description: The latest mod version for `{version}`. Shows versions with the `alpha` and `beta` version types.
1795 | securitySchemes:
1796 | TokenAuth:
1797 | type: apiKey
1798 | in: header
1799 | name: Authorization
1800 |
1801 | tags:
1802 | - name: projects
1803 | x-displayName: Projects
1804 | description: Projects are what Modrinth is centered around, be it mods, modpacks, resource packs, etc.
1805 | - name: versions
1806 | x-displayName: Versions
1807 | description: Versions contain download links to files with additional metadata.
1808 | - name: version-files
1809 | x-displayName: Version Files
1810 | description: Versions can contain multiple files, and these routes help manage those files.
1811 | - name: users
1812 | x-displayName: Users
1813 | description: Users can create projects, join teams, access notifications, manage settings, and follow projects. Admins and moderators have more advanced permissions such as reviewing new projects.
1814 | - name: notifications
1815 | x-displayName: Notifications
1816 | description: Notifications are sent to users for various reasons, including for project updates, team invites, and moderation purposes.
1817 | - name: threads
1818 | x-displayName: Threads
1819 | description: Threads are a way of communicating between users and moderators, for the purposes of project reviews and reports.
1820 | - name: teams
1821 | x-displayName: Teams
1822 | description: Through teams, user permissions limit how team members can modify projects.
1823 | - name: tags
1824 | x-displayName: Tags
1825 | description: Tags are common and reusable lists of metadata types such as categories or versions. Some can be applied to projects and/or versions.
1826 | - name: misc
1827 | x-displayName: Miscellaneous
1828 | - name: project_model
1829 | x-displayName: Project Model
1830 | description: |
1831 |
1832 | - name: project_result_model
1833 | x-displayName: Search Result Model
1834 | description: |
1835 |
1836 | - name: version_model
1837 | x-displayName: Version Model
1838 | description: |
1839 |
1840 | - name: user_model
1841 | x-displayName: User Model
1842 | description: |
1843 |
1844 | - name: team_member_model
1845 | x-displayName: Team Member Model
1846 | description: |
1847 |
1848 |
1849 | x-tagGroups:
1850 | - name: Routes
1851 | tags:
1852 | - projects
1853 | - versions
1854 | - version-files
1855 | - users
1856 | - notifications
1857 | - threads
1858 | - teams
1859 | - tags
1860 | - misc
1861 | - name: Models
1862 | tags:
1863 | - project_model
1864 | - project_result_model
1865 | - version_model
1866 | - user_model
1867 | - team_member_model
1868 |
1869 | paths:
1870 | # Project
1871 | /search:
1872 | get:
1873 | summary: Search projects
1874 | operationId: searchProjects
1875 | parameters:
1876 | - in: query
1877 | name: query
1878 | schema:
1879 | type: string
1880 | example: gravestones
1881 | description: The query to search for
1882 | - in: query
1883 | name: facets
1884 | schema:
1885 | type: string
1886 | example: "[[\"categories:forge\"],[\"versions:1.17.1\"],[\"project_type:mod\"],[\"license:mit\"]]"
1887 | description: |
1888 | Facets are an essential concept for understanding how to filter out results.
1889 |
1890 | These are the most commonly used facet types:
1891 | - `project_type`
1892 | - `categories` (loaders are lumped in with categories in search)
1893 | - `versions`
1894 | - `client_side`
1895 | - `server_side`
1896 | - `open_source`
1897 |
1898 | Several others are also available for use, though these should not be used outside very specific use cases.
1899 | - `title`
1900 | - `author`
1901 | - `follows`
1902 | - `project_id`
1903 | - `license`
1904 | - `downloads`
1905 | - `color`
1906 | - `created_timestamp`
1907 | - `modified_timestamp`
1908 |
1909 | In order to then use these facets, you need a value to filter by, as well as an operation to perform on this value.
1910 | The most common operation is `:` (same as `=`), though you can also use `!=`, `>=`, `>`, `<=`, and `<`.
1911 | Join together the type, operation, and value, and you've got your string.
1912 | ```
1913 | {type} {operation} {value}
1914 | ```
1915 |
1916 | Examples:
1917 | ```
1918 | categories = adventure
1919 | versions != 1.20.1
1920 | downloads <= 100
1921 | ```
1922 |
1923 | You then join these strings together in arrays to signal `AND` and `OR` operators.
1924 |
1925 | ##### OR
1926 | All elements in a single array are considered to be joined by OR statements.
1927 | For example, the search `[["versions:1.16.5", "versions:1.17.1"]]` translates to `Projects that support 1.16.5 OR 1.17.1`.
1928 |
1929 | ##### AND
1930 | Separate arrays are considered to be joined by AND statements.
1931 | For example, the search `[["versions:1.16.5"], ["project_type:modpack"]]` translates to `Projects that support 1.16.5 AND are modpacks`.
1932 | - in: query
1933 | name: index
1934 | schema:
1935 | type: string
1936 | enum:
1937 | - relevance
1938 | - downloads
1939 | - follows
1940 | - newest
1941 | - updated
1942 | default: relevance
1943 | example: downloads
1944 | description: The sorting method used for sorting search results
1945 | - in: query
1946 | name: offset
1947 | schema:
1948 | type: integer
1949 | default: 0
1950 | example: 20
1951 | description: The offset into the search. Skips this number of results
1952 | - in: query
1953 | name: limit
1954 | schema:
1955 | type: integer
1956 | default: 10
1957 | example: 20
1958 | minimum: 0
1959 | maximum: 100
1960 | description: The number of results returned by the search
1961 | tags:
1962 | - projects
1963 | responses:
1964 | "200":
1965 | description: Expected response to a valid request
1966 | content:
1967 | application/json:
1968 | schema:
1969 | $ref: '#/components/schemas/SearchResults'
1970 | "400":
1971 | description: Request was invalid, see given error
1972 | content:
1973 | application/json:
1974 | schema:
1975 | $ref: '#/components/schemas/InvalidInputError'
1976 | /project/{id|slug}:
1977 | parameters:
1978 | - $ref: '#/components/parameters/ProjectIdentifier'
1979 | get:
1980 | summary: Get a project
1981 | operationId: getProject
1982 | tags:
1983 | - projects
1984 | responses:
1985 | "200":
1986 | description: Expected response to a valid request
1987 | content:
1988 | application/json:
1989 | schema:
1990 | $ref: '#/components/schemas/Project'
1991 | "404":
1992 | description: The requested item(s) were not found or no authorization to access the requested item(s)
1993 | patch:
1994 | summary: Modify a project
1995 | operationId: modifyProject
1996 | tags:
1997 | - projects
1998 | security:
1999 | - TokenAuth: ['PROJECT_WRITE']
2000 | requestBody:
2001 | description: "Modified project fields"
2002 | content:
2003 | application/json:
2004 | schema:
2005 | $ref: '#/components/schemas/EditableProject'
2006 | responses:
2007 | "204":
2008 | description: Expected response to a valid request
2009 | "401":
2010 | description: Incorrect token scopes or no authorization to access the requested item(s)
2011 | content:
2012 | application/json:
2013 | schema:
2014 | $ref: '#/components/schemas/AuthError'
2015 | "404":
2016 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2017 | delete:
2018 | summary: Delete a project
2019 | operationId: deleteProject
2020 | tags:
2021 | - projects
2022 | security:
2023 | - TokenAuth: ['PROJECT_DELETE']
2024 | responses:
2025 | "204":
2026 | description: Expected response to a valid request
2027 | "400":
2028 | description: Request was invalid, see given error
2029 | content:
2030 | application/json:
2031 | schema:
2032 | $ref: '#/components/schemas/InvalidInputError'
2033 | "401":
2034 | description: Incorrect token scopes or no authorization to access the requested item(s)
2035 | content:
2036 | application/json:
2037 | schema:
2038 | $ref: '#/components/schemas/AuthError'
2039 | /projects:
2040 | parameters:
2041 | - $ref: '#/components/parameters/MultipleProjectIdentifier'
2042 | get:
2043 | summary: Get multiple projects
2044 | operationId: getProjects
2045 | tags:
2046 | - projects
2047 | responses:
2048 | "200":
2049 | description: Expected response to a valid request
2050 | content:
2051 | application/json:
2052 | schema:
2053 | type: array
2054 | items:
2055 | $ref: '#/components/schemas/Project'
2056 | patch:
2057 | summary: Bulk-edit multiple projects
2058 | operationId: patchProjects
2059 | tags:
2060 | - projects
2061 | security:
2062 | - TokenAuth: ['PROJECT_WRITE']
2063 | requestBody:
2064 | description: Fields to edit on all projects specified
2065 | content:
2066 | application/json:
2067 | schema:
2068 | $ref: '#/components/schemas/PatchProjectsBody'
2069 | responses:
2070 | "204":
2071 | description: Expected response to a valid request
2072 | "400":
2073 | description: Request was invalid, see given error
2074 | content:
2075 | application/json:
2076 | schema:
2077 | $ref: '#/components/schemas/InvalidInputError'
2078 | "401":
2079 | description: Incorrect token scopes or no authorization to access the requested item(s)
2080 | content:
2081 | application/json:
2082 | schema:
2083 | $ref: '#/components/schemas/AuthError'
2084 | /projects_random:
2085 | get:
2086 | summary: Get a list of random projects
2087 | operationId: randomProjects
2088 | parameters:
2089 | - in: query
2090 | name: count
2091 | required: true
2092 | schema:
2093 | type: integer
2094 | example: 70
2095 | minimum: 0
2096 | maximum: 100
2097 | description: The number of random projects to return
2098 | tags:
2099 | - projects
2100 | responses:
2101 | "200":
2102 | description: Expected response to a valid request
2103 | content:
2104 | application/json:
2105 | schema:
2106 | type: array
2107 | items:
2108 | $ref: '#/components/schemas/Project'
2109 | "400":
2110 | description: Request was invalid, see given error
2111 | content:
2112 | application/json:
2113 | schema:
2114 | $ref: '#/components/schemas/InvalidInputError'
2115 | /project:
2116 | post:
2117 | summary: Create a project
2118 | operationId: createProject
2119 | tags:
2120 | - projects
2121 | security:
2122 | - TokenAuth: ['PROJECT_CREATE']
2123 | requestBody:
2124 | description: "New project"
2125 | content:
2126 | multipart/form-data:
2127 | schema:
2128 | $ref: '#/components/schemas/CreateProjectBody'
2129 | responses:
2130 | "200":
2131 | description: Expected response to a valid request
2132 | content:
2133 | application/json:
2134 | schema:
2135 | $ref: '#/components/schemas/Project'
2136 | "400":
2137 | description: Request was invalid, see given error
2138 | content:
2139 | application/json:
2140 | schema:
2141 | $ref: '#/components/schemas/InvalidInputError'
2142 | "401":
2143 | description: Incorrect token scopes or no authorization to access the requested item(s)
2144 | content:
2145 | application/json:
2146 | schema:
2147 | $ref: '#/components/schemas/AuthError'
2148 | /project/{id|slug}/icon:
2149 | parameters:
2150 | - $ref: '#/components/parameters/ProjectIdentifier'
2151 | patch:
2152 | summary: Change project's icon
2153 | description: The new icon may be up to 256KiB in size.
2154 | operationId: changeProjectIcon
2155 | tags:
2156 | - projects
2157 | parameters:
2158 | - description: Image extension
2159 | in: query
2160 | name: ext
2161 | required: true
2162 | schema:
2163 | type: string
2164 | enum: [png, jpg, jpeg, bmp, gif, webp, svg, svgz, rgb]
2165 | requestBody:
2166 | $ref: '#/components/requestBodies/Image'
2167 | security:
2168 | - TokenAuth: ['PROJECT_WRITE']
2169 | responses:
2170 | "204":
2171 | description: Expected response to a valid request
2172 | "400":
2173 | description: Request was invalid, see given error
2174 | content:
2175 | application/json:
2176 | schema:
2177 | $ref: '#/components/schemas/InvalidInputError'
2178 | delete:
2179 | summary: Delete project's icon
2180 | operationId: deleteProjectIcon
2181 | tags:
2182 | - projects
2183 | security:
2184 | - TokenAuth: ['PROJECT_WRITE']
2185 | responses:
2186 | "204":
2187 | description: Expected response to a valid request
2188 | "400":
2189 | description: Request was invalid, see given error
2190 | content:
2191 | application/json:
2192 | schema:
2193 | $ref: '#/components/schemas/InvalidInputError'
2194 | "401":
2195 | description: Incorrect token scopes or no authorization to access the requested item(s)
2196 | content:
2197 | application/json:
2198 | schema:
2199 | $ref: '#/components/schemas/AuthError'
2200 | /project/{id|slug}/check:
2201 | parameters:
2202 | - $ref: '#/components/parameters/ProjectIdentifier'
2203 | get:
2204 | summary: Check project slug/ID validity
2205 | operationId: checkProjectValidity
2206 | tags:
2207 | - projects
2208 | responses:
2209 | "200":
2210 | description: Expected response to a valid request
2211 | content:
2212 | application/json:
2213 | schema:
2214 | $ref: '#/components/schemas/ProjectIdentifier'
2215 | "404":
2216 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2217 | /project/{id|slug}/gallery:
2218 | parameters:
2219 | - $ref: '#/components/parameters/ProjectIdentifier'
2220 | post:
2221 | summary: Add a gallery image
2222 | description: Modrinth allows you to upload files of up to 5MiB to a project's gallery.
2223 | operationId: addGalleryImage
2224 | tags:
2225 | - projects
2226 | security:
2227 | - TokenAuth: ['PROJECT_WRITE']
2228 | parameters:
2229 | - description: Image extension
2230 | in: query
2231 | name: ext
2232 | required: true
2233 | schema:
2234 | type: string
2235 | enum: [png, jpg, jpeg, bmp, gif, webp, svg, svgz, rgb]
2236 | - description: Whether an image is featured
2237 | in: query
2238 | name: featured
2239 | required: true
2240 | schema:
2241 | type: boolean
2242 | - description: Title of the image
2243 | in: query
2244 | name: title
2245 | schema:
2246 | type: string
2247 | - description: Description of the image
2248 | in: query
2249 | name: description
2250 | schema:
2251 | type: string
2252 | - description: Ordering of the image
2253 | in: query
2254 | name: ordering
2255 | schema:
2256 | type: integer
2257 | requestBody:
2258 | $ref: '#/components/requestBodies/Image'
2259 | responses:
2260 | "204":
2261 | description: Expected response to a valid request
2262 | "400":
2263 | description: Request was invalid, see given error
2264 | content:
2265 | application/json:
2266 | schema:
2267 | $ref: '#/components/schemas/InvalidInputError'
2268 | "401":
2269 | description: Incorrect token scopes or no authorization to access the requested item(s)
2270 | content:
2271 | application/json:
2272 | schema:
2273 | $ref: '#/components/schemas/AuthError'
2274 | "404":
2275 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2276 | patch:
2277 | summary: Modify a gallery image
2278 | operationId: modifyGalleryImage
2279 | tags:
2280 | - projects
2281 | security:
2282 | - TokenAuth: ['PROJECT_WRITE']
2283 | parameters:
2284 | - description: URL link of the image to modify
2285 | in: query
2286 | name: url
2287 | required: true
2288 | schema:
2289 | type: string
2290 | format: uri
2291 | - description: Whether the image is featured
2292 | in: query
2293 | name: featured
2294 | schema:
2295 | type: boolean
2296 | - description: New title of the image
2297 | in: query
2298 | name: title
2299 | schema:
2300 | type: string
2301 | - description: New description of the image
2302 | in: query
2303 | name: description
2304 | schema:
2305 | type: string
2306 | - description: New ordering of the image
2307 | in: query
2308 | name: ordering
2309 | schema:
2310 | type: integer
2311 | responses:
2312 | "204":
2313 | description: Expected response to a valid request
2314 | "401":
2315 | description: Incorrect token scopes or no authorization to access the requested item(s)
2316 | content:
2317 | application/json:
2318 | schema:
2319 | $ref: '#/components/schemas/AuthError'
2320 | "404":
2321 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2322 | delete:
2323 | summary: Delete a gallery image
2324 | operationId: deleteGalleryImage
2325 | tags:
2326 | - projects
2327 | security:
2328 | - TokenAuth: ['PROJECT_WRITE']
2329 | parameters:
2330 | - description: URL link of the image to delete
2331 | in: query
2332 | name: url
2333 | required: true
2334 | schema:
2335 | type: string
2336 | format: uri
2337 | responses:
2338 | "204":
2339 | description: Expected response to a valid request
2340 | "400":
2341 | description: Request was invalid, see given error
2342 | content:
2343 | application/json:
2344 | schema:
2345 | $ref: '#/components/schemas/InvalidInputError'
2346 | "401":
2347 | description: Incorrect token scopes or no authorization to access the requested item(s)
2348 | content:
2349 | application/json:
2350 | schema:
2351 | $ref: '#/components/schemas/AuthError'
2352 | /project/{id|slug}/dependencies:
2353 | parameters:
2354 | - $ref: '#/components/parameters/ProjectIdentifier'
2355 | get:
2356 | summary: Get all of a project's dependencies
2357 | operationId: getDependencies
2358 | tags:
2359 | - projects
2360 | responses:
2361 | "200":
2362 | description: Expected response to a valid request
2363 | content:
2364 | application/json:
2365 | schema:
2366 | $ref: '#/components/schemas/ProjectDependencyList'
2367 | "404":
2368 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2369 | /project/{id|slug}/follow:
2370 | parameters:
2371 | - $ref: '#/components/parameters/ProjectIdentifier'
2372 | post:
2373 | summary: Follow a project
2374 | operationId: followProject
2375 | tags:
2376 | - projects
2377 | security:
2378 | - TokenAuth: ['USER_WRITE']
2379 | responses:
2380 | "204":
2381 | description: Expected response to a valid request
2382 | "400":
2383 | description: Request was invalid, see given error
2384 | content:
2385 | application/json:
2386 | schema:
2387 | $ref: '#/components/schemas/InvalidInputError'
2388 | "401":
2389 | description: Incorrect token scopes or no authorization to access the requested item(s)
2390 | content:
2391 | application/json:
2392 | schema:
2393 | $ref: '#/components/schemas/AuthError'
2394 | delete:
2395 | summary: Unfollow a project
2396 | operationId: unfollowProject
2397 | tags:
2398 | - projects
2399 | security:
2400 | - TokenAuth: ['USER_WRITE']
2401 | responses:
2402 | "204":
2403 | description: Expected response to a valid request
2404 | "400":
2405 | description: Request was invalid, see given error
2406 | content:
2407 | application/json:
2408 | schema:
2409 | $ref: '#/components/schemas/InvalidInputError'
2410 | "401":
2411 | description: Incorrect token scopes or no authorization to access the requested item(s)
2412 | content:
2413 | application/json:
2414 | schema:
2415 | $ref: '#/components/schemas/AuthError'
2416 | /project/{id|slug}/schedule:
2417 | parameters:
2418 | - $ref: '#/components/parameters/ProjectIdentifier'
2419 | post:
2420 | summary: Schedule a project
2421 | operationId: scheduleProject
2422 | tags:
2423 | - projects
2424 | security:
2425 | - TokenAuth: ['PROJECT_WRITE']
2426 | requestBody:
2427 | description: Information about date and requested status
2428 | content:
2429 | application/json:
2430 | schema:
2431 | $ref: '#/components/schemas/Schedule'
2432 | responses:
2433 | "204":
2434 | description: Expected response to a valid request
2435 | "400":
2436 | description: Request was invalid, see given error
2437 | content:
2438 | application/json:
2439 | schema:
2440 | $ref: '#/components/schemas/InvalidInputError'
2441 | "401":
2442 | description: Incorrect token scopes or no authorization to access the requested item(s)
2443 | content:
2444 | application/json:
2445 | schema:
2446 | $ref: '#/components/schemas/AuthError'
2447 | # Version
2448 | /project/{id|slug}/version:
2449 | parameters:
2450 | - $ref: '#/components/parameters/ProjectIdentifier'
2451 | get:
2452 | summary: List project's versions
2453 | operationId: getProjectVersions
2454 | tags:
2455 | - versions
2456 | parameters:
2457 | - in: query
2458 | name: loaders
2459 | required: false
2460 | description: "The types of loaders to filter for"
2461 | schema:
2462 | type: string
2463 | example: "[\"fabric\"]"
2464 | - in: query
2465 | name: game_versions
2466 | required: false
2467 | description: "The game versions to filter for"
2468 | schema:
2469 | type: string
2470 | example: "[\"1.18.1\"]"
2471 | - in: query
2472 | name: featured
2473 | required: false
2474 | description: "Allows to filter for featured or non-featured versions only"
2475 | schema:
2476 | type: boolean
2477 | responses:
2478 | "200":
2479 | description: Expected response to a valid request
2480 | content:
2481 | application/json:
2482 | schema:
2483 | type: array
2484 | items:
2485 | $ref: '#/components/schemas/Version'
2486 | "404":
2487 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2488 | /version/{id}:
2489 | parameters:
2490 | - $ref: '#/components/parameters/VersionIdentifier'
2491 | get:
2492 | summary: Get a version
2493 | operationId: getVersion
2494 | tags:
2495 | - versions
2496 | responses:
2497 | "200":
2498 | description: Expected response to a valid request
2499 | content:
2500 | application/json:
2501 | schema:
2502 | $ref: '#/components/schemas/Version'
2503 | "404":
2504 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2505 | patch:
2506 | summary: Modify a version
2507 | operationId: modifyVersion
2508 | tags:
2509 | - versions
2510 | security:
2511 | - TokenAuth: ['VERSION_WRITE']
2512 | requestBody:
2513 | description: "Modified version fields"
2514 | content:
2515 | application/json:
2516 | schema:
2517 | $ref: '#/components/schemas/EditableVersion'
2518 | responses:
2519 | "204":
2520 | description: Expected response to a valid request
2521 | "401":
2522 | description: Incorrect token scopes or no authorization to access the requested item(s)
2523 | content:
2524 | application/json:
2525 | schema:
2526 | $ref: '#/components/schemas/AuthError'
2527 | "404":
2528 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2529 | delete:
2530 | summary: Delete a version
2531 | operationId: deleteVersion
2532 | tags:
2533 | - versions
2534 | security:
2535 | - TokenAuth: ['VERSION_DELETE']
2536 | responses:
2537 | "204":
2538 | description: Expected response to a valid request
2539 | "401":
2540 | description: Incorrect token scopes or no authorization to access the requested item(s)
2541 | content:
2542 | application/json:
2543 | schema:
2544 | $ref: '#/components/schemas/AuthError'
2545 | "404":
2546 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2547 | /project/{id|slug}/version/{id|number}:
2548 | parameters:
2549 | - $ref: '#/components/parameters/ProjectIdentifier'
2550 | - name: id|number
2551 | in: path
2552 | required: true
2553 | description: The version ID or version number
2554 | schema:
2555 | type: string
2556 | example: [IIJJKKLL]
2557 | get:
2558 | summary: Get a version given a version number or ID
2559 | description: Please note that, if the version number provided matches multiple versions, only the **oldest matching version** will be returned.
2560 | operationId: getVersionFromIdOrNumber
2561 | tags:
2562 | - versions
2563 | responses:
2564 | "200":
2565 | description: Expected response to a valid request
2566 | content:
2567 | application/json:
2568 | schema:
2569 | $ref: '#/components/schemas/Version'
2570 | "404":
2571 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2572 | /version:
2573 | post:
2574 | summary: Create a version
2575 | description: |
2576 | 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.
2577 |
2578 | The request is a [multipart request](https://www.ietf.org/rfc/rfc2388.txt) 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.
2579 |
2580 | 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`.
2581 | operationId: createVersion
2582 | tags:
2583 | - versions
2584 | security:
2585 | - TokenAuth: ['VERSION_CREATE']
2586 | requestBody:
2587 | description: "New version"
2588 | content:
2589 | multipart/form-data:
2590 | schema:
2591 | $ref: '#/components/schemas/CreateVersionBody'
2592 | responses:
2593 | "200":
2594 | description: Expected response to a valid request
2595 | content:
2596 | application/json:
2597 | schema:
2598 | $ref: '#/components/schemas/Version'
2599 | "400":
2600 | description: Request was invalid, see given error
2601 | content:
2602 | application/json:
2603 | schema:
2604 | $ref: '#/components/schemas/InvalidInputError'
2605 | "401":
2606 | description: Incorrect token scopes or no authorization to access the requested item(s)
2607 | content:
2608 | application/json:
2609 | schema:
2610 | $ref: '#/components/schemas/AuthError'
2611 | /version/{id}/schedule:
2612 | parameters:
2613 | - $ref: '#/components/parameters/VersionIdentifier'
2614 | post:
2615 | summary: Schedule a version
2616 | operationId: scheduleVersion
2617 | tags:
2618 | - versions
2619 | security:
2620 | - TokenAuth: ['VERSION_WRITE']
2621 | requestBody:
2622 | description: Information about date and requested status
2623 | content:
2624 | application/json:
2625 | schema:
2626 | $ref: '#/components/schemas/Schedule'
2627 | responses:
2628 | "204":
2629 | description: Expected response to a valid request
2630 | "400":
2631 | description: Request was invalid, see given error
2632 | content:
2633 | application/json:
2634 | schema:
2635 | $ref: '#/components/schemas/InvalidInputError'
2636 | "401":
2637 | description: Incorrect token scopes or no authorization to access the requested item(s)
2638 | content:
2639 | application/json:
2640 | schema:
2641 | $ref: '#/components/schemas/AuthError'
2642 | /versions:
2643 | parameters:
2644 | - in: query
2645 | name: ids
2646 | description: The IDs of the versions
2647 | schema:
2648 | type: string
2649 | example: "[\"AABBCCDD\", \"EEFFGGHH\"]"
2650 | required: true
2651 | get:
2652 | summary: Get multiple versions
2653 | operationId: getVersions
2654 | tags:
2655 | - versions
2656 | responses:
2657 | "200":
2658 | description: Expected response to a valid request
2659 | content:
2660 | application/json:
2661 | schema:
2662 | type: array
2663 | items:
2664 | $ref: '#/components/schemas/Version'
2665 | /version/{id}/file:
2666 | parameters:
2667 | - $ref: '#/components/parameters/VersionIdentifier'
2668 | post:
2669 | summary: Add files to version
2670 | description: Project files are attached. `.mrpack` and `.jar` files are accepted.
2671 | operationId: addFilesToVersion
2672 | tags:
2673 | - versions
2674 | security:
2675 | - TokenAuth: ['VERSION_WRITE']
2676 | requestBody:
2677 | description: "New version files"
2678 | content:
2679 | multipart/form-data:
2680 | schema:
2681 | type: object
2682 | properties:
2683 | data:
2684 | type: object
2685 | enum:
2686 | - { }
2687 | responses:
2688 | "204":
2689 | description: Expected response to a valid request
2690 | "401":
2691 | description: Incorrect token scopes or no authorization to access the requested item(s)
2692 | content:
2693 | application/json:
2694 | schema:
2695 | $ref: '#/components/schemas/AuthError'
2696 | "404":
2697 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2698 | # Version file
2699 | /version_file/{hash}:
2700 | parameters:
2701 | - $ref: '#/components/parameters/FileHashIdentifier'
2702 | - $ref: '#/components/parameters/AlgorithmIdentifier'
2703 | get:
2704 | summary: Get version from hash
2705 | operationId: versionFromHash
2706 | tags:
2707 | - version-files
2708 | parameters:
2709 | - $ref: '#/components/parameters/MultipleHashQueryIdentifier'
2710 | responses:
2711 | "200":
2712 | description: Expected response to a valid request
2713 | content:
2714 | application/json:
2715 | schema:
2716 | $ref: '#/components/schemas/Version'
2717 | "404":
2718 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2719 | delete:
2720 | summary: Delete a file from its hash
2721 | operationId: deleteFileFromHash
2722 | tags:
2723 | - version-files
2724 | security:
2725 | - TokenAuth: ['VERSION_WRITE']
2726 | parameters:
2727 | - description: Version ID to delete the version from, if multiple files of the same hash exist
2728 | required: false
2729 | in: query
2730 | name: version_id
2731 | schema:
2732 | type: string
2733 | example: [IIJJKKLL]
2734 | responses:
2735 | "204":
2736 | description: Expected response to a valid request
2737 | "401":
2738 | description: Incorrect token scopes or no authorization to access the requested item(s)
2739 | content:
2740 | application/json:
2741 | schema:
2742 | $ref: '#/components/schemas/AuthError'
2743 | "404":
2744 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2745 | /version_file/{hash}/update:
2746 | parameters:
2747 | - $ref: '#/components/parameters/FileHashIdentifier'
2748 | - $ref: '#/components/parameters/AlgorithmIdentifier'
2749 | post:
2750 | summary: Latest version of a project from a hash, loader(s), and game version(s)
2751 | operationId: getLatestVersionFromHash
2752 | tags:
2753 | - version-files
2754 | requestBody:
2755 | description: Parameters of the updated version requested
2756 | content:
2757 | application/json:
2758 | schema:
2759 | $ref: '#/components/schemas/GetLatestVersionFromHashBody'
2760 | responses:
2761 | "200":
2762 | description: Expected response to a valid request
2763 | content:
2764 | application/json:
2765 | schema:
2766 | $ref: '#/components/schemas/Version'
2767 | "400":
2768 | description: Request was invalid, see given error
2769 | "404":
2770 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2771 | /version_files:
2772 | post:
2773 | summary: Get versions from hashes
2774 | description: This is the same as [`/version_file/{hash}`](#operation/versionFromHash) except it accepts multiple hashes.
2775 | operationId: versionsFromHashes
2776 | tags:
2777 | - version-files
2778 | responses:
2779 | "200":
2780 | description: Expected response to a valid request
2781 | content:
2782 | application/json:
2783 | schema:
2784 | $ref: '#/components/schemas/HashVersionMap'
2785 | "400":
2786 | description: Request was invalid, see given error
2787 | requestBody:
2788 | description: Hashes and algorithm of the versions requested
2789 | content:
2790 | application/json:
2791 | schema:
2792 | $ref: '#/components/schemas/HashList'
2793 | /version_files/update:
2794 | post:
2795 | summary: Latest versions of multiple project from hashes, loader(s), and game version(s)
2796 | description: This is the same as [`/version_file/{hash}/update`](#operation/getLatestVersionFromHash) except it accepts multiple hashes.
2797 | operationId: getLatestVersionsFromHashes
2798 | tags:
2799 | - version-files
2800 | requestBody:
2801 | description: Parameters of the updated version requested
2802 | content:
2803 | application/json:
2804 | schema:
2805 | $ref: '#/components/schemas/GetLatestVersionsFromHashesBody'
2806 | responses:
2807 | "200":
2808 | description: Expected response to a valid request
2809 | content:
2810 | application/json:
2811 | schema:
2812 | $ref: '#/components/schemas/HashVersionMap'
2813 | "400":
2814 | description: Request was invalid, see given error
2815 | # TODO check this out? https://github.com/modrinth/labrinth/blob/ec80c2b9dbf0bae98eb41714d3455b98095563b7/src/routes/v2/version_file.rs#L381
2816 | #/version_files/project:
2817 | # post:
2818 | # summary: Get projects from hashes
2819 | # operationId: projectsFromHashes
2820 | # tags:
2821 | # - version-files
2822 | # responses:
2823 | # "200":
2824 | # description: Expected response to a valid request
2825 | # content:
2826 | # application/json:
2827 | # schema:
2828 | # type: object
2829 | # properties:
2830 | # your_hash_here:
2831 | # $ref: '#/components/schemas/Project'
2832 | # "400":
2833 | # description: Input is invalid
2834 | # requestBody:
2835 | # description: Hashes and algorithm of the projects requested
2836 | # content:
2837 | # application/json:
2838 | # schema:
2839 | # type: object
2840 | # properties:
2841 | # hashes:
2842 | # type: array
2843 | # items:
2844 | # type: string
2845 | # example: [ ea0f38408102e4d2efd53c2cc11b88b711996b48d8922f76ea6abf731219c5bd1efe39ddf9cce77c54d49a62ff10fb685c00d2e4c524ab99d20f6296677ab2c4, 925a5c4899affa4098d997dfa4a4cb52c636d539e94bc489d1fa034218cb96819a70eb8b01647a39316a59fcfe223c1a8c05ed2e2ae5f4c1e75fa48f6af1c960 ]
2846 | # algorithm:
2847 | # type: string
2848 | # enum: [ sha1, sha512 ]
2849 | # example: sha512
2850 | # required:
2851 | # - hashes
2852 | # - algorithm
2853 | # User
2854 | /user/{id|username}:
2855 | parameters:
2856 | - $ref: '#/components/parameters/UserIdentifier'
2857 | get:
2858 | summary: Get a user
2859 | operationId: getUser
2860 | tags:
2861 | - users
2862 | responses:
2863 | "200":
2864 | description: Expected response to a valid request
2865 | content:
2866 | application/json:
2867 | schema:
2868 | $ref: '#/components/schemas/User'
2869 | "404":
2870 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2871 | patch:
2872 | summary: Modify a user
2873 | operationId: modifyUser
2874 | tags:
2875 | - users
2876 | security:
2877 | - TokenAuth: ['USER_WRITE']
2878 | requestBody:
2879 | description: "Modified user fields"
2880 | content:
2881 | application/json:
2882 | schema:
2883 | $ref: '#/components/schemas/EditableUser'
2884 | responses:
2885 | "204":
2886 | description: Expected response to a valid request
2887 | "401":
2888 | description: Incorrect token scopes or no authorization to access the requested item(s)
2889 | content:
2890 | application/json:
2891 | schema:
2892 | $ref: '#/components/schemas/AuthError'
2893 | "404":
2894 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2895 | /user:
2896 | get:
2897 | summary: Get user from authorization header
2898 | operationId: getUserFromAuth
2899 | tags:
2900 | - users
2901 | security:
2902 | - TokenAuth: ['USER_READ']
2903 | responses:
2904 | "200":
2905 | description: Expected response to a valid request
2906 | content:
2907 | application/json:
2908 | schema:
2909 | $ref: '#/components/schemas/User'
2910 | "401":
2911 | description: Incorrect token scopes or no authorization to access the requested item(s)
2912 | content:
2913 | application/json:
2914 | schema:
2915 | $ref: '#/components/schemas/AuthError'
2916 | /users:
2917 | parameters:
2918 | - in: query
2919 | name: ids
2920 | description: The IDs of the users
2921 | schema:
2922 | type: string
2923 | example: "[\"AABBCCDD\", \"EEFFGGHH\"]"
2924 | required: true
2925 | get:
2926 | summary: Get multiple users
2927 | operationId: getUsers
2928 | tags:
2929 | - users
2930 | responses:
2931 | "200":
2932 | description: Expected response to a valid request
2933 | content:
2934 | application/json:
2935 | schema:
2936 | type: array
2937 | items:
2938 | $ref: '#/components/schemas/User'
2939 | /user/{id|username}/icon:
2940 | parameters:
2941 | - $ref: '#/components/parameters/UserIdentifier'
2942 | patch:
2943 | summary: Change user's avatar
2944 | description: The new avatar may be up to 2MiB in size.
2945 | operationId: changeUserIcon
2946 | tags:
2947 | - users
2948 | requestBody:
2949 | $ref: '#/components/requestBodies/Image'
2950 | security:
2951 | - TokenAuth: ['USER_WRITE']
2952 | responses:
2953 | "204":
2954 | description: Expected response to a valid request
2955 | "400":
2956 | description: Request was invalid, see given error
2957 | content:
2958 | application/json:
2959 | schema:
2960 | $ref: '#/components/schemas/InvalidInputError'
2961 | "404":
2962 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2963 | /user/{id|username}/projects:
2964 | parameters:
2965 | - $ref: '#/components/parameters/UserIdentifier'
2966 | get:
2967 | summary: Get user's projects
2968 | operationId: getUserProjects
2969 | tags:
2970 | - users
2971 | responses:
2972 | "200":
2973 | description: Expected response to a valid request
2974 | content:
2975 | application/json:
2976 | schema:
2977 | type: array
2978 | items:
2979 | $ref: '#/components/schemas/Project'
2980 | "404":
2981 | description: The requested item(s) were not found or no authorization to access the requested item(s)
2982 | /user/{id|username}/follows:
2983 | parameters:
2984 | - $ref: '#/components/parameters/UserIdentifier'
2985 | get:
2986 | summary: Get user's followed projects
2987 | operationId: getFollowedProjects
2988 | tags:
2989 | - users
2990 | security:
2991 | - TokenAuth: ['USER_READ']
2992 | responses:
2993 | "200":
2994 | description: Expected response to a valid request
2995 | content:
2996 | application/json:
2997 | schema:
2998 | type: array
2999 | items:
3000 | $ref: '#/components/schemas/Project'
3001 | "401":
3002 | description: Incorrect token scopes or no authorization to access the requested item(s)
3003 | content:
3004 | application/json:
3005 | schema:
3006 | $ref: '#/components/schemas/AuthError'
3007 | "404":
3008 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3009 | /user/{id|username}/payouts:
3010 | parameters:
3011 | - $ref: '#/components/parameters/UserIdentifier'
3012 | get:
3013 | summary: Get user's payout history
3014 | operationId: getPayoutHistory
3015 | tags:
3016 | - users
3017 | security:
3018 | - TokenAuth: ['PAYOUTS_READ']
3019 | responses:
3020 | "200":
3021 | description: Expected response to a valid request
3022 | content:
3023 | application/json:
3024 | schema:
3025 | $ref: '#/components/schemas/UserPayoutHistory'
3026 | "401":
3027 | description: Incorrect token scopes or no authorization to access the requested item(s)
3028 | content:
3029 | application/json:
3030 | schema:
3031 | $ref: '#/components/schemas/AuthError'
3032 | "404":
3033 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3034 | post:
3035 | summary: Withdraw payout balance to PayPal or Venmo
3036 | operationId: withdrawPayout
3037 | description: "Warning: certain amounts get withheld for fees. Please do not call this API endpoint without first acknowledging the warnings on the corresponding frontend page."
3038 | tags:
3039 | - users
3040 | security:
3041 | - TokenAuth: ['PAYOUTS_WRITE']
3042 | parameters:
3043 | - name: amount
3044 | in: query
3045 | description: Amount to withdraw
3046 | schema:
3047 | type: integer
3048 | required: true
3049 | responses:
3050 | "204":
3051 | description: Expected response to a valid request
3052 | "401":
3053 | description: Incorrect token scopes or no authorization to access the requested item(s)
3054 | content:
3055 | application/json:
3056 | schema:
3057 | $ref: '#/components/schemas/AuthError'
3058 | "404":
3059 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3060 | # Notifications
3061 | /user/{id|username}/notifications:
3062 | parameters:
3063 | - $ref: '#/components/parameters/UserIdentifier'
3064 | get:
3065 | summary: Get user's notifications
3066 | operationId: getUserNotifications
3067 | tags:
3068 | - notifications
3069 | security:
3070 | - TokenAuth: ['NOTIFICATION_READ']
3071 | responses:
3072 | "200":
3073 | description: Expected response to a valid request
3074 | content:
3075 | application/json:
3076 | schema:
3077 | type: array
3078 | items:
3079 | $ref: '#/components/schemas/Notification'
3080 | "401":
3081 | description: Incorrect token scopes or no authorization to access the requested item(s)
3082 | content:
3083 | application/json:
3084 | schema:
3085 | $ref: '#/components/schemas/AuthError'
3086 | "404":
3087 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3088 | /notification/{id}:
3089 | parameters:
3090 | - $ref: '#/components/parameters/NotificationIdentifier'
3091 | get:
3092 | summary: Get notification from ID
3093 | operationId: getNotification
3094 | tags:
3095 | - notifications
3096 | security:
3097 | - TokenAuth: ['NOTIFICATION_READ']
3098 | responses:
3099 | "200":
3100 | description: Expected response to a valid request
3101 | content:
3102 | application/json:
3103 | schema:
3104 | $ref: '#/components/schemas/Notification'
3105 | "401":
3106 | description: Incorrect token scopes or no authorization to access the requested item(s)
3107 | content:
3108 | application/json:
3109 | schema:
3110 | $ref: '#/components/schemas/AuthError'
3111 | "404":
3112 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3113 | patch:
3114 | summary: Mark notification as read
3115 | operationId: readNotification
3116 | tags:
3117 | - notifications
3118 | security:
3119 | - TokenAuth: ['NOTIFICATION_WRITE']
3120 | responses:
3121 | "204":
3122 | description: Expected response to a valid request
3123 | "401":
3124 | description: Incorrect token scopes or no authorization to access the requested item(s)
3125 | content:
3126 | application/json:
3127 | schema:
3128 | $ref: '#/components/schemas/AuthError'
3129 | "404":
3130 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3131 | delete:
3132 | summary: Delete notification
3133 | operationId: deleteNotification
3134 | tags:
3135 | - notifications
3136 | security:
3137 | - TokenAuth: ['NOTIFICATION_WRITE']
3138 | responses:
3139 | "204":
3140 | description: Expected response to a valid request
3141 | "401":
3142 | description: Incorrect token scopes or no authorization to access the requested item(s)
3143 | content:
3144 | application/json:
3145 | schema:
3146 | $ref: '#/components/schemas/AuthError'
3147 | "404":
3148 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3149 | /notifications:
3150 | parameters:
3151 | - in: query
3152 | name: ids
3153 | description: The IDs of the notifications
3154 | schema:
3155 | type: string
3156 | example: "[\"AABBCCDD\", \"EEFFGGHH\"]"
3157 | required: true
3158 | get:
3159 | summary: Get multiple notifications
3160 | operationId: getNotifications
3161 | tags:
3162 | - notifications
3163 | security:
3164 | - TokenAuth: ['NOTIFICATION_READ']
3165 | responses:
3166 | "200":
3167 | description: Expected response to a valid request
3168 | content:
3169 | application/json:
3170 | schema:
3171 | type: array
3172 | items:
3173 | $ref: '#/components/schemas/Notification'
3174 | "401":
3175 | description: Incorrect token scopes or no authorization to access the requested item(s)
3176 | content:
3177 | application/json:
3178 | schema:
3179 | $ref: '#/components/schemas/AuthError'
3180 | "404":
3181 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3182 | patch:
3183 | summary: Mark multiple notifications as read
3184 | operationId: readNotifications
3185 | tags:
3186 | - notifications
3187 | security:
3188 | - TokenAuth: ['NOTIFICATION_WRITE']
3189 | responses:
3190 | "204":
3191 | description: Expected response to a valid request
3192 | "401":
3193 | description: Incorrect token scopes or no authorization to access the requested item(s)
3194 | content:
3195 | application/json:
3196 | schema:
3197 | $ref: '#/components/schemas/AuthError'
3198 | "404":
3199 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3200 | delete:
3201 | summary: Delete multiple notifications
3202 | operationId: deleteNotifications
3203 | tags:
3204 | - notifications
3205 | security:
3206 | - TokenAuth: ['NOTIFICATION_WRITE']
3207 | responses:
3208 | "204":
3209 | description: Expected response to a valid request
3210 | "401":
3211 | description: Incorrect token scopes or no authorization to access the requested item(s)
3212 | content:
3213 | application/json:
3214 | schema:
3215 | $ref: '#/components/schemas/AuthError'
3216 | "404":
3217 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3218 | # Threads
3219 | /report:
3220 | post:
3221 | summary: Report a project, user, or version
3222 | description: Bring a project, user, or version to the attention of the moderators by reporting it.
3223 | operationId: submitReport
3224 | tags:
3225 | - threads
3226 | security:
3227 | - TokenAuth: ['REPORT_CREATE']
3228 | requestBody:
3229 | description: The report to be sent
3230 | content:
3231 | application/json:
3232 | schema:
3233 | $ref: '#/components/schemas/CreatableReport'
3234 | responses:
3235 | "200":
3236 | description: Expected response to a valid request
3237 | content:
3238 | application/json:
3239 | schema:
3240 | $ref: '#/components/schemas/Report'
3241 | "400":
3242 | description: Request was invalid, see given error
3243 | content:
3244 | application/json:
3245 | schema:
3246 | $ref: '#/components/schemas/InvalidInputError'
3247 | "401":
3248 | description: Incorrect token scopes or no authorization to access the requested item(s)
3249 | content:
3250 | application/json:
3251 | schema:
3252 | $ref: '#/components/schemas/AuthError'
3253 | get:
3254 | summary: Get your open reports
3255 | operationId: getOpenReports
3256 | tags:
3257 | - threads
3258 | security:
3259 | - TokenAuth: ['REPORT_READ']
3260 | parameters:
3261 | - in: query
3262 | name: count
3263 | schema:
3264 | type: integer
3265 | example: 100
3266 | responses:
3267 | "200":
3268 | description: Expected response to a valid request
3269 | content:
3270 | application/json:
3271 | schema:
3272 | type: array
3273 | items:
3274 | $ref: '#/components/schemas/Report'
3275 | "401":
3276 | description: Incorrect token scopes or no authorization to access the requested item(s)
3277 | content:
3278 | application/json:
3279 | schema:
3280 | $ref: '#/components/schemas/AuthError'
3281 | "404":
3282 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3283 | /report/{id}:
3284 | parameters:
3285 | - $ref: '#/components/parameters/ReportIdentifier'
3286 | get:
3287 | summary: Get report from ID
3288 | operationId: getReport
3289 | tags:
3290 | - threads
3291 | security:
3292 | - TokenAuth: ['REPORT_READ']
3293 | responses:
3294 | "200":
3295 | description: Expected response to a valid request
3296 | content:
3297 | application/json:
3298 | schema:
3299 | $ref: '#/components/schemas/Report'
3300 | "401":
3301 | description: Incorrect token scopes or no authorization to access the requested item(s)
3302 | content:
3303 | application/json:
3304 | schema:
3305 | $ref: '#/components/schemas/AuthError'
3306 | "404":
3307 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3308 | patch:
3309 | summary: Modify a report
3310 | operationId: modifyReport
3311 | tags:
3312 | - threads
3313 | security:
3314 | - TokenAuth: ['REPORT_WRITE']
3315 | requestBody:
3316 | description: What to modify about the report
3317 | content:
3318 | application/json:
3319 | schema:
3320 | type: object
3321 | properties:
3322 | body:
3323 | type: string
3324 | description: The contents of the report
3325 | example: This is the meat and potatoes of the report!
3326 | closed:
3327 | type: boolean
3328 | description: Whether the thread should be closed
3329 | responses:
3330 | "204":
3331 | description: Expected response to a valid request
3332 | "400":
3333 | description: Request was invalid, see given error
3334 | content:
3335 | application/json:
3336 | schema:
3337 | $ref: '#/components/schemas/InvalidInputError'
3338 | "401":
3339 | description: Incorrect token scopes or no authorization to access the requested item(s)
3340 | content:
3341 | application/json:
3342 | schema:
3343 | $ref: '#/components/schemas/AuthError'
3344 | "404":
3345 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3346 | /reports:
3347 | parameters:
3348 | - in: query
3349 | name: ids
3350 | description: The IDs of the reports
3351 | schema:
3352 | type: string
3353 | example: "[\"AABBCCDD\", \"EEFFGGHH\"]"
3354 | required: true
3355 | get:
3356 | summary: Get multiple reports
3357 | operationId: getReports
3358 | tags:
3359 | - threads
3360 | security:
3361 | - TokenAuth: ['REPORT_READ']
3362 | responses:
3363 | "200":
3364 | description: Expected response to a valid request
3365 | content:
3366 | application/json:
3367 | schema:
3368 | type: array
3369 | items:
3370 | $ref: '#/components/schemas/Report'
3371 | "401":
3372 | description: Incorrect token scopes or no authorization to access the requested item(s)
3373 | content:
3374 | application/json:
3375 | schema:
3376 | $ref: '#/components/schemas/AuthError'
3377 | "404":
3378 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3379 | /thread/{id}:
3380 | parameters:
3381 | - $ref: '#/components/parameters/ThreadIdentifier'
3382 | get:
3383 | summary: Get a thread
3384 | operationId: getThread
3385 | tags:
3386 | - threads
3387 | security:
3388 | - TokenAuth: ['THREAD_READ']
3389 | responses:
3390 | "200":
3391 | description: Expected response to a valid request
3392 | content:
3393 | application/json:
3394 | schema:
3395 | $ref: '#/components/schemas/Thread'
3396 | "404":
3397 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3398 | post:
3399 | summary: Send a text message to a thread
3400 | operationId: sendThreadMessage
3401 | tags:
3402 | - threads
3403 | security:
3404 | - TokenAuth: ['THREAD_WRITE']
3405 | requestBody:
3406 | description: The message to be sent. Note that you only need the fields applicable for the `text` type.
3407 | content:
3408 | application/json:
3409 | schema:
3410 | $ref: '#/components/schemas/ThreadMessageBody'
3411 | responses:
3412 | "200":
3413 | description: Expected response to a valid request
3414 | content:
3415 | application/json:
3416 | schema:
3417 | $ref: '#/components/schemas/Thread'
3418 | "400":
3419 | description: Request was invalid, see given error
3420 | content:
3421 | application/json:
3422 | schema:
3423 | $ref: '#/components/schemas/InvalidInputError'
3424 | "404":
3425 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3426 | /threads:
3427 | parameters:
3428 | - in: query
3429 | name: ids
3430 | description: The IDs of the threads
3431 | schema:
3432 | type: string
3433 | example: "[\"AABBCCDD\", \"EEFFGGHH\"]"
3434 | required: true
3435 | get:
3436 | summary: Get multiple threads
3437 | operationId: getThreads
3438 | tags:
3439 | - threads
3440 | security:
3441 | - TokenAuth: ['THREAD_READ']
3442 | responses:
3443 | "200":
3444 | description: Expected response to a valid request
3445 | content:
3446 | application/json:
3447 | schema:
3448 | type: array
3449 | items:
3450 | $ref: '#/components/schemas/Thread'
3451 | "404":
3452 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3453 | /message/{id}:
3454 | parameters:
3455 | - name: id
3456 | in: path
3457 | required: true
3458 | description: The ID of the message
3459 | schema:
3460 | type: string
3461 | example: [IIJJKKLL]
3462 | delete:
3463 | summary: Delete a thread message
3464 | operationId: deleteThreadMessage
3465 | tags:
3466 | - threads
3467 | security:
3468 | - TokenAuth: ['THREAD_WRITE']
3469 | responses:
3470 | "204":
3471 | description: Expected response to a valid request
3472 | "401":
3473 | description: Incorrect token scopes or no authorization to access the requested item(s)
3474 | content:
3475 | application/json:
3476 | schema:
3477 | $ref: '#/components/schemas/AuthError'
3478 | "404":
3479 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3480 | # Teams
3481 | /project/{id|slug}/members:
3482 | parameters:
3483 | - $ref: '#/components/parameters/ProjectIdentifier'
3484 | get:
3485 | summary: Get a project's team members
3486 | operationId: getProjectTeamMembers
3487 | tags:
3488 | - teams
3489 | responses:
3490 | "200":
3491 | description: Expected response to a valid request
3492 | content:
3493 | application/json:
3494 | schema:
3495 | type: array
3496 | items:
3497 | $ref: '#/components/schemas/TeamMember'
3498 | description: An array of team members
3499 | "404":
3500 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3501 | /team/{id}/members:
3502 | parameters:
3503 | - $ref: '#/components/parameters/TeamIdentifier'
3504 | get:
3505 | summary: Get a team's members
3506 | operationId: getTeamMembers
3507 | tags:
3508 | - teams
3509 | security:
3510 | - TokenAuth: ['PROJECT_READ']
3511 | responses:
3512 | "200":
3513 | description: Expected response to a valid request
3514 | content:
3515 | application/json:
3516 | schema:
3517 | type: array
3518 | items:
3519 | $ref: '#/components/schemas/TeamMember'
3520 | description: An array of team members
3521 | post:
3522 | summary: Add a user to a team
3523 | operationId: addTeamMember
3524 | tags:
3525 | - teams
3526 | security:
3527 | - TokenAuth: ['PROJECT_WRITE']
3528 | requestBody:
3529 | description: User to be added (must be the ID, usernames cannot be used here)
3530 | content:
3531 | application/json:
3532 | schema:
3533 | $ref: '#/components/schemas/UserIdentifier'
3534 | responses:
3535 | "204":
3536 | description: Expected response to a valid request
3537 | "401":
3538 | description: Incorrect token scopes or no authorization to access the requested item(s)
3539 | content:
3540 | application/json:
3541 | schema:
3542 | $ref: '#/components/schemas/AuthError'
3543 | "404":
3544 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3545 | /teams:
3546 | parameters:
3547 | - in: query
3548 | name: ids
3549 | description: The IDs of the teams
3550 | schema:
3551 | type: string
3552 | example: "[\"AABBCCDD\", \"EEFFGGHH\"]"
3553 | required: true
3554 | get:
3555 | summary: Get the members of multiple teams
3556 | operationId: getTeams
3557 | tags:
3558 | - teams
3559 | responses:
3560 | "200":
3561 | description: Expected response to a valid request
3562 | content:
3563 | application/json:
3564 | schema:
3565 | type: array
3566 | items:
3567 | type: array
3568 | items:
3569 | $ref: '#/components/schemas/TeamMember'
3570 | /team/{id}/join:
3571 | parameters:
3572 | - $ref: '#/components/parameters/TeamIdentifier'
3573 | post:
3574 | summary: Join a team
3575 | operationId: joinTeam
3576 | tags:
3577 | - teams
3578 | security:
3579 | - TokenAuth: ['PROJECT_WRITE']
3580 | responses:
3581 | "204":
3582 | description: Expected response to a valid request
3583 | "401":
3584 | description: Incorrect token scopes or no authorization to access the requested item(s)
3585 | content:
3586 | application/json:
3587 | schema:
3588 | $ref: '#/components/schemas/AuthError'
3589 | "404":
3590 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3591 | /team/{id}/members/{id|username}:
3592 | parameters:
3593 | - $ref: '#/components/parameters/TeamIdentifier'
3594 | - $ref: '#/components/parameters/UserIdentifier'
3595 | patch:
3596 | summary: Modify a team member's information
3597 | operationId: modifyTeamMember
3598 | tags:
3599 | - teams
3600 | security:
3601 | - TokenAuth: ['PROJECT_WRITE']
3602 | requestBody:
3603 | description: Contents to be modified
3604 | content:
3605 | application/json:
3606 | schema:
3607 | $ref: '#/components/schemas/ModifyTeamMemberBody'
3608 | responses:
3609 | "204":
3610 | description: Expected response to a valid request
3611 | "401":
3612 | description: Incorrect token scopes or no authorization to access the requested item(s)
3613 | content:
3614 | application/json:
3615 | schema:
3616 | $ref: '#/components/schemas/AuthError'
3617 | "404":
3618 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3619 | delete:
3620 | summary: Remove a member from a team
3621 | operationId: deleteTeamMember
3622 | tags:
3623 | - teams
3624 | security:
3625 | - TokenAuth: ['PROJECT_WRITE']
3626 | responses:
3627 | "204":
3628 | description: Expected response to a valid request
3629 | "401":
3630 | description: Incorrect token scopes or no authorization to access the requested item(s)
3631 | content:
3632 | application/json:
3633 | schema:
3634 | $ref: '#/components/schemas/AuthError'
3635 | "404":
3636 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3637 | /team/{id}/owner:
3638 | parameters:
3639 | - $ref: '#/components/parameters/TeamIdentifier'
3640 | patch:
3641 | summary: Transfer team's ownership to another user
3642 | operationId: transferTeamOwnership
3643 | tags:
3644 | - teams
3645 | security:
3646 | - TokenAuth: ['PROJECT_WRITE']
3647 | requestBody:
3648 | description: New owner's ID
3649 | content:
3650 | application/json:
3651 | schema:
3652 | $ref: '#/components/schemas/UserIdentifier'
3653 | responses:
3654 | "204":
3655 | description: Expected response to a valid request
3656 | "401":
3657 | description: Incorrect token scopes or no authorization to access the requested item(s)
3658 | content:
3659 | application/json:
3660 | schema:
3661 | $ref: '#/components/schemas/AuthError'
3662 | "404":
3663 | description: The requested item(s) were not found or no authorization to access the requested item(s)
3664 | # Tags
3665 | /tag/category:
3666 | get:
3667 | summary: Get a list of categories
3668 | description: Gets an array of categories, their icons, and applicable project types
3669 | operationId: categoryList
3670 | tags:
3671 | - tags
3672 | responses:
3673 | "200":
3674 | description: Expected response to a valid request
3675 | content:
3676 | application/json:
3677 | schema:
3678 | type: array
3679 | items:
3680 | $ref: '#/components/schemas/CategoryTag'
3681 | /tag/loader:
3682 | get:
3683 | summary: Get a list of loaders
3684 | description: Gets an array of loaders, their icons, and supported project types
3685 | operationId: loaderList
3686 | tags:
3687 | - tags
3688 | responses:
3689 | "200":
3690 | description: Expected response to a valid request
3691 | content:
3692 | application/json:
3693 | schema:
3694 | type: array
3695 | items:
3696 | $ref: '#/components/schemas/LoaderTag'
3697 | /tag/game_version:
3698 | get:
3699 | summary: Get a list of game versions
3700 | description: Gets an array of game versions and information about them
3701 | operationId: versionList
3702 | tags:
3703 | - tags
3704 | responses:
3705 | "200":
3706 | description: Expected response to a valid request
3707 | content:
3708 | application/json:
3709 | schema:
3710 | type: array
3711 | items:
3712 | $ref: '#/components/schemas/GameVersionTag'
3713 | /tag/license:
3714 | get:
3715 | deprecated: true
3716 | summary: Get a list of licenses
3717 | description: Deprecated - simply use SPDX IDs.
3718 | operationId: licenseList
3719 | tags:
3720 | - tags
3721 | responses:
3722 | "200":
3723 | description: Expected response to a valid request
3724 | content:
3725 | application/json:
3726 | schema:
3727 | type: array
3728 | items:
3729 | $ref: '#/components/schemas/LicenseTag'
3730 | /tag/license/{id}:
3731 | parameters:
3732 | - name: id
3733 | in: path
3734 | required: true
3735 | description: The license ID to get the text of
3736 | schema:
3737 | type: string
3738 | example: [LGPL-3.0-or-later]
3739 | get:
3740 | summary: Get the text and title of a license
3741 | operationId: licenseText
3742 | tags:
3743 | - tags
3744 | responses:
3745 | "200":
3746 | description: Expected response to a valid request
3747 | content:
3748 | application/json:
3749 | schema:
3750 | $ref: '#/components/schemas/License'
3751 | "400":
3752 | description: Request was invalid, see given error
3753 | content:
3754 | application/json:
3755 | schema:
3756 | $ref: '#/components/schemas/InvalidInputError'
3757 | /tag/donation_platform:
3758 | get:
3759 | summary: Get a list of donation platforms
3760 | description: Gets an array of donation platforms and information about them
3761 | operationId: donationPlatformList
3762 | tags:
3763 | - tags
3764 | responses:
3765 | "200":
3766 | description: Expected response to a valid request
3767 | content:
3768 | application/json:
3769 | schema:
3770 | type: array
3771 | items:
3772 | $ref: '#/components/schemas/DonationPlatformTag'
3773 | /tag/report_type:
3774 | get:
3775 | summary: Get a list of report types
3776 | description: Gets an array of valid report types
3777 | operationId: reportTypeList
3778 | tags:
3779 | - tags
3780 | responses:
3781 | "200":
3782 | description: Expected response to a valid request
3783 | content:
3784 | application/json:
3785 | schema:
3786 | type: array
3787 | items:
3788 | type: string
3789 | example: [ spam, copyright, inappropriate, malicious, name-squatting, other ]
3790 | /tag/project_type:
3791 | get:
3792 | summary: Get a list of project types
3793 | description: Gets an array of valid project types
3794 | operationId: projectTypeList
3795 | tags:
3796 | - tags
3797 | responses:
3798 | "200":
3799 | description: Expected response to a valid request
3800 | content:
3801 | application/json:
3802 | schema:
3803 | type: array
3804 | items:
3805 | type: string
3806 | example: [ mod, modpack, resourcepack, shader ]
3807 | /tag/side_type:
3808 | get:
3809 | summary: Get a list of side types
3810 | description: Gets an array of valid side types
3811 | operationId: sideTypeList
3812 | tags:
3813 | - tags
3814 | responses:
3815 | "200":
3816 | description: Expected response to a valid request
3817 | content:
3818 | application/json:
3819 | schema:
3820 | type: array
3821 | items:
3822 | type: string
3823 | example: [ required, optional, unsupported, unknown ]
3824 | # Miscellaneous
3825 | /updates/{id|slug}/forge_updates.json:
3826 | parameters:
3827 | - $ref: '#/components/parameters/ProjectIdentifier'
3828 | servers:
3829 | - url: https://api.modrinth.com
3830 | description: Production server
3831 | - url: https://staging-api.modrinth.com
3832 | description: Staging server
3833 | get:
3834 | summary: Forge Updates JSON file
3835 | operationId: forgeUpdates
3836 | description: |
3837 | If you're a Forge mod developer, your Modrinth mods have an automatically generated `updates.json` using the
3838 | [Forge Update Checker](https://docs.minecraftforge.net/en/latest/misc/updatechecker/).
3839 |
3840 | The only setup is to insert the URL into the `[[mods]]` section of your `mods.toml` file as such:
3841 |
3842 | ```toml
3843 | [[mods]]
3844 | # the other stuff here - ID, version, display name, etc.
3845 | updateJSONURL = "https://api.modrinth.com/updates/{slug|ID}/forge_updates.json"
3846 | ```
3847 |
3848 | Replace `{slug|id}` with the slug or ID of your project.
3849 |
3850 | Modrinth will handle the rest! When you update your mod, Forge will notify your users that their copy of your mod is out of date.
3851 |
3852 | Make sure that the version format you use for your Modrinth releases is the same as the version format you use in your `mods.toml`.
3853 | If you use a format such as `1.2.3-forge` or `1.2.3+1.19` with your Modrinth releases but your `mods.toml` only has `1.2.3`,
3854 | the update checker may not function properly.
3855 | tags:
3856 | - misc
3857 | responses:
3858 | "200":
3859 | description: Expected response to a valid request
3860 | content:
3861 | application/json:
3862 | schema:
3863 | $ref: '#/components/schemas/ForgeUpdates'
3864 | "400":
3865 | description: Invalid request
3866 | content:
3867 | application/json:
3868 | schema:
3869 | $ref: '#/components/schemas/InvalidInputError'
3870 | /statistics:
3871 | get:
3872 | summary: Various statistics about this Modrinth instance
3873 | operationId: statistics
3874 | tags:
3875 | - misc
3876 | responses:
3877 | "200":
3878 | description: Expected response to a valid request
3879 | content:
3880 | application/json:
3881 | schema:
3882 | $ref: '#/components/schemas/Statistics'
3883 |
--------------------------------------------------------------------------------