Getting Started
mod.io API v1
Welcome to the official documentation for mod.io, an API for developers to add mod support to their games. Using our SDKs and plugins for popular and custom game engines, getting your creator community started and making the mods they create discoverable and installable via your in-game menu is straight forward, with full cross-platform support. If you are a game developer, you can manage your games and API access via your mod.io content dashboard. If you are a user creating tools and apps, you can request API access via your mod.io account.
API path: https://api.mod.io/v1 (see your API access dashboard for the right URL to use)
Swagger JSON: https://api.mod.io/v1/swagger
Current version:
How It Works
Compatible with all builds of your game on all platforms and stores, mod.io is a clientless and standalone solution which gives you complete control over your modding ecosystem.
Implementation
Once you have added your game to mod.io and got your game ID and API key, you can start integrating the mod.io REST API into your game, tools and sites. There are 3 options to get connected which you can use interchangeably depending on your needs. Here's the breakdown of each option.
Option | Usage | Suited for | Docs |
---|---|---|---|
API | For connecting directly to the mod.io REST API. | Web apps that need a JSON REST API, or game developers that like a challenge and want control over their implementation. | You are reading them |
SDK | Drop our open source C/C++ SDK into your game to call mod.io functionality. | Game developers that want a SDK that abstracts the uploading, downloading and unzip flows behind easy to use function calls. | Here |
Tools/Plugins | Use tools, plugins and wrappers created by the community to make implementation in various engines easy. | Game developers that want a pre-built modding solution for their engine (Unity, Unreal, GameMaker, Construct) of choice. | Available below |
Official Tools
Plugins and wrappers made or supported by the mod.io team
- | - | - | |
---|---|---|---|
![]() |
Unity Plugin SDK Getting Started |
![]() |
Unreal Plugin SDK Getting Started |
![]() |
GameMaker SDK Getting Started |
![]() |
C/C++ SDK SDK Getting Started |
![]() |
Discord Bot Instructions Invite |
Community Tools
Plugins and wrappers made by our awesome community. Is there a tool out there that should be added to the list? Get in touch!
- | - | - | |
---|---|---|---|
![]() |
Construct 2 Plugin SDK Getting Started |
![]() |
Haxe Wrapper SDK Getting Started |
![]() |
Modio.NET SDK Getting Started |
![]() |
Rust Wrapper SDK Getting Started Tutorials |
![]() |
Python Wrapper SDK Getting Started Tutorials |
![]() |
Common Lisp Github Getting Started |
![]() |
Command Line Tool CMD Getting Started |
![]() |
GitHub Action Mod Uploader GitHub Usage |
Here is a brief list of the things to know about our API, as explained in more detail in the following sections.
- All requests to the API must be made over HTTPS (TLS).
- All API responses are in
application/json
format. - Any POST request with a binary payload must supply the
Content-Type: multipart/form-data
header. - Any non-binary POST, PUT and DELETE requests must supply the
Content-Type: application/x-www-form-urlencoded
header. - Any non-binary payload can be supplied in JSON format using the
input_json
parameter.
Authentication
Authentication can be done via 5 ways:
- Use an API key for Read-only access
- Use the Email Authentication Flow for Read and Write access (it creates an OAuth 2 Access Token via email)
- Use the Platform Authentication Flow for Read and Write access (it creates an OAuth 2 Access Token automatically on popular platforms such as Steam and Xbox)
- Use the OpenID Authentication Flow for Read and Write access (it creates an OAuth 2 Access Token automatically using your identity provider for SSO)
- Manually create an OAuth 2 Access Token for Read and Write access
All users and games are issued an API key which must be included when querying the API. It is quick and easy to use but limited to read-only GET requests, due to the limited security it offers. If you want players to be able to add, edit, rate and subscribe to content, you will need to use an authentication method that generates an OAuth 2 Access token. These authentication methods are explained in detail here.
Authentication Type | In | HTTP Methods | Abilities | Purpose |
---|---|---|---|---|
API Key | Query | GET | Read-only GET requests and authentication flows. | Browsing and downloading content. Retrieving access tokens on behalf of users. |
Access Token (OAuth 2) | Header | GET, POST, PUT, DELETE | Read, create, update, delete. | View, add, edit and delete content the authenticated user has subscribed to or has permission to change. |
You can use an OAuth 2.0 bearer token instead of an API key for GET endpoints (excluding Authentication endpoints). But remember, if you provide both an Access Token (OAuth 2) and an API key in one request, the access token takes precedence and the API key is ignored. So, always ensure you use a valid access token and have the process in place to get a new token when the old one expires.
Web Overlay Authentication
At the moment it is not possible to open the mod.io website in-game with the user pre-authenticated, however you can provide a hint by appending ?portal=PORTAL
to the end of the URL. What this tells mod.io, is that when the user attempts to perform an action that requires authentication, they will be prompted to login with their PORTAL
account. For example if you want to take a mod creator to their mod webpage in-game on Steam, the URL would look something like: https://mod.io/g/gamename/m/modname?portal=steam
. You can optionally add &login=auto
as well to automatically start the login process. Supported portals can be found here.
Scopes (OAuth 2)
mod.io allows you to specify the permission each access token has (default is read+write), this is done by the use of scopes. See below for a full list of scopes available, you must include at least one scope when generating a new token.
Scope | Abilities |
---|---|
read |
When authenticated with a token that only contains the read scope, you will only be able to read data via GET requests. |
write |
When authenticated with a token that contains the write scope, you are able to add, edit and remove resources. |
read+write |
The above scopes combined. Default for email and external ticket verification flow. |
Making Requests
Requests to the mod.io API are to be over HTTPS (Port 443), any requests made over HTTP will return a 400 Bad Request
response.
Using an API Key
curl -X get https://api.mod.io/v1/games?api_key=xxxxxxxxxxxxxxxx
To authenticate using your unique 32-character API key, append the api_key=xxxxxxxxxxxxxxxx
parameter to the end of your request. Remember that using an API key means requests are read-only, if you want to create, update or delete resources - authentication via OAuth 2 is required which you can set up with your api key.
Using an Access Token
Example POST request with no binary files
curl -X POST https://api.mod.io/v1/games/1/mods/1/tags \
-H 'Authorization: Bearer your-token-here' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'tags[]=Unity' \
-d 'tags[]=FPS'
To authenticate using an OAuth 2 access token, you must include the HTTP header Authorization
in your request with the value Bearer your-token-here. Verification via Access Token allows much greater power including creating, updating and deleting resources that you have access to. Also because OAuth 2 access tokens are tied to a user account, you can personalize the output by viewing content they are subscribed and connected to via the me endpoint and by using relevant filters.
Access Token Lifetime & Expiry
By default, all access token's are long-lived - meaning they are valid for a common year (not leap year) from the date of issue. You should architect your application to smoothly handle the event in which a token expires or is revoked by the user themselves or a mod.io admin, triggering a 401 Unauthorized
API response.
If you would like tokens issued through your game to have a shorter lifespan, you can do this by providing the date_expires
parameter on any endpoint that returns an access token such as the Email Exchange or Authenticate via Steam endpoints. If the parameter is not supplied, it will default to 1 year from the request date, if the supplied parameter value is above one year or below the current server time it will be ignored and the default value restored.
Request Content-Type
If you are making a request that includes a file, your request Content-Type
header must be multipart/form-data
, otherwise if the request contains data (but no files) it should be application/x-www-form-urlencoded
, which is UTF-8 encoded.
Example POST request with binary file
curl -X POST https://api.mod.io/v1/games/1/mods \
-H 'Authorization: Bearer your-token-here' \
-H 'Content-Type: multipart/form-data' \
-F 'logo=@path/to/image.jpg' \
-F 'name=Rogue Knight Clear Skies' \
-F 'homepage=http://www.clearsies-rk.com/' \
-F 'summary=It rains in Rogue Knight an awful lot, want sunshine all the time? Yeah you do.'
Body Contains | Method | Content-Type |
---|---|---|
Binary Files | POST | multipart/form-data |
Non-Binary Data | POST, PUT, DELETE | application/x-www-form-urlencoded |
Nothing | GET | No Content-Type required. |
If the endpoint you are making a request to expects a file it will expect the correct Content-Type
as mentioned. Supplying an incorrect Content-Type
header will return a 415 Unsupported Media Type
response.
JSON Request Data
Example json-encoded POST request
curl -X POST https://api.mod.io/v1/games/1/mods/1/team \
-H 'Authorization: Bearer your-token-here' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'input_json={
"email": "developers@mod.io",
"level": 8,
"position": "King in the North"
}'
For POST & PUT requests that do not submit files you have the option to supply your data as HTTP POST parameters, or as a UTF-8 encoded JSON object inside the parameter input_json
which contains all payload data. Regardless, whether you use JSON or not the Content-Type
of your request still needs to be application/x-www-form-urlencoded
with the data provided in the body of the request.
NOTE: If you supply identical key-value pairs as a request parameter and also as a parameter in your JSON object, the JSON object will take priority.
Response Content-Type
Responses will always be returned in application/json
format.
Response Codes
Here is a list of the most common HTTP response codes you will see while using the API.
Response Code | Meaning |
---|---|
200 |
OK -- Your request was successful. |
201 |
Created -- Resource created, inspect Location header for newly created resource URL. |
204 |
No Content -- Request was successful and there was no data to be returned. |
400 |
Bad Request -- Server cannot process the request due to malformed syntax or invalid request message framing. |
401 |
Unauthorized -- Your API key/access token is incorrect, revoked, or expired. |
403 |
Forbidden -- You do not have permission to perform the requested action. |
404 |
Not Found -- The requested resource could not be found. |
405 |
Method Not Allowed -- The method of your request is incorrect. |
406 |
Not Acceptable -- You supplied or requested an incorrect Content-Type. |
409 |
Conflict -- The request could not be completed due to a competing request (duplicate POST requests). |
422 |
Unprocessable Entity -- The request was well formed but unable to be followed due to semantic errors. |
429 |
Too Many Requests -- You have made too many requests, inspect headers for reset time. |
500 |
Internal Server Error -- The server encountered a problem processing your request. Please try again. (rare) |
503 |
Service Unavailable -- We're temporarily offline for maintenance. Please try again later. (rare) |
Errors
Error object
"error": {
"code": 403,
"error_ref": 15024,
"message": "You do not have the required permissions to access this resource."
}
If an error occurs, mod.io returns an error object with the HTTP code
, error_ref
and message
to describe what happened and when possible how to avoid repeating the error. It's important to know that if you encounter errors that are not server errors (500
+ codes) - you should review the error message before continuing to send requests to the endpoint.
When requests contain invalid input data or query parameters (for filtering), an optional field object called errors
can be supplied inside the error
object, which contains a list of the invalid inputs. The nested errors
object is only supplied with 422 Unprocessable Entity
responses. Be sure to review the Response Codes to be aware of the HTTP codes that the mod.io API returns.
Error object with input errors
"error": {
"code": 422,
"error_ref": 13009,
"message": "Validation Failed. Please see below to fix invalid input.",
"errors": {
"summary":"The mod summary cannot be more than 200 characters long.",
}
}
Remember that Rate Limiting applies whether an error is returned or not, so to avoid exceeding your daily quota be sure to always investigate error messages - instead of continually retrying.
Error Codes
Along with generic HTTP response codes, we also provide mod.io specific error codes to help you better understand what has gone wrong with a request. Below is a list of the most common error_ref
codes you could encounter when consuming the API, as well as the reason for the error occuring. For error codes specific to each endpoint, click the 'Show All Responses' dropdown on the specified endpoint documentation.
Example request with malformed api_key
curl -X GET https://api.mod.io/v1/games?api_key=malformed_key
{
"error": {
"code": 401,
"error_ref": 11001,
"message": "We cannot complete your request due to a malformed/missing api_key in your request. Refer to documentation at https://docs.mod.io"
}
}
Error Reference Code | Meaning |
---|---|
10000 |
mod.io is currently experiencing an outage. (rare) |
10001 |
Cross-origin request forbidden. |
10002 |
mod.io failed to complete the request, please try again. (rare) |
10003 |
API version supplied is invalid. |
11000 |
api_key is missing from your request. |
11001 |
api_key supplied is malformed. |
11002 |
api_key supplied is invalid. |
11003 |
Access token is missing the write scope to perform the request. |
11004 |
Access token is missing the read scope to perform the request. |
11005 |
Access token is expired, or has been revoked. |
11006 |
Authenticated user account has been deleted. |
11007 |
Authenticated user account has been banned by mod.io admins. |
11008 |
You have been ratelimited globally for making too many requests. See Rate Limiting. |
11009 |
You have been ratelimited from calling this endpoint again, for making too many requests. See Rate Limiting. |
13001 |
The submitted binary file is corrupted. |
13002 |
The submitted binary file is unreadable. |
13004 |
You have used the input_json parameter with semantically incorrect JSON. |
13005 |
The Content-Type header is missing from your request. |
13006 |
The Content-Type header is not supported for this endpoint. |
13007 |
You have requested a response format that is not supported (JSON only). |
13009 |
The request contains validation errors for the data supplied. See the attached errors field within the Error Object to determine which input failed. |
14000 |
The requested resource does not exist. |
14001 |
The requested game could not be found. |
14006 |
The requested game has been deleted. |
15010 |
The requested modfile could not be found. |
15022 |
The requested mod could not be found. |
15023 |
The requested mod has been deleted. |
15026 |
The requested comment could not be found. |
17000 |
The requested user could not be found. |
Response Formats
Single object response
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "f9a7bf4a95ce20787337b685a79677cae2281b83c63ab0a25f091407741692af-1508147401",
"filesize": 15181,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd-textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download",
"date_expires": 1579316848
}
}
The way in which mod.io formats responses is entirely dependant on whether the requesting endpoint is returning a single item or a collection of items.
Single item Responses
For single items, mod.io returns a single JSON object which contains the requested resource. There is no nesting for single responses.
Multiple item Responses
Endpoints that return more than one result, return a JSON object which contains a data array and metadata fields:
-
data
- contains all data returned from the request. - metadata fields - contains pagination metadata to help you paginate through the API.
Multiple objects response
{
"data": [
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "f9a7bf4a95ce20787337b685a79677cae2281b83c63ab0a25f091407741692af-1508147401",
"filesize": 15181,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd-textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
}
},
{
...
},
],
"result_count": 100,
"result_limit": 100,
"result_offset": 0,
"result_total": 127
}
Status & Visibility
To manage games and mods via the API we use the fields status
and visible
. The values of these fields determines what is returned in API requests, so it is important to understand who is authorized to view what content.
Visible attribute states & privileges
Only mods use the visible
attribute allowing mod admins to control their availability. Public is the default value:
Meaning | Value | Description | Modify Authorization | Filter Authorization |
---|---|---|---|---|
Hidden | 0 | Resource is hidden and not returned when browsing. If requested directly it will be returned provided the user is an admin or subscribed to the content. All resources are always returned via the /me endpoints. |
Game & Mod Admins | Game & Mod Admins |
Public | 1 | Resource is visible and returned via all endpoints. | Game & Mod Admins | Everyone |
Status attribute states & privileges
Games and mods use the status
attribute allowing game admins to control their availability. For mods this is important because it allows game admins to control which mods are available without changing the visible
value set by the mod admin. Not accepted is the default value until changed by a game admin, or if a file is added to a mods profile it will be moved to an accepted state (provided the game developer has elected "not to curate" new mods):
Meaning | Value | Description | Modify Authorization | Filter Authorization |
---|---|---|---|---|
Not Accepted | 0 | Resource is not accepted and not returned when browsing. Games will be returned if requested directly provided the user is an admin or the api_key used belongs to the game.Mods will be returned if requested directly provided the user is an admin or subscribed to the content. All resources are always returned via the /me endpoints. |
Game Admins Only | Game Admins Only |
Accepted | 1 | Resource is accepted and returned via all endpoints. | Game Admins Only | Everyone |
Deleted | 3 | Resource is deleted and only returned via the /me endpoints. | Game Admins Only | Game Admins Only |
Game admin privileges
As a game admin, you can modify your games status
to show or hide it from API requests. When a game is not accepted you can still view it provided you are the games admin or using the games api_key
. You can call Get User Games endpoint to retrieve all games associated with the authenticated user regardless of their status
.
By default mods connected to a game will not be returned if they are hidden or not accepted. As a game admin, you can modify a mods status
and visible
fields and filter by these values (to view content normal users cannot see). We recommend you only change the status
and let mod admins control the visible
field.
Mod admin privileges
As a mod admin, you can modify visible
to show or hide your mod from API requests. You cannot modify the status
of your mod. When a mod is hidden you can still view it provided you are the mods admin or subscribed to the mod. You can call Get User Mods endpoint to retrieve all mods associated with the authenticated user regardless of their status
and visible
.
Valid status & visibility filters
status=1
status-in=0,1
visible=1
visible-in=0,1
Game Admin Only status & visibility filters
status-not-in=1,2
status-gt=1
visible-not-in=1
visible-st=1
Important Note When Filtering
Due to the requirement of certain status
& visible
values only being available to administrators. We have restricted the amount of filters available for non-game admins and thus for both of these fields only direct matches = and -in are permitted. Attempting to apply game admin filters without the required permissions will result in a 403 Forbidden
error response.
Pagination
When requesting data from endpoints that contain more than one object, you can supply an _offset
and _limit
to paginate through the results. Think of it as a page 1, 2, 3... system but you control the number of results per page, and the page to start from. Appended to each response will be the pagination metadata:
Metadata example
"result_count": 100,
"result_limit": 100,
"result_offset": 0,
"result_total": 127
Parameter | Value |
---|---|
result_count |
Number of results returned in the current request. |
result_limit |
Maximum number of results returned. Defaults to 100 unless overridden by _limit . |
result_offset |
Number of results skipped over. Defaults to 0 unless overridden by _offset . |
result_total |
Total number of results found. |
_limit (Limit)
v1/games?_limit=5
Limit the number of results for a request. By default 100 results are returned per request:
-
?_limit=5
- Limit the request to 5 individual results.
_offset (Offset)
v1/games?_offset=30
Use _offset
to skip over the specified number of results, regardless of the data they contain. This works the same way offset does in a SQL query:
-
?_offset=30
- Will retrieve 100 results after ignoring the first 30 (31 - 130).
Combining offset with a limit
v1/games?_offset=30&_limit=5
You can combine offset with a limit to build queries that return exactly the number of results you want:
-
?_offset=30&_limit=5
- Will retrieve 5 results after ignoring the first 30 (31 - 35).
If the result_count
parameter matches the result_limit
parameter (5 in this case) in the response, that means there are probably more results to get, so our next query might be:
-
?_offset=35&_limit=5
- Will retrieve the next 5 results after ignoring the first 35 (36 - 40).
Sorting
All endpoints are sorted by the id
column in ascending order by default (oldest first). You can override this by including a _sort
with the column you want to sort by in the request. You can sort on all columns in the parent object only. You cannot sort on columns in nested objects, so if a game contains a tags object you cannot sort on the tag name
column, but you can sort by the games name
since the games name
resides in the parent object.
_sort (Sort)
v1/games?_sort=name
Sort by a column, in ascending or descending order.
?_sort=name
- Sortname
in ascending order?_sort=-name
- Sortname
in descending order (by prepending a-
)
Filtering
mod.io has powerful filtering available to assist you when making requests to the API. You can filter on all columns in the parent object only. You cannot apply filters to columns in nested objects, so if a game contains a tags object you cannot filter by the tag name
column, but you can filter by the games name
since the games name
resides in the parent object.
or fields (Filter grouping)
By default, multiple filters are combined using an "AND" operation. However, with or_fields, you can group filters together to be combined using an "OR" operation.
For example, if you want to find all mods that have been tagged with "Level" but also include mods made by the creator "UltimateModder", you can achieve this with the following query parameters:
v1/games/your-game/mods?tags=level&submitted_by_display_name=UltimateModder&or_fields[]=tags,submitted_by_display_name
This would be interpreted as "Fetch all mods where (tags in level OR submitted_by like UltimateModder)". Without the or_fields
parameter, it would be treated as AND.
A few things to note:
- The
or_fields
parameter must be provided as an array. - A maximum of 2
or_fields
can be present in a query at any time. - A maximum of 3 fields per
or_fields
.
_q (Full text search)
v1/games?_q=Gravity Bounce
Full-text search is a lenient search filter that is only available if the endpoint you are querying contains a name
column. Wildcards should not be applied to this filter as they are ignored.
-
?_q=Gravity Bounce
- This will return every result where thename
column contains any of the following words: 'Gravity', 'Bounce'.
= (Equals)
v1/games?id=10
The simplest filter you can apply is columnname
equals. This will return all rows which contain a column matching the value provided.
-
?id=10
- Get all results where theid
column value is 10.
-not (Not Equal To)
v1/games?curation-not=1
Where the preceding column value does not equal the value specified.
-
?curation-not=1
- Where thecuration
column does not equal 1.
-lk (Like + Wildcards)
v1/games?name-lk=texture
v1/games?name-lk=texture*
v1/games?name-lk=*texture*
Where the string supplied matches the preceding column value. This is equivalent to SQL's LIKE
. Wildcard's *
can be used to find content that partially matches as described below.
-
?name-lk=texture
- Get all results where thename
column value is 'texture'. -
?name-lk=texture*
- Get all results where thename
column value begins with 'texture'. This means the query would return results for 'texture', 'textures' and 'texture pack' -
?name-lk=*texture*
- Get all results where thename
column value contains 'texture'. This means the query would return results for 'texture', 'HD textures' and 'armor texture pack'
-not-lk (Not Like + Wildcards)
v1/games?name-not-lk=dungeon
Where the string supplied does not match the preceding column value. This is equivalent to SQL's NOT LIKE
. Wildcard's *
can be used as described above.
-
?name-not-lk=dungeon
- Get all results where thename
column value is not 'dungeon'.
-in (In)
v1/games?id-in=3,11,16,29
Where the supplied list of values appears in the preceding column value. This is equivalent to SQL's IN
.
-
?id-in=3,11,16,29
- Get all results where theid
column value is 3, 11, 16 and 29.
-not-in (Not In)
v1/games?modfile-not-in=8,13,22
Where the supplied list of values does not equal the preceding column value. This is equivalent to SQL's NOT IN
-
?modfile-not-in=8,13,22
- Get all results whereid
column does not equal 8, 13 and 22.
-max (Smaller Than or Equal To)
v1/games?game-max=40
Where the preceding column value is smaller than or equal to the value specified.
-
?game-max=40
- Get all results where thegame
smaller than or equal to 40.
-min (Greater Than or Equal To)
v1/games?game-min=20
Where the preceding column value is greater than or equal to the value specified.
-
?game-min=20
- Get all results where thegame
column is greater than or equal to 20.
-bitwise-and (Bitwise AND)
v1/games?maturity_option-bitwise-and=5
Some columns are stored as bits within an integer. Their value depends on the bits selected. For example, suppose a column has 4 options:
- 1 = Option A
- 2 = Option B
- 4 = Option C
- 8 = Option D
You can combine any of these options by adding them together which means there are (2 ^ 4 = 16 possible combinations). For example Option A (1) and Option C (4) would be (1 + 4 = 5), Option A (1), Option C (4) and Option D (8) would be (1 + 4 + 8 = 13), all Options together would be (1 + 2 + 4 + 8 = 15).
The number of combinations makes using equals, in and other filters a little complex. To solve this we support Bitwise AND (&) which makes it easy to match a column which contains any of the options you want.
-
?maturity_option-bitwise-and=5
- Will match thematurity_option
column values 1, 3, 4, 5, 6, 7, 9, 11, 12, 13, 14, 15 (since these values contain the bits 1, 4 or both).
Localization
Localized Responses
Example HTTP Header Request
---------------------
HTTP/2.0 200 OK
...
...
Accept-Language: de
Example response (assuming a validation error occurred)
{
"error": {
"code": 422,
"message": "Überprüfung fehlgeschlagen. Bitte lesen Sie unten, um ungültige Eingaben zu korrigieren:",
"errors": {
"name": "Name darf maximal 50 Zeichen haben."
}
}
}
The mod.io API provides localization for a collection of languages. To specify responses from the API to be in a particular language, simply provide the Accept-Language
header with an ISO 639 compliant language code. If a valid language code is not provided and the user is authenticated, the language they have selected in their profile will be used. All other requests will default to English (US). The list of supported codes includes:
Language Code | Language |
---|---|
en |
English (US) default |
bg |
Bulgarian |
fr |
French |
de |
German |
id |
Indonesian |
it |
Italian |
pl |
Polish |
pt |
Portuguese |
hu |
Hungarian |
ja |
Japanese |
ko |
Korean |
ru |
Russian |
es |
Spanish (Spain) |
es-419 |
Spanish (Latin America) |
th |
Thai |
tr |
Turkish |
uk |
Ukrainian |
zh-CN |
Chinese (Simplified) |
zh-TW |
Chinese (Traditional) |
Example request updating specified fields with Polish translations.
curl -X POST https://api.mod.io/v1/games/1/mods/1 \
-H 'Authorization: Bearer your-token-here' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Content-Language: pl' \
-d 'name=Zaawansowany rozkwit Wiedźmina' \
-d 'summary=Zobacz zaawansowany mod oświetlenia w Kaer Morhen w zupełnie nowym świetle'
Attempt to retrieve Polish translations within supported fields.
curl -X GET https://api.mod.io/v1/games/1/mods/1 \
-H 'Authorization: Bearer your-token-here' \
-H 'Accept-Language: pl'
NOTE: Localization for mod.io is currently a work-in-progress and thus not all responses may be in the desired language.
Response
{
"id": 1,
"game_id": 1,
...
"name": "Zaawansowany rozkwit Wiedźmina",
"summary": "Zobacz zaawansowany mod oświetlenia w Kaer Morhen w zupełnie nowym świetle"
}
Localized Requests
Specific endpoints also allow you to submit fields in the supported languages above. To tell the API you are submitting
non-english content you must supply the Content-Language
header in the request with a valid language code (see above). When you supply the Content-Language
header in your request, you are explicitly indicating to the API that all eligible fields have been translated into the supplied language and if a user (or client) requests the respective language, the value for that supplied field will be returned.
A brief summary when dealing with localized requests and responses:
- English is still required as the default value when creating and updating a resource.
- If you don't supply a valid
Content-Language
header value, all input data will be assumed English. - If you don't supply a valid
Accept-Language
header value, all response data will be in English. - If you supply a valid
Accept-Language
header value, all response data will be in English unless translations exist in the requested language. - Only fields that contain the localization icon in the parameter section of the endpoint can be submitted in different languages.
Rate Limiting
mod.io implements rate limiting to stop users abusing the service. Exceeding the rate limit will result in requests receiving a 429 Too Many Requests
response until the reset time is reached.
It is highly recommended you architect your app to check for the 429 Too Many Requests
HTTP response code, and ensure you do not continue to make requests until the duration specified in the retry-after
header (in seconds) passes. Be aware we enforce global rate limits which will result in all requests being blocked (error ref 11008). We also enforce per-endpoint rate limits which will only result in requests to that endpoint being blocked (error ref 11009) until the duration specified in the retry-after
header (in seconds) passes, allowing you to continue to call other endpoints. Users who continue to send requests despite a 429
response could potentially have their credentials revoked. The following limits are implemented by default:
Global API key Rate Limiting
- API keys linked to a game have unlimited requests.
- API keys linked to a user have 60 requests per minute.
Global OAuth2 Rate Limiting
- User tokens are limited to 120 requests per minute.
- User token writes are limited to 60 requests per minute.
Global IP Rate Limiting
- IPs are limited to 1000 requests per minute.
- IP writes are limited to 60 requests per minute.
Per-Endpoint Rate Limiting
- Certain endpoints may override the defaults for security, spam or other reasons.
- When this (error ref 11009) is encountered, its ok to continue requesting other endpoints, as the
retry-after
only applies to this endpoint.
Headers
Example HTTP Header Response
---------------------
HTTP/2.0 429 Too Many Requests
...
...
retry-after: 57
Example ratelimit JSON response
{
"error": {
"code": 429,
"error_ref": 11008,
"message": "You have made too many requests in a short period of time, please wait and try again soon."
}
}
If the rate limit is exceeded, the following header will be returned alongside the 429 Too Many Requests
HTTP response code.
-
retry-after
- Number of seconds before you can attempt to make another request to API. NOTE: If theretry-after
value is 0, that means you have hit a rolling ratelimit. Rolling ratelimits don't block for a set timeframe once the limit is reached, instead they permit a certain number of requests within the timeframe (see this explanation). If you encounter a 0, we recommend retrying the endpoint again after 60 seconds.
Deprecation Notice
From November 20th, 2022 - the rate limit headers below will no longer be returned. If you have written a custom mod.io SDK or library, you should replace any usage of these headers with retry-after
.
-
X-RateLimit-Limit
- Number of requests you can make from the supplied API key/access token per minute. -
X-RateLimit-Remaining
- Number of requests remaining until requests are rejected. -
X-RateLimit-RetryAfter
- Amount of seconds until reset once you have been throttled (Only returned once rate limit exceeded).
From January 1st, 2024 - the error ref 11009 will be returned when a rate limit applies only to the endpoint being called. Error ref 11008 will continue to be returned in all other scenarios where the rate limit applies to all endpoints.
Optimize your requests
You should always plan to minimize requests and cache API responses. It will make your app feel fluid and fast for your users. If your usage is excessive we shall reach out to discuss ways of optimizing, but our aim is to never restrict legitimate use of the API. We have set high limits that should cover 99% of use-cases, and are happy to discuss your scenario if you require more.
Testing
To help familiarize yourself with the mod.io API and to ensure your implementation is battle-hardened and operating as intended, you can setup test games profiles on mod.io which will be available via your content. By default all game profiles are hidden and accessible only by users who you add to the games team, or invite using the preview system. This is until you set a game live, which will make it accessible for everyone.
Each game added will be assigned it's own api_url
, api_key
and game_id
. When switching between game builds (i.e. production, test, staging) you will need to ensure each build is pointing to the right game profile on mod.io.
Note: If your game is in stealth, we recommend using codenames and non-descriptive screenshots when uploading content. While your game won't be shown as long as it remains hidden, content connected to your game may appear in the profile of users who you have given permission to interact with it, including your own profile.
Whitelabel
If you are a large studio or publisher and require a private, in-house, custom solution that accelerates your time to market with a best-in-class product, reach out to developers@mod.io to discuss the licensing options available.
Contact
If you spot any errors within the mod.io documentation, have feedback on how we can make it easier to follow or simply want to discuss how awesome mods are, feel free to reach out to developers@mod.io or come join us in our discord channel. We are here to help you grow and maximise the potential of mods in your game.
Platforms
Targeting a Platform
mod.io supports mods on all platforms. Games can enable per-platform mod file support in their dashboard, if they wish to control which platforms each mod and their corresponding files can be accessed on. Otherwise, all mods and their files will be available on all platforms the game supports. To make this system work, it's important the following headers are included in all API requests as explained below. If you have any questions about setting up cross-platform mod support in your game, please reach out to developers@mod.io.
When making API requests you should include the X-Modio-Platform
header (with one of the values below), to tell mod.io what Platform the request is originating from. This header is important because it enables mod.io to return data that is approved for the platform such as:
- Supported mods and files
- Supported tags the player can filter on
- Localization of content for the platform
- It also enables platform specific metrics
For example, passing the HTTP header X-Modio-Platform: xboxseriesx
in your API request tells mod.io your player is on Xbox Series X.
Official mod.io Plugins and SDKs will automatically supply this value for you providing you have specified the correct platform in the tools' settings. We strongly recommend you supply this header in every request with the correct platform to enable mod.io to provide the best cross-platform experience for your players. Please see a list of supported platforms below:
Target Platform | Header Value |
---|---|
Source | source |
Windows | windows |
Mac | mac |
Linux | linux |
Android | android |
iOS | ios |
Xbox One | xboxone |
Xbox Series X | xboxseriesx |
PlayStation 4 | ps4 |
PlayStation 5 | ps5 |
Switch | switch |
Oculus | oculus |
These are the only supported values and are case-insensitive, anything else will be ignored and default to windows
. Have we missed a platform you are using? Get in touch!
Targeting a Portal
When making API requests you should include the X-Modio-Portal
header (with one of the values below), to tell mod.io what Portal (eg. Store or App) the request is originating from. This header is important because it enables mod.io to fine-tune the experience, such as returning display names used by players on that portal (which can be a certification requirement).
For example, passing the HTTP header X-Modio-Portal: epicgames
in your API request tells mod.io your player is coming via the Epic Games Store.
You can also instruct the mod.io website to authenticate the player using a portal from the list above (provided it is supported), as explained in Web Overlay Authentication. For example, if your game client has logged the player into mod.io on PlayStation using their PlayStation™Network account, and you want to open the mod.io website in-game with the player logged in using the same authentication method, you would add ?portal=psn
to the end of the URL: https://mod.io/g/gamename?portal=psn
. You can optionally add &login=auto
as well to automatically start the login process.
Target Portal | Header Value |
---|---|
Apple | apple |
Discord | discord |
Epic Games Store | epicgames |
facebook |
|
GOG | gog |
google |
|
itch.io | itchio |
Nintendo | nintendo |
PlayStation™Network | psn |
SSO | sso |
Steam | steam |
Xbox Live | xboxlive |
These are the only supported values and are case-insensitive, anything else will be ignored. Have we missed a portal you are using? Get in touch!
Authentication
Terms
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/authenticate/terms?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/authenticate/terms?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/authenticate/terms',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/authenticate/terms?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/authenticate/terms', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/authenticate/terms?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /authenticate/terms
The purpose of this endpoint is to provide the text, links and buttons you can use to get a users agreement and consent prior to authenticating them in-game (your dialog should look similar to the example below). This text will be localized based on the Accept-Language
header, into one of our supported languages (note: our full Terms of Use and Privacy Policy are currently in English-only). If you are authenticating using platform SSO, you must call this endpoint with the X-Modio-Portal
header set, so the text is localized to match the platforms requirements. A successful response will return a Terms Object.
Example Dialog:
IMPORTANT: It is a requirement of the Game Terms with mod.io, and the platforms mod.io is used on, to ensure the user provides consent and has agreed to the latest mod.io Terms of Use and Privacy Policy. The users agreement must be collected prior to using a 3rd party authentication flow (including but not limited to Steam, PSN, Nintendo and Xbox Live). You only need to collect the users agreement once, and also each time these policies are updated.
To make this easy to manage, all of the 3rd party authentication flows have a terms_agreed
field which should be set to false
by default. If the user has agreed to the latest policies, their authentication will proceed as normal, however if their agreement is required and terms_agreed
is set to false
an error 403 Forbidden (error_ref 11074)
will be returned. When you receive this error, you must collect the users agreement before resubmitting the authentication flow with terms_agreed
set to true
, which will be recorded.
NOTE: You must make sure the Terms of Use and Privacy Policy are correctly linked, or displayed inline using the agreements endpoints to get the latest versions.
If you wish to display the agreements in a web browser overlay, we recommend adding /widget and ?no_links=true to the end of the agreement URLs, to remove the menus and external links, for example:
- https://mod.io/terms/widget?no_links=true
- https://mod.io/privacy/widget?no_links=true
NOTE: You can use your own text and process, but be aware that you are responsible for ensuring that the users agreement is properly collected and reported. Failure to do so correctly is a breach of the mod.io Game Terms. If your game does not authenticate users or only uses the email authentication flow, you do not need to implement this dialog, but you should link to the mod.io Terms of Use and Privacy Policy in your Privacy Policy/EULA.
Example response
{
"plaintext": "This game uses mod.io to support user-generated content. By selecting "I Agree" you agree to the mod.io Terms of Use and a mod.io account will be created for you (using your display name, avatar and ID). Please see the mod.io Privacy Policy on how mod.io processes your personal data.",
"html": "<p>This game uses <a href="https://mod.io">mod.io</a> to support user-generated content. By selecting "I Agree" you agree to the mod.io <a href="https://mod.io/terms">Terms of Use</a> and a mod.io account will be created for you (using your display name, avatar and ID). Please see the mod.io <a href="https://mod.io/privacy">Privacy Policy</a> on how mod.io processes your personal data.</p>",
"buttons": {
"agree": {
"text": "I Agree"
},
"disagree": {
"text": "No, Thanks"
}
},
"links": {
"website": {
"text": "Website",
"url": "https://mod.io",
"required": false
},
"terms": {
"text": "Terms of Use",
"url": "https://mod.io/terms",
"required": true
},
"privacy": {
"text": "Privacy Policy",
"url": "https://mod.io/privacy",
"required": true
},
"refund": {
"text": "Refund Policy",
"url": "https://mod.io/privacy",
"required": false
},
"manage": {
"text": "Manage Account",
"url": "https://mod.io/me/account",
"required": false
}
}
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Terms Object |
Steam
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/steamauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'appdata=NDNuZmhnaWdyaGdqOWc0M2o5eTM0aGc=' \
--data-urlencode 'terms_agreed=true' \
--data-urlencode 'email=example@mod.io' \
--data-urlencode 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/steamauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/steamauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"appdata": "NDNuZmhnaWdyaGdqOWc0M2o5eTM0aGc=",
"terms_agreed": true,
"email": "example@mod.io",
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/steamauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/steamauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/steamauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/steamauth
Request an access token on behalf of a Steam user. To use this functionality you must add your games encrypted app ticket key from Steamworks, to the Game Admin > Settings page of your games profile on mod.io. A Successful request will return an Access Token Object.
NOTE: Steam is the only authentication endpoint that requires their token to be base64 encoded. All other endpoints tokens should be provided as a UTF-8 character string.
HINT: If you want to overlay the mod.io site in-game on Steam, we recommend you add ?portal=steam
to the end of the URL you open which will prompt the user to login with Steam. See Web Overlay Authentication for details.
Parameter | Type | Required | Description |
---|---|---|---|
appdata | base64-encoded string | true | The Steam users Encrypted App Ticket provided by the Steamworks SDK. Parameter content MUST be the uint8 *rgubTicketEncrypted returned after calling ISteamUser::GetEncryptedAppTicket() within the Steamworks SDK, converted into a base64-encoded string. NOTE: Due to a base64-encoded string containing special characters, you must URL encode the string after it has been base64-encoded to ensure it is successfully sent to our servers otherwise you may encounter an 422 Unprocessable Entity response. For example, cURL will do this for you by using the --data-urlencode option. |
string | The users email address (optional but recommended to help users recover lost accounts). If supplied, and the respective user does not have an email registered for their account we will send a confirmation email to confirm they have ownership of the specified email. NOTE: If the user already has an email on record with us, this parameter will be ignored. This parameter should also be urlencoded before the request is sent. |
||
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a common year (unix timestamp + 31536000 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 14001 | The game associated with the supplied api_key is currently not available. | Error Object |
401 | Unauthorized | 11018 | The steam encrypted app ticket was invalid. | Error Object |
401 | Unauthorized | 11032 | mod.io was unable to verify the credentials against the external service provider. | Error Object |
403 | Forbidden | 11016 | The api_key supplied in the request must be associated with a game. | Error Object |
403 | Forbidden | 11017 | The api_key supplied in the request is for test environment purposes only and cannot be used for this functionality. | Error Object |
403 | Forbidden | 11019 | The secret steam app ticket associated with this game has not been configured. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
403 | Forbidden | 17053 | The user account associated with this email is locked. Please contact support for assistance. | Error Object |
Xbox Live
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/xboxauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'xbox_token=XBL3.0 x=9264027439329321064;eym72VygeZzTSUVRmNvw8v...' \
-d 'terms_agreed=true' \
-d 'email=example@mod.io' \
-d 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/xboxauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/xboxauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"xbox_token": "XBL3.0 x=9264027439329321064;eym72VygeZzTSUVRmNvw8v...",
"terms_agreed": true,
"email": "example@mod.io",
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/xboxauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/xboxauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/xboxauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/xboxauth
Request an access token on behalf of an Xbox Live user. To use this endpoint you will need to setup some additional settings prior to being able to authenticate Xbox Live users. Head here for these instructions. A Successful request will return an Access Token Object.
HINT: If you want to overlay the mod.io site in-game on Xbox, we recommend you add ?portal=xboxlive
to the end of the URL you open which will prompt the user to login with Xbox Live. See Web Overlay Authentication for details.
Parameter | Type | Required | Description |
---|---|---|---|
xbox_token | string | true | The Xbox Live token returned from calling GetTokenAndSignatureAsync("POST", "https://api.mod.io"). NOTE: Due to the encrypted app ticket containing special characters, you must URL encode the string before sending the request to ensure it is successfully sent to our servers otherwise you may encounter an 422 Unprocessable Entity response. For example, cURL will do this for you by using the --data-urlencode option. |
string | The users email address (optional but recommended to help users recover lost accounts). If supplied, and the respective user does not have an email registered for their account we will send a confirmation email to confirm they have ownership of the specified email. This functionality is also available at a later time via the Link an Email endpoint. NOTE: If the user already has an email on record with us, this parameter will be ignored. This parameter should also be urlencoded before the request is sent. |
||
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a common year (unix timestamp + 31536000 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 14001 | The game associated with the supplied api_key is currently not available. | Error Object |
401 | Unauthorized | 11027 | The Xbox Live token supplied in the request is invalid. | Error Object |
401 | Unauthorized | 11029 | The Xbox Live token supplied has expired. | Error Object |
401 | Unauthorized | 11032 | mod.io was unable to verify the credentials against the external service provider. | Error Object |
403 | Forbidden | 11016 | The api_key supplied in the request must be associated with a game. | Error Object |
403 | Forbidden | 11017 | The api_key supplied in the request is for test environment purposes only and cannot be used for this functionality. | Error Object |
403 | Forbidden | 11028 | The user is not permitted to interact with UGC. This can be modified in the user's Xbox Live profile. | Error Object |
403 | Forbidden | 11030 | Xbox Live users with 'Child' accounts are not permitted to use mod.io. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
PlayStation™Network
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/psnauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'auth_code=MAXfj2TMqpHnaUMJdwCDbZUi2L3usnV7aw7xwHX2PEqT5hLkFF2VUyhlnCAMC0tQR3trpFQot0zvMMEtBzekilqeVD1Qm9nEcs9FljneaL3hCWPFSf6jjDSxOxOSytGD' \
-d 'terms_agreed=true' \
-d 'email=example@mod.io' \
-d 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/psnauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/psnauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"auth_code": "MAXfj2TMqpHnaUMJdwCDbZUi2L3usnV7aw7xwHX2PEqT5hLkFF2VUyhlnCAMC0tQR3trpFQot0zvMMEtBzekilqeVD1Qm9nEcs9FljneaL3hCWPFSf6jjDSxOxOSytGD",
"terms_agreed": true,
"email": "example@mod.io",
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/psnauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/psnauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/psnauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/psnauth
Request an access token on behalf of a PlayStation Network (PSN) user. To use this endpoint you will need to setup some additional settings prior to being able to authenticate PlayStation users. Head here for these instructions. A Successful request will return an Access Token Object.
HINT: If you want to overlay the mod.io site in-game on PlayStation, we recommend you add ?portal=psn
to the end of the URL you open which will prompt the user to login with PlayStation Network. See Web Overlay Authentication for details.
"PlayStation" and "DualSense" are registered trademarks or trademarks of Sony Interactive Entertainment Inc.
Parameter | Type | Required | Description |
---|---|---|---|
auth_code | string | true | The auth code returned from the PlayStation Network API. |
env | integer | The PlayStation Network environment you are targeting. If omitted, the request will default to targeting PlayStation Network's production environment. | |
string | The users email address (optional but recommended to help users recover lost accounts). If supplied, and the respective user does not have an email registered for their account we will send a confirmation email to confirm they have ownership of the specified email. NOTE: If the user already has an email on record with us, this parameter will be ignored. This parameter should also be urlencoded before the request is sent. |
||
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a common year (unix timestamp + 31536000 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
Nintendo Switch
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/switchauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'id_token=m72VygeZzTSUVRmNvw8v...' \
-d 'terms_agreed=true' \
-d 'email=example@mod.io' \
-d 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/switchauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/switchauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"id_token": "m72VygeZzTSUVRmNvw8v...",
"terms_agreed": true,
"email": "example@mod.io",
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/switchauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/switchauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/switchauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/switchauth
Request an access token on behalf of a Nintendo Switch user. To use this endpoint you will need to setup some additional settings prior to being able to authenticate Nintendo Switch users. Head here for these instructions. A Successful request will return an Access Token Object.
Parameter | Type | Required | Description |
---|---|---|---|
id_token | string | true | The NSA ID supplied by the Nintendo Switch SDK. |
string | The users email address. If supplied, and the respective user does not have an email registered for their account we will send a confirmation email to confirm they have ownership of the specified email. WARNING: We strongly recommend that you prompt your users in a friendly manner at least once to provide their email address to link their Nintendo Service account to mod.io. Failing to provide an email will in-effect generate an orphan account that will only be able to be accessed from the users' Switch device. |
||
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a common year (unix timestamp + 31536000 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 11035 | The NSA ID token was invalid/malformed. | Error Object |
401 | Unauthorized | 11039 | mod.io was unable to validate the credentials with Nintendo Servers. | Error Object |
401 | Unauthorized | 11036 | The NSA ID token is not valid yet. | Error Object |
401 | Unauthorized | 11037 | The NSA ID token has expired. You should request another token from the Switch SDK and ensure it is delivered to mod.io before it expires. | Error Object |
403 | Forbidden | 11040 | The application ID for the Nintendo Switch title has not been configured, this can be setup in the 'Options' tab within your game profile. | Error Object |
403 | Forbidden | 11041 | The application ID of the originating Switch title is not permitted to authenticate users. Please check the Switch application id submitted on your games' 'Options' tab and ensure it is the same application id of the Switch title making the authentication request. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
Meta Quest
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/oculusauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'device=rift' \
-d 'nonce=m72VygeZzTSUVRmNvw8v...' \
-d 'user_id=1829770514091149' \
-d 'access_token=OCAf5kD1SbVNE...' \
-d 'terms_agreed=true' \
-d 'email=example@mod.io' \
-d 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/oculusauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/oculusauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"device": "rift",
"nonce": "m72VygeZzTSUVRmNvw8v...",
"user_id": "1829770514091149",
"access_token": "OCAf5kD1SbVNE...",
"terms_agreed": true,
"email": "example@mod.io",
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/oculusauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/oculusauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/oculusauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/oculusauth
Request an access token on behalf of an Meta Quest user. To use this functionality you must add your games AppId and secret from the Meta Quest Dashboard, to the Game Admin > Settings page of your games profile on mod.io. A Successful request will return an Access Token Object.
Parameter | Type | Required | Description |
---|---|---|---|
device | string | true | The Meta Quest device being used for authentication. Possible Options: - quest - rift |
nonce | string | true | The nonce provided by calling ovr_User_GetUserProof() from the Meta Quest SDK. NOTE: Due to the nonce potentially containing special characters, you must URL encode the string before sending the request to ensure it is successfully sent to our servers otherwise you may encounter an 422 Unprocessable Entity response. For example, cURL will do this for you by using the --data-urlencode option. |
user_id | integer | true | The user's Meta Quest id providing by calling ovr_GetLoggedInUserID() from the Meta Quest SDK. |
access_token | string | true | The user's access token, providing by calling ovr_User_GetAccessToken() from the Meta Quest SDK. mod.io uses this access token on the first login only to obtain the user's alias and is not saved on our servers. |
string | The users email address. If supplied, and the respective user does not have an email registered for their account we will send a confirmation email to confirm they have ownership of the specified email. WARNING: We strongly recommend that you prompt your users in a friendly manner at least once to provide their email address to link their Meta Quest account. Due to how Meta Quest handles user IDs - if we are not supplied with an email for a user at least once we will never be able to link that user with their existing account at a later date as Meta Quest IDs operate at the game-scope, not globally. Failing to provide an email will in-effect generate an orphan account that will only be able to be accessed from your title. |
||
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a common year (unix timestamp + 31536000 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 14001 | The game associated with the supplied api_key is currently not available. | Error Object |
401 | Unauthorized | 11032 | mod.io was unable to verify the credentials against the external service provider. | Error Object |
403 | Forbidden | 11016 | The api_key supplied in the request must be associated with a game. | Error Object |
403 | Forbidden | 11017 | The api_key supplied in the request is for test environment purposes only and cannot be used for this functionality. | Error Object |
403 | Forbidden | 11024 | The secret Oculus Rift app ticket associated with this game has not been configured. | Error Object |
403 | Forbidden | 11025 | The secret Oculus Quest app ticket associated with this game has not been configured. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
Epic Games
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/epicgamesauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'access_token=eym72VygeZzTSUVRmNvw8v...' \
-d 'terms_agreed=true' \
-d 'email=example@mod.io' \
-d 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/epicgamesauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/epicgamesauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"access_token": "eym72VygeZzTSUVRmNvw8v...",
"terms_agreed": true,
"email": "example@mod.io",
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/epicgamesauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/epicgamesauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/epicgamesauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/epicgamesauth
Request an access token on behalf of an Epic Games user. Additional instructions for configuing your Epic Account Services Application to use this endpoint can be found here. A Successful request will return an Access Token Object.
Parameter | Type | Required | Description |
---|---|---|---|
id_token | string | true | The ID Token returned from the EOS SDK when you authenticate a user to use mod.io. |
string | The users email address (optional but recommended to help users recover lost accounts). If supplied, and the respective user does not have an email registered for their account we will send a confirmation email to confirm they have ownership of the specified email. NOTE: If the user already has an email on record with us, this parameter will be ignored. This parameter should also be urlencoded before the request is sent. |
||
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a week (unix timestamp + 604800 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 11044 | The access token was invalid/malformed. | Error Object |
401 | Unauthorized | 11048 | mod.io was unable to validate the credentials with Epic Games. | Error Object |
401 | Unauthorized | 11045 | The Epic Games access token is not valid yet. | Error Object |
401 | Unauthorized | 11046 | The Epic Games access token has expired. You should request another token from the EOS SDK and ensure it is delivered to mod.io before it expires. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
GOG Galaxy
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/galaxyauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
--data-urlencode 'appdata=GCL671bwZ/+zUeOWc0M' \
--data-urlencode 'terms_agreed=true' \
--data-urlencode 'email=example@mod.io' \
--data-urlencode 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/galaxyauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/galaxyauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"appdata": "GCL671bwZ/+zUeOWc0M",
"terms_agreed": true,
"email": "example@mod.io",
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/galaxyauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/galaxyauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/galaxyauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/galaxyauth
Request an access token on behalf of a GOG Galaxy user. To use this functionality you must add your games encrypted app ticket key from GOG Galaxy, to the Game Admin > Settings page of your games profile on mod.io. A Successful request will return an Access Token Object.
Parameter | Type | Required | Description |
---|---|---|---|
appdata | string | true | The GOG Galaxy users Encrypted App Ticket provided by the GOG Galaxy SDK. Parameter content MUST be the encrypted string returned in the buffer after calling IUser::GetEncryptedAppTicket() within the Galaxy SDK. Unlike the Steam Authentication endpoint, you do not need to encode the encrypted string as this is already done by the Galaxy SDK. NOTE: Due to the encrypted app ticket containing special characters, you must URL encode the string before sending the request to ensure it is successfully sent to our servers otherwise you may encounter an 422 Unprocessable Entity response. For example, cURL will do this for you by using the --data-urlencode option. |
string | The users email address. If supplied, and the respective user does not have an email registered for their account we will send a confirmation email to confirm they have ownership of the specified email. WARNING: We strongly recommend that you prompt your users in a friendly manner at least once to provide their email address to link their GOG Galaxy account to mod.io. Failing to provide an email will in-effect generate an orphan account that will only be able to be accessed from GOG Galaxy. |
||
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a common year (unix timestamp + 31536000 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 14001 | The game associated with the supplied api_key is currently not available. | Error Object |
401 | Unauthorized | 11021 | The GOG Galaxy encrypted app ticket was invalid. | Error Object |
401 | Unauthorized | 11032 | mod.io was unable to verify the credentials against the external service provider. | Error Object |
403 | Forbidden | 11016 | The api_key supplied in the request must be associated with a game. | Error Object |
403 | Forbidden | 11017 | The api_key supplied in the request is for test environment purposes only and cannot be used for this functionality. | Error Object |
403 | Forbidden | 11022 | The secret GOG Galaxy app ticket associated with this game has not been configured. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
Apple
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/appleauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'id_token=eyJhbXciOiJIUzI1Lizs....' \
-d 'terms_agreed=true' \
-d 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/appleauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/appleauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"id_token": "eyJhbXciOiJIUzI1Lizs....",
"terms_agreed": true,
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/appleauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/appleauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/appleauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/appleauth
Request an access token on behalf of a 'Sign in with Apple' user. To use this functionality you must add your games Bundle ID from Apple, to the Game Admin > Settings page of your games profile on mod.io. A Successful request will return an Access Token Object.
Parameter | Type | Required | Description |
---|---|---|---|
id_token | string | true | The ID token returned to your iOS application upon using Sign in with Apple functionality. |
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a week (unix timestamp + 604800 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 14001 | The game associated with the supplied api_key is currently not available. | Error Object |
401 | Unauthorized | 11201 | The Apple token supplied in the request is invalid. | Error Object |
401 | Unauthorized | 11202 | The Apple token supplied has expired. | Error Object |
401 | Unauthorized | 11032 | mod.io was unable to verify the credentials against the external service provider. | Error Object |
403 | Forbidden | 11016 | The api_key supplied in the request must be associated with a game. | Error Object |
403 | Forbidden | 11017 | The api_key supplied in the request is for test environment purposes only and cannot be used for this functionality. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
403 | Forbidden | 11203 | The Apple Bundle ID associated with this game has not been configured. | Error Object |
403 | Forbidden | 11205 | The Apple Bundle ID associated with this game is invalid. | Error Object |
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/googleauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'id_token=eyJhbXciOiJIUzI1Lizs....' \
-d 'terms_agreed=true' \
-d 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/googleauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/googleauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"id_token": "eyJhbXciOiJIUzI1Lizs....",
"terms_agreed": true,
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/googleauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/googleauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/googleauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/googleauth
Request an access token on behalf of a Google user. To use this functionality you must add your games Client ID, Secret and Redirect URI from Google, to the Game Admin > Settings page of your games profile on mod.io. A Successful request will return an Access Token Object.
*
HINT: If you want to overlay the mod.io site in-game on Android, we recommend you add ?portal=google
to the end of the URL you open which will prompt the user to login with Google. See Web Overlay Authentication for details.
Parameter | Type | Required | Description |
---|---|---|---|
auth_code | string | required_if | The auth_code value returned from Google after you have authenticated a user in-app. This is required if an id_token is not provided. |
id_token | string | required_if | The id_token value returned from Google after you have authenticated a user via the Google OAuth2 flow. This is required if an auth_code is not provided. |
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a week (unix timestamp + 604800 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
400 | Bad Request | 11053 | Google authentication settings have not been configured. Please contact support for assistance. | Error Object |
401 | Unauthorized | 11054 | mod.io was unable to validate the credentials with Google's servers. | Error Object |
403 | Forbidden | 17053 | The user account associated with this email is locked. Please contact support for assistance. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
Discord
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/discordauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'discord_token=eyJhbXciOiJIUzI1Lizs....' \
-d 'terms_agreed=true' \
-d 'email=example@mod.io' \
-d 'date_expires=1729236480'
POST https://*.modapi.io/v1/external/discordauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/discordauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"discord_token": "eyJhbXciOiJIUzI1Lizs....",
"terms_agreed": true,
"email": "example@mod.io",
"date_expires": 1729236480
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/discordauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/discordauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/discordauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/discordauth
Request an access token on behalf of a Discord user. A Successful request will return an Access Token Object.
HINT: If you want to overlay the mod.io site in-game with Discord authentication, we recommend you add ?portal=discord
to the end of the URL you open which will prompt the user to login with Discord. See Web Overlay Authentication for details.
Parameter | Type | Required | Description |
---|---|---|---|
discord_token | string | true | The access token of the user provided by Discord. |
string | The users email address (optional but recommended to help users recover lost accounts). If supplied, and the respective user does not have an email registered for their account we will send a confirmation email to confirm they have ownership of the specified email. NOTE: If the user already has an email on record with us, this parameter will be ignored. This parameter should also be urlencoded before the request is sent. |
||
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a week (unix timestamp + 604800 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 14001 | The game associated with the supplied api_key is currently not available. | Error Object |
401 | Unauthorized | 11032 | mod.io was unable to verify the credentials against the external service provider. | Error Object |
401 | Unauthorized | 11043 | mod.io was unable to get account data from the Discord servers. | Error Object |
403 | Forbidden | 11016 | The api_key supplied in the request must be associated with a game. | Error Object |
403 | Forbidden | 11017 | The api_key supplied in the request is for test environment purposes only and cannot be used for this functionality. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
OpenID
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/external/openidauth?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'id_token=eyJhbXciOiJIUzI1Lizs....' \
-d 'terms_agreed=true' \
-d 'email=example@mod.io' \
-d 'date_expires=1729236480' \
-d 'monetization_account=false'
POST https://*.modapi.io/v1/external/openidauth?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/external/openidauth',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"id_token": "eyJhbXciOiJIUzI1Lizs....",
"terms_agreed": true,
"email": "example@mod.io",
"date_expires": 1729236480,
"monetization_account": false
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/external/openidauth?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/external/openidauth', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/external/openidauth?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /external/openidauth
Request an access token on behalf of an OpenID identity provider. To use this method of authentication, you must configure the OpenID config in your game's authentication admin page. A Successful request will return an Access Token Object.
NOTE: The ability to authenticate players using your identity provider is a premium feature. If you are interested in accessing premium features via your games dashboard, please contact us.
HINT: If you want to overlay the mod.io site in-game, we recommend you add ?portal=studio
to the end of the URL you open which will prompt the user to login with your auth provider if they are on your games page. See Web Overlay Authentication for details.
Parameter | Type | Required | Description |
---|---|---|---|
id_token | string | true | The ID token issued by the configured identity provider. |
string | The users email address (optional but recommended to help users recover lost accounts). If supplied, and the respective user does not have an email registered for their account we will send a confirmation email to confirm they have ownership of the specified email. NOTE: If the user already has an email on record with us, this parameter will be ignored. This parameter should also be urlencoded before the request is sent. |
||
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a week (unix timestamp + 604800 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
|
terms_agreed | boolean | This MUST be set to false unless you have collected the users agreement prior to calling this endpoint in which case it can be set to true and will be recorded.NOTE: If this is set to false and the user has not agreed to the latest mod.io Terms of Use and Privacy Policy, an error 403 Forbidden (error_ref 11074) will be returned and you will need to collect the users agreement and retry with this value set to true to authenticate the user. |
|
monetization_account | boolean | false | Automatically setup this user for monetization. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 14001 | The game associated with the supplied api_key is currently not available. | Error Object |
401 | Unauthorized | 11032 | mod.io was unable to verify the credentials against the external service provider. | Error Object |
401 | Unauthorized | 11091 | The audience configured in the OpenID config does not match the audience in the ID token. | Error Object |
403 | Forbidden | 11016 | The api_key supplied in the request must be associated with a game. | Error Object |
403 | Forbidden | 11017 | The api_key supplied in the request is for test environment purposes only and cannot be used for this functionality. | Error Object |
403 | Forbidden | 11074 | The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information. | Error Object |
403 | Forbidden | 17053 | The user account associated with this email is locked. Please contact support for assistance. | Error Object |
403 | Forbidden | 11086 | You must configure your OpenID config for your game in your game authentication settings before being able to authenticate users. | Error Object |
Email Exchange
Step 1 of 2
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/oauth/emailrequest?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'email=someperson@someservice.com'
POST https://*.modapi.io/v1/oauth/emailrequest?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/oauth/emailrequest',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"email": "someperson@someservice.com"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/oauth/emailrequest?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/oauth/emailrequest', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/oauth/emailrequest?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /oauth/emailrequest
Request a security code for a user, identified by their e-mail which can then be exchanged for an access token. To use this functionality you must use your games api_key from your games profile on mod.io. A Successful request will return a Message Object.
Parameter | Type | Required | Description |
---|---|---|---|
string | true | An email address the user can access to retrieve the security code. This parameter should also be urlencoded before the request is sent. |
Example response
{
"code": 201,
"message": "Please enter the 5-digit security code sent to your email address (someperson@someservice.com)."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Email Request Response | |
403 | Forbidden | 11017 | The supplied api_key cannot be used to generate access tokens. Please replace the supplied api_key with your game's api_key to enable full privileges. | Error Object |
Step 2 of 2
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/oauth/emailexchange?api_key=YourApiKey \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'security_code=P39TM'
POST https://*.modapi.io/v1/oauth/emailexchange?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
var headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/oauth/emailexchange',
method: 'post',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"security_code": "P39TM"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/oauth/emailexchange?api_key=YourApiKey',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/oauth/emailexchange', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/oauth/emailexchange?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /oauth/emailexchange
Exchange a security code issued from the Email Request endpoint for an access token. To use this functionality you must use your games api_key from your games profile on mod.io and the same api_key must be used from the original request for a security code. A Successful request will return an Access Token Object.
Parameter | Type | Required | Description |
---|---|---|---|
security_code | string | true | The alpha-numeric security code. |
date_expires | integer | Unix timestamp of date in which the returned token will expire. Value cannot be higher than the default value which is a common year (unix timestamp + 31536000 seconds). Using a token after it's expiry time has elapsed will result in a 401 Unauthorized response. |
Example response
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Access Token Object | |
401 | Unauthorized | 11013 | Authorization failed. You must use the same api_key for both stages of the authentication process. | Error Object |
401 | Unauthorized | 11012 | Authorization failed, security code has expired. Please request a new code. | Error Object |
401 | Unauthorized | 11011 | Authorization failed. Security code has already been redeemed. | Error Object |
403 | Forbidden | 17053 | The user account associated with this email is locked. Please contact support for assistance. | Error Object |
401 | Unauthorized | 11014 | Authorization failed. Invalid security code. | Error Object |
Logout
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/oauth/logout \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST https://*.modapi.io/v1/oauth/logout HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/json
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/oauth/logout',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/oauth/logout',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/oauth/logout', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/oauth/logout");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /oauth/logout
Log the user out by revoking their current access token. If this request successfully completes, you should remove any tokens/cookies/cached credentials linking to the now-revoked access token so the user is required to login again through your application. Successful request will return a Message Object.
Example response
{
"code": 200,
"success": true,
"message": "You have successfully logged out of mod.io."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Web Message Object |
Games
Get Games
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games
Get all games. Successful request will return an array of Game Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the game. |
status | integer | Status of the game (only admins can filter by this field, see status and visibility for details): 0 = Not accepted 1 = Accepted (default) 3 = Deleted |
submitted_by | integer | Unique id of the user who has ownership of the game. |
date_added | integer | Unix timestamp of date game was registered. |
date_updated | integer | Unix timestamp of date game was updated. |
date_live | integer | Unix timestamp of date game was set live. |
name | string | Name of the game. |
name_id | string | Path for the game on mod.io. For example: https://mod.io/g/gamename |
summary | string | Summary of the games mod support. |
instructions_url | string | Link to a mod.io guide, modding wiki or a page where modders can learn how to make and submit mods. |
ugc_name | string | Word used to describe user-generated content (mods, items, addons etc). |
presentation_option | integer | Presentation style used on the mod.io website: 0 = Grid View: Displays mods in a grid 1 = Table View: Displays mods in a table |
submission_option | integer | Submission process modders must follow: 0 = Mod uploads must occur via the API using a tool created by the game developers 1 = Mod uploads can occur from anywhere, including the website and API |
curation_option | integer | Curation option enabled by this game to approve mods: 0 = No curation: Mods are immediately available to play 1 = Price change approval: Pricing changes for marketplace mods queued for acceptance 2 = Full curation: All mods must be accepted by someone to be listed |
dependency_option | integer | Dependency option for this game's mods: 0 = Disallow dependencies 1 = Allow dependencies, mods must opt in 2 = Allow dependencies, mods must opt out 3 = Allow dependencies with no restrictions |
community_options | integer | Community features enabled for this game: 0 = None 1 = Allow comments on mods 2 = Allow guides 4 = Pin on homepage 8 = Show on homepage 16 = Show more on homepage 32 = Allow change status 64 = Enable Previews (Game must be hidden) 128 = Allow preview share-URL (Previews must be enabled) 256 = Allow negative ratings 512 = Allow mods to be edited via web 1024 = Allow mod dependencies 2048 = Allow comments on guides ? = Combine to find games with multiple options enabled (see BITWISE fields) |
monetization_options | integer | Monetization options enabled for this game: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by mod.io 2 = Marketplace enabled 4 = Creator partner program enabled 8 = Quantity limited mods supported 16 = All mods must be quantity limited ? = Combine to find games with multiple options enabled (see BITWISE fields) |
api_access_options | integer | Level of API access allowed by this game: 0 = None 1 = Allow 3rd parties to access this games API endpoints 2 = Allow mods to be downloaded directly (if disabled all download URLs will contain a frequently changing verification hash to stop unauthorized use) 4 = Requires a bearer token to be supplied when attempting the download to enforce authenticated downloads only 8 = Requires a bearer token to be supplied and for the user to own the file when attempting the download ? = Combine to find games with multiple options enabled (see BITWISE fields) |
maturity_options | integer | Mature content setup for this game: 0 = Don't allow mature content in mods 1 = Allow mature content in mods 2 = This game is for mature audiences only |
Display | Type | Description |
---|---|---|
show_hidden_tags | bool | show the hidden tags associated with the given game. |
Sort | Description |
---|---|
name | Sort results alphabetically by name using the _sort query parameter name . For example _sort=name would return games from A-Z. |
date_live | Sort results by the date they went live using the _sort query parameter date_live . For example _sort=-date_live would return the most recently live games. |
date_updated | Sort results by the date they were last updated using the _sort query parameter date_updated . For example _sort=-date_updated would return the most recently updated games. |
downloads_today | Sort results by the number of mod downloads in the last 24hours using the _sort query parameter downloads_today . For example _sort=-downloads_today would return the most popular games from the last 24hours based on the number of mod downloads. |
downloads_total | Sort results by the total number of mod downloads using the _sort query parameter downloads_total . For example _sort=-downloads_total would return the most popular games based on the number of mod downloads. |
subscribers_total | Sort results by the total number of mod subscribers using the _sort query parameter subscribers_total . For example _sort=-subscribers_total would return the most popular games based on number of mod subscribers. |
mods_count_total | Sort results by the number of mods using the _sort query parameter mods_count_total . For example _sort=-mods_count_total would return the games with the most number of mods submitted. |
Example response
{
"data": [
{
"id": 2,
"status": 1,
"submitted_by": null,
"date_added": 1493702614,
"date_updated": 1499410290,
"date_live": 1499841403,
"presentation_option": 0,
"submission_option": 1,
"dependency_option": 0,
"curation_option": 0,
"community_options": 3,
"monetization_options": 0,
"limit_collection_mods": 100,
"monetization_team": {
"team_id": "1"
},
"cloud_cooking_status": 0,
"revenue_options": 0,
"max_stock": 8388607,
"api_access_options": 3,
"maturity_options": 0,
"ugc_name": "mods",
"token_name": "MIO",
"icon": {
"filename": "icon.png",
"original": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_64x64": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_128x128": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_256x256": "https://assets.modcdn.io/images/placeholder/icon.png"
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"header": {
"filename": "modio-logo-bluedark.png",
"original": "https://assets.modcdn.io/images/branding/modio-logo-bluedark.png"
},
"name": "Rogue Knight",
"name_id": "rogue-knight",
"summary": "Rogue Knight is a brand new 2D pixel platformer that supports custom levels and characters.",
"instructions": "Instructions on the process to upload mods.",
"instructions_url": "https://www.rogue-knight-game.com/modding/getting-started",
"profile_url": "https://mod.io/g/rogue-knight",
"other_urls": [
{
"label": "Our Steam Page",
"url": "https://www.steampowered.com/2348329042"
}
],
"tag_options": [
{
"name": "Theme",
"name_localized": "string",
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localized": {
"Horror": "Horreur"
},
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
}
],
"stats": {
"game_id": 2,
"mods_count_total": 13,
"mods_downloads_today": 204,
"mods_downloads_total": 27492,
"mods_downloads_daily_average": 1230,
"mods_subscribers_total": 16394,
"date_expires": 1492564103
},
"theme": {
"primary": "#44bfd5",
"dark": "#2c2c3f",
"light": "#ffffff",
"success": "#68D391",
"warning": "#d6af2e",
"danger": "#ff000e"
},
"platforms": [
{
"platform": "ps5",
"label": "PlayStation 5",
"moderated": true,
"locked": true
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK | Get Games |
Get Game
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}
Get a game. Successful request will return a single Game Object. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
show_hidden_tags | bool | show the hidden tags associated with the given game. |
Example response
{
"id": 2,
"status": 1,
"submitted_by": null,
"date_added": 1493702614,
"date_updated": 1499410290,
"date_live": 1499841403,
"presentation_option": 0,
"submission_option": 1,
"dependency_option": 0,
"curation_option": 0,
"community_options": 3,
"monetization_options": 0,
"limit_collection_mods": 100,
"monetization_team": {
"team_id": "1"
},
"cloud_cooking_status": 0,
"revenue_options": 0,
"max_stock": 8388607,
"api_access_options": 3,
"maturity_options": 0,
"ugc_name": "mods",
"token_name": "MIO",
"icon": {
"filename": "icon.png",
"original": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_64x64": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_128x128": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_256x256": "https://assets.modcdn.io/images/placeholder/icon.png"
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"header": {
"filename": "modio-logo-bluedark.png",
"original": "https://assets.modcdn.io/images/branding/modio-logo-bluedark.png"
},
"name": "Rogue Knight",
"name_id": "rogue-knight",
"summary": "Rogue Knight is a brand new 2D pixel platformer that supports custom levels and characters.",
"instructions": "Instructions on the process to upload mods.",
"instructions_url": "https://www.rogue-knight-game.com/modding/getting-started",
"profile_url": "https://mod.io/g/rogue-knight",
"other_urls": [
{
"label": "Our Steam Page",
"url": "https://www.steampowered.com/2348329042"
}
],
"tag_options": [
{
"name": "Theme",
"name_localized": "string",
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localized": {
"Horror": "Horreur"
},
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
}
],
"stats": {
"game_id": 2,
"mods_count_total": 13,
"mods_downloads_today": 204,
"mods_downloads_total": 27492,
"mods_downloads_daily_average": 1230,
"mods_subscribers_total": 16394,
"date_expires": 1492564103
},
"theme": {
"primary": "#44bfd5",
"dark": "#2c2c3f",
"light": "#ffffff",
"success": "#68D391",
"warning": "#d6af2e",
"danger": "#ff000e"
},
"platforms": [
{
"platform": "ps5",
"label": "PlayStation 5",
"moderated": true,
"locked": true
}
]
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request successful | Game Object |
Guides
Get Guides
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/guides?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/guides?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/guides', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/guides
Get all guides for a game. Successful request will return an array of Guide Objects.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the guide. |
game_id | integer | Unique id of the parent game. |
status | integer | Status of the guide (only game admins can filter by this field, see status and visibility for details): 0 = Not accepted 1 = Accepted (default) |
submitted_by | integer | Unique id of the user who has ownership of the guide. |
submitted_by_display_name | string | The display name of the user who has ownership author. |
date_added | integer | Unix timestamp of date guide was registered. |
date_updated | integer | Unix timestamp of date guide was updated. |
date_live | integer | Unix timestamp of date guide was set live. |
name_id | string | Path for the guide on mod.io. For example: https://mod.io/g/gamename/r/guide-name-id-here |
tags | string | Comma-separated values representing the tags you want to filter the results by. If you specify multiple tags, only guides which have all tags will be returned. |
Sort | Description |
---|---|
name | Sort results alphabetically by name using the _sort query parameter name . For example _sort=name would return guides from A-Z. |
date_live | Sort results by the date they went live using the _sort query parameter date_live . For example _sort=-date_live would return the most recently live guides. |
date_updated | Sort results by the date they were last updated using the _sort query parameter date_updated . For example _sort=-date_updated would return the most recently updated guides. |
submitted_by | Sort results by the authors ID using the _sort query parameter submitted_by . For example _sort=submitted_by would return guides from authors who have been registered the longest. |
visits_today | Sort results by the number of visits in the last 24hours using the _sort query parameter visits_today . For example _sort=-visits_today would return the most popular guides from the last 24hours based on the number of visits. |
visits_total | Sort results by the total number of visits using the _sort query parameter visits_total . For example _sort=-visits_total would return the most popular guides based on the number of visits. |
comments_total | Sort results by the total number of comments using the _sort query parameter comments_total . For example _sort=-comments_total would return the guides with the most comments. |
Example response
{
"data": [
{
"id": 1209,
"game_id": 3,
"game_name": "My Awesome Game",
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1509922961,
"date_updated": 1509922961,
"date_live": 1509922961,
"status": 1,
"url": "https://mod.io/g/rogue-knight/r/getting-started",
"name": "Getting Started",
"name_id": "getting-started",
"summary": "Alright, so let's get started with modding on mod.io",
"description": "<h1>Getting Started</h2><p>Download this suspiciou....",
"community_options": 2048,
"tags": [
{
"name": "Instructions",
"date_added": 1499841487,
"count": 22
}
],
"stats": [
{
"guide_id": 2,
"visits_today": 0,
"visits_total": 0,
"comments_total": 0
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Guides |
Get Guide
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/guides/{guide-id}
Get a guide. Successful request will return a single Guide Object.
Example response
{
"id": 1209,
"game_id": 3,
"game_name": "My Awesome Game",
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1509922961,
"date_updated": 1509922961,
"date_live": 1509922961,
"status": 1,
"url": "https://mod.io/g/rogue-knight/r/getting-started",
"name": "Getting Started",
"name_id": "getting-started",
"summary": "Alright, so let's get started with modding on mod.io",
"description": "<h1>Getting Started</h2><p>Download this suspiciou....",
"community_options": 2048,
"tags": [
{
"name": "Instructions",
"date_added": 1499841487,
"count": 22
}
],
"stats": [
{
"guide_id": 2,
"visits_today": 0,
"visits_total": 0,
"comments_total": 0
}
]
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Guide Object |
Add Guide
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/guides \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-d 'name=Modding Guide for Rogue Knight' \
-d 'summary=Short descriptive summary here' \
-d 'description=<h2>Getting started with..' \
-d 'logo=undefined' \
-d 'date_live=1626667557' \
-d 'status=undefined' \
-d 'community_options=undefined' \
-d 'tags[]=undefined' \
-d 'name_id=undefined'
POST https://*.modapi.io/v1/games/{game-id}/guides HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: multipart/form-data
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"name": "Modding Guide for Rogue Knight",
"summary": "Short descriptive summary here",
"description": "<h2>Getting started with..",
"logo": "string",
"date_live": 1626667557,
"status": 0,
"community_options": 0,
"tags": [
"string"
],
"name_id": "string"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/guides', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/guides
Add a guide for a game. Successful request will return a single Guide Object.
Parameter | Type | Required | Description |
---|---|---|---|
logo | file | true | Image file which will represent your guides logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. |
name | string | true | Name of your guide. |
name_id | string | Path for the guide on mod.io. For example: https://mod.io/g/gamename/r/guide-name-id-here. If no name_id is specified the name will be used. For example: 'Stellaris Shader Guide' will become 'stellaris-shader-guide'. Cannot exceed 50 characters. |
|
summary | string | true | Summary for your guide, giving a brief overview of what it's about. Cannot exceed 250 characters. |
description | string | Detailed description for your guide, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. | |
url | string | Official homepage for your guide. Must be a valid URL. | |
tags[] | string | Tags to apply to the guide. Every tag to apply requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2). | |
date_live | integer | Unix timestamp of when this guide should go live. To release the guide immediately provide the current time along with the status value of 1. If this field is not provided and the status is 0, the guide will not be released. |
Example response
{
"id": 1209,
"game_id": 3,
"game_name": "My Awesome Game",
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1509922961,
"date_updated": 1509922961,
"date_live": 1509922961,
"status": 1,
"url": "https://mod.io/g/rogue-knight/r/getting-started",
"name": "Getting Started",
"name_id": "getting-started",
"summary": "Alright, so let's get started with modding on mod.io",
"description": "<h1>Getting Started</h2><p>Download this suspiciou....",
"community_options": 2048,
"tags": [
{
"name": "Instructions",
"date_added": 1499841487,
"count": 22
}
],
"stats": [
{
"guide_id": 2,
"visits_today": 0,
"visits_total": 0,
"comments_total": 0
}
]
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Created | Guide Object | |
403 | Forbidden | 14027 | The authenticated user does not have permission to add guides to this game. Ensure the user is part of the game team before attempting the request again. | Error Object |
Edit Guide
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-F 'name=Modding Guide for Rogue Knight' \
-F 'summary=Short descriptive summary here' \
-F 'description=<h2>Getting started with..' \
-F 'logo=@/path/to/image.jpg' \
-F 'date_live=1626667557'
POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: multipart/form-data
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"name": "Modding Guide for Rogue Knight",
"summary": "Short descriptive summary here",
"description": "<h2>Getting started with..",
"logo": "@/path/to/image.jpg",
"date_live": 1626667557
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/guides/{guide-id}
Update an existing guide. Successful request will return the updated Guide Object.
Parameter | Type | Required | Description |
---|---|---|---|
status | integer | Status of the guide, see status and visibility for details): 0 = Not accepted 1 = Accepted (game admins only) 3 = Deleted (use the delete guide endpoint to set this status) |
|
logo | file | Image file which will represent your guides logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. | |
name | string | Name of your guide. | |
name_id | string | Path for the guide on mod.io. For example: https://mod.io/g/gamename/r/guide-name-id-here. If no name_id is specified the name will be used. For example: 'Stellaris Shader Guide' will become 'stellaris-shader-guide'. Cannot exceed 50 characters. |
|
summary | string | Summary for your guide, giving a brief overview of what it's about. Cannot exceed 250 characters. | |
description | string | Detailed description for your guide, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. | |
url | string | Official homepage for your guide. Must be a valid URL. | |
tags[] | string | Tags to apply to the guide. Every tag to apply requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2). NOTE: When editing a guide any tags you add or remove from the existing tags list will be added/removed, so if you do not wish to remove any tags you must re-submit all existing tags. |
|
date_live | integer | Unix timestamp of when this guide should go live. To release the guide immediately provide the current time along with the status 1. If this field is not provided and the status is 0, the guide will not be released. |
Example response
{
"id": 1209,
"game_id": 3,
"game_name": "My Awesome Game",
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1509922961,
"date_updated": 1509922961,
"date_live": 1509922961,
"status": 1,
"url": "https://mod.io/g/rogue-knight/r/getting-started",
"name": "Getting Started",
"name_id": "getting-started",
"summary": "Alright, so let's get started with modding on mod.io",
"description": "<h1>Getting Started</h2><p>Download this suspiciou....",
"community_options": 2048,
"tags": [
{
"name": "Instructions",
"date_added": 1499841487,
"count": 22
}
],
"stats": [
{
"guide_id": 2,
"visits_today": 0,
"visits_total": 0,
"comments_total": 0
}
]
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK | Guide Object | |
403 | Forbidden | 14036 | The authenticated user does not have permission to edit guides to this game. Ensure the user is part of the game team before attempting the request again. | Error Object |
403 | Forbidden | 14031 | The guide status cannot be changed to accepted due to the request originating from a non-site admin whilst there is a DMCA report active against the guide. | Error Object |
Delete Guide
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/guides/{guide-id} HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/guides/{guide-id}
Delete a guide. Successful request will return 204 No Content
.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 14028 | The authenticated user does not have permission to delete guides to this game. Ensure the user is part of the game team before attempting the request again. | Error Object |
403 | Forbidden | 14031 | The guide cannot be deleted due to the request originating from a non-site admin whilst there is a DMCA report active against the guide. | Error Object |
Get Guides Tags
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/tags',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/guides/tags', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/tags?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/guides/tags
Get all guide tags for a game. Successful request will return an array of Guide Tag Objects.
Example response
{
"data": [
{
"name": "Instructions",
"date_added": 1499841487,
"count": 22
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Guide Tags |
Mods
Get Mods
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods
Get all mods for the corresponding game. Successful request will return an array of Mod Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the mod. |
game_id | integer | Unique id of the parent game. |
status | integer | Status of the mod (only game admins can filter by this field, see status and visibility for details): 0 = Not accepted 1 = Accepted (default) 3 = Deleted |
visible | integer | Visibility of the mod (only game admins can filter by this field, see status and visibility for details): 0 = Hidden 1 = Public (default) |
submitted_by | integer | Unique id of the user who has ownership of the mod. |
submitted_by_display_name | string | The display name of the mod author. |
date_added | integer | Unix timestamp of date mod was registered. |
date_updated | integer | Unix timestamp of date mod was updated. |
date_live | integer | Unix timestamp of date mod was set live. |
community_options | integer | Community features enabled for this mod: 0 = All the options below are disabled 1 = Enable comments 64 = Enable previews 128 = Enable preview URLs 1024 = Allow dependencies ? = Add the options you want together, to enable multiple options (see BITWISE fields) |
maturity_option | integer | Maturity options set by the mod creator: 0 = None 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Combine to find mods with multiple options enabled (see BITWISE fields) |
monetization_options | integer | Monetization options enabled for this mod: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by the game for this mod 2 = Marketplace enabled 8 = Quantity of this mod is limited ? = Combine to find mods with multiple options enabled (see BITWISE fields) |
name | string | Name of the mod. |
name_id | string | Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/mod-name-id-here |
modfile | integer | Unique id of the file that is the current active release (see mod files). |
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. As an example, this may include properties as to how the item works, or other information you need to display. Metadata can also be stored as searchable key value pairs, and to individual mod files. |
metadata_kvp | string | Colon-separated values representing the key-value pairs you want to filter the results by. If you supply more than one key-pair, separate the pairs by a comma. Will only filter by an exact key-pair match. |
tags | string | Comma-separated values representing the tags you want to filter the results by. If you specify multiple tags, only mods which have all tags will be returned, and only tags that are supported by the parent game can be applied. To determine what tags are eligible, see the tags values within tag_options column on the parent Game Object. If you want to ensure mods returned do not contain particular tag(s), you can use the tags-not-in filter either independently or alongside this filter. |
platform_status | string | If the parent game has enabled per-platform files, by default only mods with files which are approved and live for the target platform will be returned. To QA mods with pending files, you can filter results by their current platform status, using pending_only or live_and_pending .NOTE: only game admins can filter by this field. |
revenue_type | integer | Finds all mods with or without a price. Defaults to free. 0 = Free 1 = Paid 2 = Free and Paid |
stock | integer | Finds all mods that are in/out of stock. 0 = Sold Out 1 = In Stock |
Sort | Description |
---|---|
name | Sort results alphabetically by name using the _sort query parameter name . For example _sort=name would return mods from A-Z. |
date_live | Sort results by the date they went live using the _sort query parameter date_live . For example _sort=-date_live would return the most recently live mods. |
date_updated | Sort results by the date they were last updated using the _sort query parameter date_updated . For example _sort=-date_updated would return the most recently updated mods. |
submitted_by | Sort results by the creators ID using the _sort query parameter submitted_by . For example _sort=submitted_by would return mods from creators who have been registered the longest. |
downloads_today | Sort results by the number of downloads in the last 24hours using the _sort query parameter downloads_today . For example _sort=-downloads_today would return the most popular mods from the last 24hours based on the number of mod downloads. |
downloads_total | Sort results by the total number of downloads using the _sort query parameter downloads_total . For example _sort=-downloads_total would return the most popular mods based on the number of downloads. |
subscribers_total | Sort results by the total number of subscribers using the _sort query parameter subscribers_total . For example _sort=-subscribers_total would return the most popular mods based on number of subscribers. |
ratings_weighted_aggregate | Sort results by their calculated rating (thumbs up / down received) using the _sort query parameter ratings_weighted_aggregate . For example _sort=-ratings_weighted_aggregate would return the highest rated mods. |
Example response
{
"data": [
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Cross-Platform Filtering
If the parent game has platform filtering enabled, this endpoint supports the targeting a platform request header to return mods that have been approved for the requested platform. If you are a member of the parent game team, please see the platform_status
filter for this endpoint above on how you can retrieve pending mods.
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Mods | |
403 | Forbidden | 15025 | The authenticated user has applied an admin-only filter or value to the request, and is not an administrator for this game. | Error Object |
Get Mod
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}
Get a mod. Successful request will return a single Mod Object.
Example response
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
}
Cross-Platform Filtering
If the parent game has platform filtering enabled, this endpoint supports the targeting a platform request header to return the modfile within the Mod Object for the requested platform. If the request targets a platform that is invalid, the modfile
field will be an empty object {}
.
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Mod Object |
Add Mod
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-F 'name=Graphics Overhaul Mod' \
-F 'name_id=graphics-overhaul-mod' \
-F 'summary=Short descriptive summary here' \
-F 'description=<h2>Getting started with..' \
-F 'logo=@/path/to/image.jpg' \
-F 'homepage_url=https://www.example.com' \
-F 'visible=undefined' \
-F 'maturity_option=undefined' \
-F 'community_options=undefined' \
-F 'credit_options=undefined' \
-F 'stock=undefined' \
-F 'metadata_kvp[]=undefined' \
-F 'metadata_blob={"version_sig":"YXJlbnQgeW91IGlucXVpc2l0dmU="}' \
-F 'tags[]=easy'
POST https://*.modapi.io/v1/games/{game-id}/mods HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"name": "Graphics Overhaul Mod",
"name_id": "graphics-overhaul-mod",
"summary": "Short descriptive summary here",
"description": "<h2>Getting started with..",
"logo": "@/path/to/image.jpg",
"homepage_url": "https://www.example.com",
"visible": 0,
"maturity_option": 0,
"community_options": 0,
"credit_options": 0,
"stock": 0,
"metadata_kvp": [
"string"
],
"metadata_blob": "{\"version_sig\":\"YXJlbnQgeW91IGlucXVpc2l0dmU=\"}",
"tags": "easy"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods
Add a mod. Successful request will return the newly created Mod Object. All content published by users on mod.io is subject to the Terms of Use. It is a requirement that you provide a link to https://mod.io/terms in any place where users are submitting content to mod.io.
NOTE: By default new mods are 'not accepted' and 'public'. They can only be 'accepted' and made available via the API once a Mod File has been uploaded. Media, Metadata Key Value Pairs and Dependencies can also be added after a mod profile is created.
Parameter | Type | Required | Description |
---|---|---|---|
logo | file | true | Image file which will represent your mods logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. |
name | string | true | Name of your mod. |
name_id | string | Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/mod-name-id-here. If no name_id is specified the name will be used. For example: 'Stellaris Shader Mod' will become 'stellaris-shader-mod'. Cannot exceed 50 characters. |
|
summary | string | true | Summary for your mod, giving a brief overview of what it's about. Cannot exceed 250 characters. |
visible | integer | Visibility of the mod (best if this field is controlled by mod admins, see status and visibility for details): 0 = Hidden 1 = Public (default) |
|
description | string | Detailed description for your mod, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. | |
homepage_url | string | Official homepage for your mod. Must be a valid URL. | |
stock | integer | Maximum number of times this mod can be sold. NOTE: Limited mods can be enforced by the parent game. The value of this field is not used if the parent game's or mod's limited support is disabled (see monetization_options field in Game Object). |
|
maturity_option | integer | Mature content found in this mod. NOTE: The value of this field will default to 0 unless the parent game allows you to flag mature content (see maturity_options field in Game Object). 0 = None (default) 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Add the options you want together, to enable multiple options (see BITWISE fields) |
|
community_options | integer | Community features enabled for this mod: 0 = All the options below are disabled 1 = Enable comments 64 = Enable previews 128 = Enable preview URLs 1024 = Allow dependencies ? = Add the options you want together, to enable multiple options (see BITWISE fields) |
|
credit_options | integer | Credit options enabled for this mod: 0 = All the options are disabled 1 = Show credits section 2 = Mark with original or permitted assets 4 = Allow redistribution with credit 8 = Allow porting with credit 16 = Allow patching without credit 32 = Allow patching with credit 64 = Allow patching with permission 128 = Allow repackaging without credit 256 = Allow repackaging with credit 512 = Allow repackaging with permission 1024 = Allow users to resell ? = Add the options you want together, to enable multiple options (see BITWISE fields) |
|
metadata_kvp[] | string | true | Key value pairs you want to add where the key and value are separated by a colon ':'. Every pair to add requires a separate field with metadata[] as the key (eg. metadata[]=pistol-dmg:800, metadata[]=gravity:9.8). NOTE: If the string contains multiple colons the split will occur on the first matched, eg. sword-speed-power:100:10 will become key: sword-speed-power , value: 100:10 ). The following restrictions apply to the supplied metadata:- Keys support alphanumeric, '_' and '-' characters only. - Keys can map to multiple values (1-to-many relationship). - Keys and values cannot exceed 255 characters in length. - Key value pairs are searchable by exact match only. |
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. As an example, this may include properties as to how the item works, or other information you need to display. Metadata can also be stored as searchable key value pairs, and to individual mod files. | |
tags[] | string | Tags to apply to the mod. Every tag to apply requires a separate field with tags[] as the key (e.g. tags[]=tag1, tags[]=tag2). Only the tags pre-defined by the parent game can be applied. To determine what tags are eligible, see the tags values within tag_options column on the parent Game Object. |
» name_id
The name ID is used in the URL to identify the mod. It must be unique and contain only lowercase letters, numbers, and dashes.
» metadata_blob
Metadata that accepts any string-based arbitrary value, up to a maximum of 50,000 characters.
Example response
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Resource Created | Mod Object | |
422 | Unprocessable Entity | 900011 | Your marketplace amount is not within the minimum or maximum amount allowed. | Error Object |
403 | Forbidden | 15012 | The authenticated user has had upload privileges restricted by mod.io admins, this is typically due to spam. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Edit Mod
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-F 'name=Graphics Overhaul Mod' \
-F 'name_id=graphics-overhaul-mod' \
-F 'summary=Short descriptive summary here' \
-F 'description=<h2>Getting started with..' \
-F 'logo=@/path/to/image.jpg' \
-F 'homepage_url=https://www.example.com' \
-F 'metadata_blob={"version_sig":"YXJlbnQgeW91IGlucXVpc2l0dmU="}' \
-F 'metadata_kvp[]=undefined' \
-F 'tags[]=easy' \
-F 'status=undefined' \
-F 'visible=undefined' \
-F 'price=undefined' \
-F 'stock=undefined' \
-F 'monetization_options=undefined' \
-F 'maturity_option=undefined' \
-F 'community_options=undefined' \
-F 'credit_options=undefined'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id} HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"name": "Graphics Overhaul Mod",
"name_id": "graphics-overhaul-mod",
"summary": "Short descriptive summary here",
"description": "<h2>Getting started with..",
"logo": "@/path/to/image.jpg",
"homepage_url": "https://www.example.com",
"metadata_blob": "{\"version_sig\":\"YXJlbnQgeW91IGlucXVpc2l0dmU=\"}",
"metadata_kvp": [
"string"
],
"tags": "easy",
"status": 0,
"visible": 0,
"price": 0,
"stock": 0,
"monetization_options": 0,
"maturity_option": 0,
"community_options": 0,
"credit_options": 0
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}
Edit details for a mod. If you want to update the logo
or media associated with this mod, you need to use the Add Mod Media endpoint. The same applies to Mod Files, Metadata Key Value Pairs and Dependencies which are all managed via other endpoints. Successful request will return the updated Mod Object.
Parameter | Type | Required | Description |
---|---|---|---|
logo | file | true | Image file which will represent your mods logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. |
status | integer | Status of a mod. The mod must have at least one uploaded modfile to be 'accepted' (best if this field is controlled by game admins, see status and visibility for details):0 = Not accepted 1 = Accepted (game admins only) 3 = Deleted (use the delete mod endpoint to set this status) |
|
visible | integer | Visibility of the mod (best if this field is controlled by mod admins, see status and visibility for details): 0 = Hidden 1 = Public |
|
name | string | Name of your mod. Cannot exceed 50 characters. | |
name_id | string | Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/mod-name-id-here. Cannot exceed 50 characters. | |
summary | string | Summary for your mod, giving a brief overview of what it's about. Cannot exceed 250 characters. | |
description | string | Detailed description for your mod, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. | |
homepage_url | string | Official homepage for your mod. Must be a valid URL. | |
price | int | The price of the mod. NOTE: The value of this field will be ignored if the parent game's queue is enabled (see curation_option field in Game Object). |
|
stock | integer | Maximum number of times this mod can be sold. NOTE: Limited mods can be enforced by the parent game. The value of this field is not used if the parent game's or mod's limited support is disabled (see monetization_options field in Game Object). |
|
monetization_options | integer | Monetization options enabled for this mod: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by the game for this mod 2 = Marketplace enabled 8 = Quantity of this mod is limited ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
|
maturity_option | integer | Mature content found in this mod. NOTE: The value of this field will default to 0 unless the parent game allows you to flag mature content (see maturity_options field in Game Object). 0 = None set 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Add the options you want together, to enable multiple options (see BITWISE fields) |
|
community_options | integer | Community features enabled for this mod: 0 = All the options below are disabled 1 = Enable comments 64 = Enable previews 128 = Enable preview URLs 1024 = Allow dependencies ? = Add the options you want together, to enable multiple options (see BITWISE fields) |
|
credit_options | integer | Credit options enabled for this mod: 0 = All the options are disabled 1 = Show credits section 2 = Mark with original or permitted assets 4 = Allow redistribution with credit 8 = Allow porting with credit 16 = Allow patching without credit 32 = Allow patching with credit 64 = Allow patching with permission 128 = Allow repackaging without credit 256 = Allow repackaging with credit 512 = Allow repackaging with permission 1024 = Allow users to resell ? = Add the options you want together, to enable multiple options (see BITWISE fields) |
|
metadata_kvp[] | string | true | Key value pairs you want to add where the key and value are separated by a colon ':'. Every pair to add requires a separate field with metadata[] as the key (eg. metadata[]=pistol-dmg:800, metadata[]=gravity:9.8). NOTE: If the string contains multiple colons the split will occur on the first matched, eg. sword-speed-power:100:10 will become key: sword-speed-power , value: 100:10 ). The following restrictions apply to the supplied metadata:- Keys support alphanumeric, '_' and '-' characters only. - Keys can map to multiple values (1-to-many relationship). - Keys and values cannot exceed 255 characters in length. - Key value pairs are searchable by exact match only. |
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. As an example, this may include properties as to how the item works, or other information you need to display. Metadata can also be stored as searchable key value pairs, and to individual mod files. | |
tags[] | string | When providing this attribute, if the input array contains tags, they will entirely replace any existing tags assigned to the mod. If an empty array is passed, all currently assigned tags will be removed. If null or omitted, no changes will be made to the assigned tags. To determine what tags are eligible, see the tags values within tag_options column on the parent Game Object. |
» name_id
The name ID is used in the URL to identify the mod. It must be unique and contain only lowercase letters, numbers, and dashes.
Example response
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Update Successful | Mod Object | |
422 | Unprocessable Entity | 900011 | Your marketplace amount is not within the minimum or maximum amount allowed. | Error Object |
403 | Forbidden | 15013 | The authenticated user does not have permission to update this mod. Ensure the user is part of the mod team before attempting the request again. | Error Object |
403 | Forbidden | 15014 | The authenticated user does not have permission to update the maturity options for this mod, this action is restricted to team managers & administrators only. | Error Object |
403 | Forbidden | 15015 | The authenticated user does not have permission to update the status for this mod, this action is restricted to team managers & administrators only. | Error Object |
403 | Forbidden | 15016 | A mod cannot be set live without an associated modfile. | Error Object |
Delete Mod
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id} HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/mods/{mod-id}
Delete a mod profile. Successful request will return 204 No Content
and fire a MOD_UNAVAILABLE event.
NOTE: This will close the mod profile which means it cannot be viewed or retrieved via API requests but will still exist in-case you choose to restore it at a later date. If you wish to permanently delete a mod you have access rights to, you must do it via the mods profile page on the mod.io website.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 15019 | The authenticated user does not have permission to delete this mod, this action is restricted to team managers & administrators only. | Error Object |
Get Mod Collection List
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/collections?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/collections?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/collections',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/collections?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/collections', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/collections?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/collections
Get all mod collections that the given mod belongs to. Successful request will return an array of Mod Collection Objects. We recommended reading the filtering documentation to return only the records you want.
Example response
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Mod Collection List | |
403 | Forbidden | 15025 | The authenticated user has applied an admin-only filter or value to the request, and is not an administrator for this game. | Error Object |
Files
Get Modfiles
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/files
Get all files that are published for the corresponding mod. Successful request will return an array of Modfile Objects. We recommended reading the filtering documentation to return only the records you want.
NOTE: If the game requires mod downloads to be initiated via the API, the binary_url
returned will contain a verification hash. This hash must be supplied to get the modfile, and will expire after a certain period of time. Saving and reusing the binary_url
won't work in this situation given it's dynamic nature.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the file. |
mod_id | integer | Unique id of the mod. |
date_added | integer | Unix timestamp of date file was added. |
date_scanned | integer | Unix timestamp of date file was virus scanned. |
virus_status | integer | Current virus scan status of the file. For newly added files that have yet to be scanned this field will change frequently until a scan is complete: 0 = Not scanned 1 = Scan complete 2 = In progress 3 = Too large to scan 4 = File not found 5 = Error Scanning |
virus_positive | integer | Was a virus detected: 0 = No threats detected 1 = Flagged as malicious 2 = Flagged as containing potentially harmful files (i.e. EXEs) |
filesize | integer | Size of the file in bytes. |
filehash | string | MD5 hash of the file. |
filename | string | Filename including extension. |
version | string | Release version this file represents. |
changelog | string | Changelog for the file. |
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their modfiles. As an example, this may include properties such as what version of the game this file is compatible with. |
platform_status | string | If the parent game has enabled per-platform files, by default only files which are approved and live for the target platform will be returned. To QA pending files, you can filter results by their current platform status, using pending_only , approved_only , live_and_approved or live_and_pending . With the exception of approved_only and live_and_approved which is available to everyone, all other values are restricted to game administrators. |
Example response
{
"data": [
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Cross-Platform Filtering
If the parent game has platform filtering enabled, this endpoint supports the targeting a platform request header to return the modfiles that are approved for the requested platform.
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Modfiles |
Get Modfile
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/files/{file-id}
Get a file. Successful request will return a single Modfile Object.
NOTE: If the game requires mod downloads to be initiated via the API, the binary_url
returned will contain a verification hash. This hash must be supplied to get the modfile, and will expire after a certain period of time. Saving and reusing the binary_url
won't work in this situation given it's dynamic nature.
Example response
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Modfile Object |
Add Modfile
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-F 'filedata=@/path/to/modfile.zip' \
-F 'upload_id=123e4567-e89b-12d3-a456-426614174000' \
-F 'version=1.2' \
-F 'changelog=<p>Rogue Knights v1.2.0 Changelog</p></p>New Featu...' \
-F 'active=true' \
-F 'filehash=938c2cc0dcc05f2b68c4287040cfcf71' \
-F 'metadata_blob=client_signature:9VbZccpR' \
-F 'platforms[]=undefined'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"filedata": "@/path/to/modfile.zip",
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"version": "1.2",
"changelog": "<p>Rogue Knights v1.2.0 Changelog</p></p>New Featu...",
"active": "true",
"filehash": "938c2cc0dcc05f2b68c4287040cfcf71",
"metadata_blob": "client_signature:9VbZccpR",
"platforms": [
"string"
]
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/files
Upload a file for the corresponding mod. Successful request will return the newly created Modfile Object. Ensure that the release you are uploading is stable and free from any critical issues. Files are scanned upon upload, any users who upload malicious files will have their accounts closed.
NOTE: This endpoint does not support input_json
even if you base64-encode your file, due to the already-large file sizes of some releases and base64-encoding inflating the filesize.
NOTE: To upload files greater than 100MB, we recommend using the Multipart Uploads system. This endpoint supports files up to a max of 500MB in size.
Parameter | Type | Required | Description |
---|---|---|---|
filedata | file | Required if the upload_id parameter is omitted. The binary file for the release. ZIP the base folder of your mod, or if it is a collection of files which live in a pre-existing game folder, you should ZIP those files. Your file must meet the following conditions: - File must be zipped and cannot exceed 500MB in filesize (see Multipart Uploads to upload larger files) - Filename's cannot contain any of the following charcters: \ / ? " < > | : * - Mods which span multiple game directories are not supported unless the game manages this - Mods which overwrite files are not supported unless the game manages this |
|
upload_id | string | Required if the filedata parameter is omitted. The UUID of a completed multipart upload session. | |
version | string | Version of the file release (recommended format 1.0.0 - MAJOR.MINOR.PATCH). | |
changelog | string | Changelog of this release. | |
active | boolean |
Default value is true. Flag this upload as the current release, this will change the modfile field on the parent mod to the id of this file after upload.NOTE: If the active parameter is true, a MODFILE_CHANGED event will be fired, so game clients know there is an update available for this mod. |
|
filehash | string | MD5 of the submitted file. When supplied the MD5 will be compared against the uploaded files MD5. If they don't match a 422 Unprocessible Entity error will be returned. |
|
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their modfiles. As an example, this may include properties such as what version of the game this file is compatible with. | |
platforms | array | If platform filtering enabled | An array containing one or more platforms this file is targeting. Valid values can be found under the targeting a platform section. |
Example response
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
}
Cross-Platform Filtering
Cross-platform submissions are supported on this endpoint. To target particular platforms, see the platforms
body parameter above.
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Resource Created | Modfile Object | |
403 | Forbidden | 15006 | The authenticated user does not have permission to upload modfiles for the specified mod, ensure the user is a team manager or administrator. | Error Object |
422 | Unprocessable Entity | 13002 | The payload passed in the request was unable to be validated/read by mod.io, please try again. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Edit Modfile
Example request
# You can also use wget
curl -X PUT https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
PUT https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id} HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}',
{
method: 'PUT',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.put('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
PUT /games/{game-id}/mods/{mod-id}/files/{file-id}
Edit the details of a published file. If you want to update fields other than the changelog
, version
and active
status, you should add a new file instead. Successful request will return updated Modfile Object.
Parameter | Type | Required | Description |
---|---|---|---|
version | string | Version of the file release (recommended format 1.0.0 - MAJOR.MINOR.PATCH). | |
changelog | string | Changelog of this release. | |
active | boolean | Flag this upload as the current release. NOTE: If the active parameter causes the parent mods modfile parameter to change, a MODFILE_CHANGED event will be fired, so game clients know there is an update available for this mod. |
|
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their modfiles. As an example, this may include properties such as what version of the game this file is compatible with. |
Example response
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
}
Cross-Platform Filtering
Cross-platform submissions are supported on this endpoint. If the parent game supports cross-platform modfiles, and this modfile is approved, making a request with the active parameter will set the modfile live on all approved platforms.
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Update Successful | Modfile Object | |
403 | Forbidden | 15007 | The authenticated user does not have permission to update modfiles for the specified mod, ensure the user is a team manager or administrator. | Error Object |
Delete Modfile
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id} HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/mods/{mod-id}/files/{file-id}
Delete a modfile. Successful request will return 204 No Content
.
NOTE: A modfile can never be removed if it is the current active release for the corresponding mod regardless of user permissions. Furthermore, this ability is only available if you are authenticated as the game administrator for this game or are the original uploader of the modfile.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 15008 | The authenticated user does not have permission to delete modfiles for the specified mod, ensure the user is a team manager or administrator. | Error Object |
403 | Forbidden | 15009 | The live modfile for a mod cannot be deleted. | Error Object |
Manage Platform Status
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}/platforms \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}/platforms HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}/platforms',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}/platforms',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}/platforms', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/{file-id}/platforms");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/files/{file-id}/platforms
Manage the platform status of a particular modfile. This endpoint does not set any file live, instead it allows you to approve and deny new uploads. To set a file as the live file for the approved platforms after you have reviewed them, you must call the Edit Modfile with the active flag enabled.
NOTE: This is ony applicable if the parent game has cross-platform moderation enabled. A successful request will return the updated Modfile object.
Parameter | Type | Required | Description |
---|---|---|---|
approved | array | An array containing one or more platform strings that the specified modfile is approved for. | |
denied | array | An array containing one or more platform strings that the specified modfile is denied for. NOTE: You cannot mark a live modfile as denied, if a modfile is live the only option to remove it is to set another existing modfile as the live modfile for that platform, or add a new modfile. |
Example response
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request. | Modfile Object | |
403 | Forbidden | 15007 | The authenticated user does not have permission to edit the platforms for the specified modfile, ensure the user is a member of parent game team. | Error Object |
403 | Forbidden | 14037 | The parent game doesn't cross-platform modfile submissions. | Error Object |
Browse Modfile Cooks
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/cooks
Browse modfile cooks. Successful request will return an * array of Modfile Cook Objects.
Example response
{
"data": [
{
"cook_uuid": "123e4567-e89b-12d3-a456-426614174000",
"modfile": 0,
"platform": "ps5",
"status": 1,
"dateadded": 1499841487,
"dateupdated": 1499841487,
"metadata": [
"string"
],
"logs": [
"string"
],
"filename": "rogue-knight-v1.zip",
"filesize": 15181,
"version": "1.3"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Modfile Cooks |
Upsert Modfile Cooks
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json; charset=utf-8' \
-F 'cook_uuid=undefined' \
-F 'modfile_id=undefined' \
-F 'platform=undefined' \
-F 'status=undefined' \
-F 'timestamp=undefined' \
-F 'metrics=undefined' \
-F 'logs[]=undefined' \
-F 'virtual_machine_type=undefined'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks HTTP/1.1
Host: *.modapi.io
Content-Type: application/json; charset=utf-8
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json; charset=utf-8'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"cook_uuid": "123e4567-e89b-12d3-a456-426614174000",
"modfile_id": 0,
"platform": "ps5",
"status": 1,
"timestamp": 1499841487,
"metrics": {
"total_job_time_seconds": 0,
"download_time_seconds": 0,
"upload_time_seconds": 0,
"file_decompression_time_seconds": 0,
"file_compression_time_seconds": 0,
"cook_time_seconds": 0
},
"logs": [
{
"level": 0,
"message": "string",
"is_private": true
}
],
"virtual_machine_type": "string"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json; charset=utf-8'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/json; charset=utf-8'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/cooks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/cooks
Update or insert modfile cooks. Successful request will return a 204 No Content
response.
Parameter | Type | Required | Description |
---|---|---|---|
cook_uuid | string | true | The UUID of a cook. |
modfile_id | int | true | The id of the source modfile. |
platform | string | true | The platform being cooked for. |
status | string | true | The status of the cook. |
timestamp | integer | true | Unix timestamp of the cook update. |
metrics | object | The metrics data of the cook. | |
metrics[total_job_time_seconds] | int | Total job time in seconds. | |
metrics[download_time_seconds] | int | Download time in seconds. | |
metrics[upload_time_seconds] | int | Upload time in seconds. | |
metrics[file_decompression_time_seconds] | int | File decompression time in seconds. | |
metrics[file_compression_time_seconds] | int | File compression time in seconds. | |
metrics[cook_time_seconds] | int | Cook time in seconds. | |
logs | array | The log messages of the cook job. | |
logs[n][level] | integer | Defines logging severity levels. May be one of: - 0 (Trace) - 1 (Debug) - 2 (Information) - 3 (Warning) - 4 (Error) - 5 (Critical) - 6 (None) |
|
logs[n][message] | integer | The log message itself. | |
logs[n][is private ] | boolean | If the log is private and should only be viewed by game moderators. | |
virtual_machine_type | string | A unique identifier to differentiate the virtual machine used for the cook. |
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | No Content | None |
Browse Source Modfiles
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/sources
Browse source modfiles. Successful request will return an * array of Modfile Objects.
Example response
{
"data": [
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Source Modfiles |
Add Source Modfile
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-F 'filedata=@/path/to/modfile.zip' \
-F 'upload_id=123e4567-e89b-12d3-a456-426614174000' \
-F 'version=1.2' \
-F 'changelog=<p>Rogue Knights v1.2.0 Changelog</p></p>New Featu...' \
-F 'active=true' \
-F 'filehash=938c2cc0dcc05f2b68c4287040cfcf71' \
-F 'metadata_blob=client_signature:9VbZccpR' \
-F 'platforms[]=undefined'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"filedata": "@/path/to/modfile.zip",
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"version": "1.2",
"changelog": "<p>Rogue Knights v1.2.0 Changelog</p></p>New Featu...",
"active": "true",
"filehash": "938c2cc0dcc05f2b68c4287040cfcf71",
"metadata_blob": "client_signature:9VbZccpR",
"platforms": [
"string"
]
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/sources");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/sources
Upload a source file for the corresponding mod.
* Successful request will return the newly created Modfile Object.
Parameter|Type|Required|Description
---|---|---|---|
filedata|file||Required if the upload_id parameter is omitted. The binary file for
the release. ZIP the base folder of your mod, or if it is a collection of files which
live in a pre-existing game folder, you should ZIP those files. Your file must meet
the following conditions:
- File must be zipped and cannot exceed
500MB in filesize (see Multipart Uploads
to upload larger files)
- Filename's cannot contain any of the following
charcters: \ / ? " < > | : *
- Mods which span multiple game directories
are not supported unless the game manages this
- Mods which overwrite files are
not supported unless the game manages this
upload_id|string||Required if the filedata parameter is omitted. The UUID of a
completed multipart upload session.
version|string||Version of the file release (recommended format 1.0.0 - MAJOR.MINOR.PATCH).
changelog|string||Changelog of this release.
filehash|string||MD5 of the submitted file. When supplied the MD5 will be compared against
the uploaded files MD5. If they don't match a 422 Unprocessible Entity
error will be returned.
metadata|string||Metadata that is designed to be handled by the game client and is recommended
to not be exposed to content creators when submitting their modfiles. As an example, this may
include properties such as what version of the game this file is compatible with.
platforms|array|An array containing one or more platforms this file
is targeting. Valid values can be found under the targeting a platform section.
Example response
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
}
Cross-Platform Filtering
Cross-platform submissions are supported on this endpoint. To target
* particular platforms, see the platforms
body parameter above.
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Resource Created | Modfile Object | |
403 | Forbidden | 15006 | The authenticated user does not have permission to upload | |
* modfiles for the specified mod, ensure the user is a team manager or administrator. | Error Object | |||
422 | Unprocessable Entity | 13002 | The payload passed in the request was unable to be | |
* validated/read by mod.io, please try again. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Files (Multipart Uploads)
Get Multipart Upload Parts
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?api_key=YourApiKey&upload_id=123e4567-e89b-12d3-a456-426614174000 \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?api_key=YourApiKey&upload_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart',
method: 'get',
data: '?api_key=YourApiKey&upload_id=123e4567-e89b-12d3-a456-426614174000',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?api_key=YourApiKey&upload_id=123e4567-e89b-12d3-a456-426614174000',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart', params={
'api_key': 'YourApiKey', 'upload_id': '123e4567-e89b-12d3-a456-426614174000'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?api_key=YourApiKey&upload_id=123e4567-e89b-12d3-a456-426614174000");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/files/multipart
Get all uploaded parts for a corresponding upload session. Successful request will return an array of Multipart Upload Part Objects. We recommended reading the filtering documentation to return only the records you want.
Query Parameters | Required | type | Description |
---|---|---|---|
upload_id | true | string | The upload_id of the existing upload session to fetch parts already uploaded. |
Example response
{
"data": [
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"part_number": 1,
"part_size": 52428800,
"date_added": 1499846132
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Multipart Upload Parts |
Add Multipart Upload Part
Example request
# You can also use wget
curl -X PUT https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?upload_id=123e4567-e89b-12d3-a456-426614174000 \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Range: bytes 0-52428799/209715196' \
-H 'Digest: sha-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
PUT https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?upload_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
Content-Range: bytes 0-52428799/209715196
Digest: sha-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Range':'bytes 0-52428799/209715196',
'Digest':'sha-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart',
method: 'put',
data: '?upload_id=123e4567-e89b-12d3-a456-426614174000',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = ''PK\x03\x04\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Range':'bytes 0-52428799/209715196',
'Digest':'sha-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?upload_id=123e4567-e89b-12d3-a456-426614174000',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Range': 'bytes 0-52428799/209715196',
'Digest': 'sha-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.put('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart', params={
'upload_id': '123e4567-e89b-12d3-a456-426614174000'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?upload_id=123e4567-e89b-12d3-a456-426614174000");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
PUT /games/{game-id}/mods/{mod-id}/files/multipart
Add a new multipart upload part to an existing upload session. All parts must be exactly 50MB (Mebibyte) in size unless it is the final part which can be smaller. A successful request will return a single Multipart Upload Part Object.
NOTE: Unlike other POST endpoints on this service, the body of this request should contain no form parameters and instead be the data described in the byte range of the Content-Range header of the request.
Query Parameters | Required | type | Description |
---|---|---|---|
upload_id | true | string | The upload_id of the existing upload session to upload the part for. |
Header Parameters | Required | Description |
---|---|---|
Content-Range | true | The Content-Range of the part you are sending, in bytes. |
Digest | Optional Digest for part integrity checks once the part has been uploaded. |
Example response
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"part_number": 1,
"part_size": 52428800,
"date_added": 1499846132
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Multipart Upload Part Object | |
400 | Bad Request | 29008 | The Content-Range header is missing from your request. |
Error Object |
400 | Bad Request | 29009 | The unit within the Content-Range header must be of type: bytes. | Error Object |
400 | Bad Request | 29010 | The Content-Range header must not include wild-carded values, as they are unsupported (an asterisk cannot be included). | Error Object |
400 | Bad Request | 29011 | The Content-Range header contains a non numeric value. | Error Object |
400 | Bad Request | 29014 | The Content-Range header contains an invalid range, ensure that the finishing byte is greater than the starting byte. | Error Object |
400 | Bad Request | 29012 | The Content-Range header does not match the required pattern. | Error Object |
400 | Bad Request | 29013 | The size of the part provided is either too big, or too small. | Error Object |
400 | Bad Request | 29026 | The finish byte of that range must be 1 byte less than the total file size specified. | Error Object |
400 | Bad Request | 29005 | The Digest header contains more than one value, please ensure only the digest for the content body is provided. | Error Object |
400 | Bad Request | 29006 | An algorithm indicated in the Digest header is unsupported, please use one of the following algorithms instead: SHA-256, CRC32C. | Error Object |
400 | Bad Request | 29015 | An uploaded part with the specified start - finish byte range has already been uploaded to that session. If this is in error, you may need to abort the upload session, and start again. | Error Object |
403 | Forbidden | 15012 | The authenticated user has had upload privileges restricted by mod.io admins, this is typically due to spam. | Error Object |
403 | Forbidden | 15006 | The authenticated user does not have permission to upload modfiles for the specified mod, ensure the user is a team manager or administrator. | Error Object |
Create Multipart Upload Session
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'filename=testfile.zip' \
-d 'nonce=a93d389804ee0490f1903ab26500a66a695ce65fa7ecb074d79771857d074355'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"filename": "testfile.zip",
"nonce": "a93d389804ee0490f1903ab26500a66a695ce65fa7ecb074d79771857d074355"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/files/multipart
Create a new multipart upload session. A successful request will return a single Multipart Upload Object.
NOTE: The multipart upload system is designed for uploading large files up to 20GB in size. If uploading files less than 100MB, we recommend using the Add Modfile endpoint.
Parameter | Type | Required | Description |
---|---|---|---|
filename | string | true | The filename of the file once all the parts have been uploaded. The filename must include the .zip extension and cannot exceed 100 characters. |
nonce | string | An optional nonce to provide to prevent duplicate upload sessions from being created concurrently. Maximum of 64 characters. |
Example response
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"status": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Multipart Upload Object | |
400 | Bad Request | 29002 | The nonce you provided was already associated with a completed upload session. If you wish to start a new upload you should regenerate the nonce parameter. | Error Object |
403 | Forbidden | 15012 | The authenticated user has had upload privileges restricted by mod.io admins, this is typically due to spam. | Error Object |
403 | Forbidden | 15006 | The authenticated user does not have permission to upload modfiles for the specified mod, ensure the user is a team manager or administrator. | Error Object |
Delete Multipart Upload Session
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?upload_id=123e4567-e89b-12d3-a456-426614174000 \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?upload_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart',
method: 'delete',
data: '?upload_id=123e4567-e89b-12d3-a456-426614174000',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?upload_id=123e4567-e89b-12d3-a456-426614174000',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart', params={
'upload_id': '123e4567-e89b-12d3-a456-426614174000'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart?upload_id=123e4567-e89b-12d3-a456-426614174000");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/mods/{mod-id}/files/multipart
Terminate an active multipart upload session, a successful request will return 204 No Content
.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 15012 | The authenticated user has had upload privileges restricted by mod.io admins, this is typically due to spam. | Error Object |
Get Multipart Upload Sessions
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/sessions?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/sessions?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/sessions',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/sessions?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/sessions', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/sessions?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/files/multipart/sessions
Get all upload sessions belonging to the authenticated user for the corresponding mod. Successful request will return an array of Multipart Upload Part Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
status | integer | Status of the upload session: 0 = Incomplete (default) 1 = Pending 2 = Processing 3 = Completed 4 = Cancelled |
Example response
{
"data": [
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"status": 0
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Multipart Upload Sessions | |
403 | Forbidden | 15012 | The authenticated user has had upload privileges restricted by mod.io admins, this is typically due to spam. | Error Object |
Complete Multipart Upload Session
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/complete?upload_id=123e4567-e89b-12d3-a456-426614174000 \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/complete?upload_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/complete',
method: 'post',
data: '?upload_id=123e4567-e89b-12d3-a456-426614174000',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/complete?upload_id=123e4567-e89b-12d3-a456-426614174000',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/complete', params={
'upload_id': '123e4567-e89b-12d3-a456-426614174000'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/files/multipart/complete?upload_id=123e4567-e89b-12d3-a456-426614174000");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/files/multipart/complete
Complete an active multipart upload session, this endpoint assumes that you have already uploaded
all individual parts. A successful request will return a 200 OK
response code and return a single Multipart Upload Object.
Example response
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"status": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Multipart Upload Object | |
403 | Forbidden | 15012 | The authenticated user has had upload privileges restricted by mod.io admins, this is typically due to spam. | Error Object |
403 | Forbidden | 15006 | The authenticated user does not have permission to upload modfiles for the specified mod, ensure the user is a team manager or administrator. | Error Object |
Subscribe
Subscribe To Mod
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'include_dependencies=false'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"include_dependencies": false
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/subscribe
Subscribe the authenticated user to a corresponding mod. No body parameters are required for this action. Successful request will return the Mod Object of the newly subscribed mod.
NOTE: Users can subscribe to mods via mod.io, we recommend you poll or call the Get User Events endpoint when needed, to keep a users mods collection up to date.
Parameter | Type | Required | Description |
---|---|---|---|
include_dependencies | boolean | false | If the mod has dependencies, providing this attribute with a value of true will result in dependant mods being subscribed to as well, recursively. You should only include this attribute when the Mod Object indicates that the mod has dependencies. |
Example response
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Already Subscribed | Mod Object | |
201 | Created | Subscription Successful | Mod Object | |
403 | Forbidden | 15000 | The requested mod cannot be subscribed to at this time due to a DMCA takedown request. | Error Object |
403 | Forbidden | 15001 | The requested mod cannot be subscribed to due to being marked as 'hidden'. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Unsubscribe From Mod
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/subscribe");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/mods/{mod-id}/subscribe
Unsubscribe the authenticated user from the corresponding mod. No body parameters are
required for this action. Successful request will return 204 No Content
.
NOTE: Users can unsubscribe
from mods via mod.io, we recommend you poll or call the Get Mod Events endpoint when
needed, to keep a users mods collection up to date.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
400 | Bad Request | 15005 | The requested user is not currently subscribed to the requested mod. | Error Object |
Comments
Get Collection Comments
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/collections/{collection-id}/comments
Get all comments posted in the collections profile. Successful request will return an array of Comment Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the comment. |
resource_id | integer | Unique id of the resource. |
submitted_by | integer | Unique id of the user who posted the comment. |
date_added | integer | Unix timestamp of date comment was posted. |
reply_id | integer | Id of the parent comment this comment is replying to (can be 0 if the comment is not a reply). |
thread_position | string | Levels of nesting in a comment thread. You should order by this field, to maintain comment grouping. How it works: - The first comment will have the position '01'. - The second comment will have the position '02'. - If someone responds to the second comment the position will be '02.01'. - A maximum of 3 levels is supported. |
karma | integer | Karma received for the comment (can be positive or negative). |
content | string | Contents of the comment. |
reply id
Id of the parent comment this comment is replying to (can be 0 if the comment is not a reply).
thread position
Levels of nesting in a comment thread . You should order by this field, to maintain
comment grouping. How it works:
- The first comment will have the position '01'.
- The second comment
will have the position '02'.
- If someone responds to the second comment the position will be '02.01'.
- A maximum of 3 levels is supported.
Example response
{
"data": [
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
],
"result_count": 1,
"result_offset": 0,
"result_limit": 100,
"result_total": 1
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK | Get Collection Comments |
Add Collection Comment
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'replyid=0' \
-d 'content=Hey @XanT, you should check out this mod!'
POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"replyid": 0,
"content": "Hey @XanT, you should check out this mod!"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/collections/{collection-id}/comments
Add a comment for the corresponding collection. Successful request will return the newly created Comment Object and fire a MOD_COMMENT_ADDED event.
Parameter | Type | Required | Description |
---|---|---|---|
content | string | true | Contents of the comment. You can include @mentions to users, which will notify them that they have been tagged in this comment. Mention Markup - Format: @<display-name> - Example: Hey @XanT, you should check out this mod!
|
reply_id | integer | Id of the parent comment to reply to (can be 0 if the comment is not a reply and thus will not be nested). Default is 0. |
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Resource Created | Comment Object | |
403 | Forbidden | 29611 | The authenticated user does not have permission to submit comments on mod.io | |
due to their access being revoked. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Get Collection Comment
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/collections/{collection-id}/comments/{comment-id}
Get a Collection Comment. Successful request will return a single Comment Object.
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Comment Object |
Update Collection Comment
Example request
# You can also use wget
curl -X PUT https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-d 'content=Test comment'
PUT https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id} HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"content": "Test comment"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.put('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
PUT /games/{game-id}/collections/{collection-id}/comments/{comment-id}
Update a comment for the corresponding collection. Successful request will return the updated Comment Object.
Parameter | Type | Required | Description |
---|---|---|---|
content | string | true | Updated contents of the comment. |
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Update Successful | Comment Object |
Delete Collection Comment
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id} HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/collections/{collection-id}/comments/{comment-id}
Delete a comment from a collection profile. Successful request will return 204 No Content
and fire a COLLECTION_COMMENT_DELETED event.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 29610 | The authenticated user does not have permission to delete comments for this collection, | |
this action is restricted to team managers & administrators only. | Error Object |
Add Collection Comment Karma
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}/karma \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'karma=1'
POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}/karma HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}/karma',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"karma": "1"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}/karma',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}/karma', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/comments/{comment-id}/karma");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/collections/{collection-id}/comments/{comment-id}/karma
Update the Karma rating in single increments or decrements for a corresponding collection comment. Successful request will return the updated Comment Object.
Parameter | Type | Required | Description |
---|---|---|---|
karma | integer | true | Either 1 or -1 for positive and negative increments |
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Update Successful | Comment Object | |
400 | Bad Request | 15090 | This comment has been deleted and can not be modified. | Error Object |
403 | Forbidden | 11006 | User performing this operation does not have an active account. | Error Object |
403 | Forbidden | 15055 | User performing this operation can not rate the comment. | Error Object |
403 | Forbidden | 15059 | User has already submitted a rating for the comment. | Error Object |
Get Guide Comments
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/guides/{guide-id}/comments
Get all comments posted in the guides profile. Successful request will return an array of Comment Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the comment. |
resource_id | integer | Unique id of the resource (guide). |
submitted_by | integer | Unique id of the user who posted the comment. |
date_added | integer | Unix timestamp of date comment was posted. |
reply_id | integer | Id of the parent comment this comment is replying to (can be 0 if the comment is not a reply). |
thread_position | string | Levels of nesting in a comment thread. You should order by this field, to maintain comment grouping. How it works: - The first comment will have the position '01'. - The second comment will have the position '02'. - If someone responds to the second comment the position will be '02.01'. - A maximum of 3 levels is supported. |
karma | integer | Karma received for the comment (can be positive or negative). |
content | string | Contents of the comment. |
Example response
{
"data": [
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
],
"result_count": 1,
"result_offset": 0,
"result_limit": 100,
"result_total": 1
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK | Get Guide Comments |
Add Guide Comment
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'replyid=0' \
-d 'content=Hey @XanT, you should check out this mod!'
POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"replyid": 0,
"content": "Hey @XanT, you should check out this mod!"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/guides/{guide-id}/comments
Add a comment for the corresponding guide. Successful request will return the newly created Comment Object and fire a GUIDE_COMMENT_ADDED event.
Parameter | Type | Required | Description |
---|---|---|---|
content | string | true | Contents of the comment. You can include @mentions to users, which will notify them that they have been tagged in this comment. Mention Markup - Format: @<display-name> - Example: Hey @XanT, you should check out this guide!
|
reply_id | integer | Id of the parent comment to reply to (can be 0 if the comment is not a reply and thus will not be nested). Default is 0. |
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Resource Created | Comment Object | |
403 | Forbidden | 19042 | The authenticated user does not have permission to submit comments on mod.io due to their access being revoked. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Get Guide Comment
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/guides/{guide-id}/comments/{comment-id}
Get a Guide Comment. Successful request will return a single Comment Object.
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Comment Object |
Update Guide Comment
Example request
# You can also use wget
curl -X PUT https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-d 'content=Test comment'
PUT https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id} HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"content": "Test comment"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.put('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
PUT /games/{game-id}/guides/{guide-id}/comments/{comment-id}
Update a comment for the corresponding guide. Successful request will return the updated Comment Object.
Parameter | Type | Required | Description |
---|---|---|---|
content | string | true | Updated contents of the comment. |
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Update Successful | Comment Object |
Delete Guide Comment
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id} HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/guides/{guide-id}/comments/{comment-id}
Delete a comment from a guide profile. Successful request will return 204 No Content
and fire a GUIDE_COMMENT_DELETED event.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 19027 | The authenticated user does not have permission to delete comments for this guide, this action is restricted to game team managers & administrators only. | Error Object |
Add Guide Comment Karma
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}/karma \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'karma=1'
POST https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}/karma HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}/karma',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"karma": "1"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}/karma',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}/karma', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/guides/{guide-id}/comments/{comment-id}/karma");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/guides/{guide-id}/comments/{comment-id}/karma
Update the Karma rating in single increments or decrements for a corresponding guide comment. Successful request will return the updated Comment Object.
Parameter | Type | Required | Description |
---|---|---|---|
karma | integer | true | Either 1 or -1 for positive and negative increments |
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Update Successful | Comment Object | |
400 | Bad Request | 15090 | This comment has been deleted and can not be modified. | Error Object |
403 | Forbidden | 19045 | Downvoting comments for guides has been disabled in game community settings. | Error Object |
403 | Forbidden | 11006 | User performing this operation does not have an active account. | Error Object |
403 | Forbidden | 15055 | User performing this operation can not rate the comment. | Error Object |
403 | Forbidden | 15059 | User has already submitted a rating for the comment. | Error Object |
Get Mod Comments
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/comments
Get all comments posted in the mods profile. Successful request will return an array of Comment Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the comment. |
mod_id | integer | Unique id of the parent mod. This is now deprecated and will be removed in future API versions, please use resource_id instead. |
resource_id | integer | Unique id of the resource. |
submitted_by | integer | Unique id of the user who posted the comment. |
date_added | integer | Unix timestamp of date comment was posted. |
reply_id | integer | Id of the parent comment this comment is replying to (can be 0 if the comment is not a reply). |
thread_position | string | Levels of nesting in a comment thread. You should order by this field, to maintain comment grouping. How it works: - The first comment will have the position '01'. - The second comment will have the position '02'. - If someone responds to the second comment the position will be '02.01'. - A maximum of 3 levels is supported. |
karma | integer | Karma received for the comment (can be positive or negative). |
content | string | Contents of the comment. |
Example response
{
"data": [
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
],
"result_count": 1,
"result_offset": 0,
"result_limit": 100,
"result_total": 1
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK | Get Mod Comments |
Add Mod Comment
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'replyid=0' \
-d 'content=Hey @XanT, you should check out this mod!'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"replyid": 0,
"content": "Hey @XanT, you should check out this mod!"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/comments
Add a comment for the corresponding mod. Successful request will return the newly created Comment Object and fire a MOD_COMMENT_ADDED event.
Parameter | Type | Required | Description |
---|---|---|---|
content | string | true | Contents of the comment. You can include @mentions to users, which will notify them that they have been tagged in this comment. Mention Markup - Format: @<display-name> - Example: Hey @XanT, you should check out this mod!
|
reply_id | integer | Id of the parent comment to reply to (can be 0 if the comment is not a reply and thus will not be nested). Default is 0. |
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Resource Created | Comment Object | |
403 | Forbidden | 15042 | The authenticated user does not have permission to submit comments on mod.io due to their access being revoked. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Get Mod Comment
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/comments/{comment-id}
Get a Mod Comment. Successful request will return a single Comment Object.
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Comment Object |
Update Mod Comment
Example request
# You can also use wget
curl -X PUT https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-d 'content=Test comment'
PUT https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id} HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"content": "Test comment"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.put('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
PUT /games/{game-id}/mods/{mod-id}/comments/{comment-id}
Update a comment for the corresponding mod. Successful request will return the updated Comment Object.
Parameter | Type | Required | Description |
---|---|---|---|
content | string | true | Updated contents of the comment. |
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Update Successful | Comment Object |
Delete Mod Comment
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id} HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/mods/{mod-id}/comments/{comment-id}
Delete a comment from a mod profile. Successful request will return 204 No Content
and fire a MOD_COMMENT_DELETED event.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 15027 | The authenticated user does not have permission to delete comments for this mod, this action is restricted to team managers & administrators only. | Error Object |
Add Mod Comment Karma
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}/karma \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'karma=1'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}/karma HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}/karma',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"karma": "1"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}/karma',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}/karma', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/comments/{comment-id}/karma");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/comments/{comment-id}/karma
Update the Karma rating in single increments or decrements for a corresponding mod comment. Successful request will return the updated Comment Object.
Parameter | Type | Required | Description |
---|---|---|---|
karma | integer | true | Either 1 or -1 for positive and negative increments |
Example response
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Update Successful | Comment Object | |
400 | Bad Request | 15090 | This comment has been deleted and can not be modified. | Error Object |
403 | Forbidden | 15095 | Downvoting comments for mods has been disabled in game community settings. | Error Object |
403 | Forbidden | 11006 | User performing this operation does not have an active account. | Error Object |
403 | Forbidden | 15055 | User performing this operation can not rate the comment. | Error Object |
403 | Forbidden | 15059 | User has already submitted a rating for the comment. | Error Object |
Media
Add Game Media
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/media \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-d 'redirect_uris[]=undefined'
POST https://*.modapi.io/v1/games/{game-id}/media HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/media',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"redirect_uris": [
"string"
]
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/media',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/media', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/media");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/media
Upload new media to a game. The request Content-Type
header must be multipart/form-data
to submit image files. Any request you make to this endpoint should contain a binary file for each of the fields you want to update below. Successful request will return Message Object.
NOTE: You can also add media to your game's profile on the mod.io website. This is the recommended approach.
Parameter | Type | Required | Description |
---|---|---|---|
logo | file | Image file which will represent your games logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 640x360 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this logo to create three thumbnails with the dimensions of 320x180, 640x360 and 1280x720. | |
icon | file | Image file which will represent your games icon. Must be jpg, jpeg or png format and cannot exceed 1MB in filesize. Dimensions must be at least 64x64 and a transparent png that works on a colorful background is recommended. mod.io will use this icon to create three thumbnails with the dimensions of 64x64, 128x128 and 256x256. | |
header | file | Image file which will represent your games header. Must be jpg, jpeg or png format and cannot exceed 256KB in filesize. Dimensions of 400x100 and a light transparent png that works on a dark background is recommended. |
Example response
{
"code": 200,
"message": "You have successfully added new media to the specified game profile."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Media Successfully uploaded | Message Object |
Add Mod Media
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-F 'logo=@/path/to/logo.jpg' \
-F 'images=@/path/to/image-collection.zip' \
-F 'image1=@/path/to/image1.jpg' \
-F 'image2=@/path/to/image2.jpg' \
-F 'youtube[]=https://www.youtube.com/watch?v=dQw4w9WgXcQ' \
-F 'sketchfab[]=https://sketchfab.com/models/7793b895f27841f4930e6b71f75a8d74'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"logo": "@/path/to/logo.jpg",
"images": "@/path/to/image-collection.zip",
"image1": "@/path/to/image1.jpg",
"image2": "@/path/to/image2.jpg",
"youtube": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"sketchfab": "https://sketchfab.com/models/7793b895f27841f4930e6b71f75a8d74"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/media
This endpoint is very flexible and will add any images posted to the mods gallery regardless of their body name providing they are a valid image. The request Content-Type
header must be multipart/form-data
to submit image files. Successful request will return a Message Object.
NOTE: You can also add media to your mod's profile on the mod.io website. This is the easiest way.
Parameter | Type | Required | Description |
---|---|---|---|
sync | bool | Defaults to false, which will append uploaded images to the gallery. Passing in true will allow you to remove all images that exist in the gallery and be replaced with the uploaded images. | |
logo | file | Image file which will represent your mods logo. Must be jpg, jpeg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this logo to create three thumbnails with the dimensions of 320x180, 640x360 and 1280x720. | |
images | zip | Zip archive of images to add to the mods gallery. Only valid jpg, jpeg and png images in the zip file will be processed. The filename must be images.zip all other zips will be ignored. Alternatively you can POST one or more images to this endpoint and they will be detected and added to the mods gallery. | |
youtube[] | string | Full Youtube link(s) you want to add. Every Youtube link to add requires a separate field with youtube[] as the key (eg. youtube[]=https://www.youtube.com/watch?v=IGVZOLV9SPo, youtube[]=https://www.youtube.com/watch?v=5nY6fjZ3EUc) | |
sketchfab[] | string | Full Sketchfab link(s) you want to add. Every Sketchfab link to add requires a separate field with sketchfab[] as the key (eg. sketchfab[]=https://sketchfab.com/models/71f04e390ff54e5f8d9a51b4e1caab7e, sketchfab[]=https://sketchfab.com/models/5c85e649dd854cb58c2b9af081ebb0ff) |
Example response
{
"code": 201,
"message": "You have successfully added new media to the specified mod."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Resource Created | Message Object | |
403 | Forbidden | 15035 | The authenticated user does not have permission to add media for this mod, this action is restricted to team managers & administrators only. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Delete Mod Media
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'images[]=filename.jpg' \
-d 'youtube[]=https://www.youtube.com/watch?v=dQw4w9WgXcQ' \
-d 'sketchfab[]=https://sketchfab.com/models/7793b895f27841f4930e6b71f75a8d74'
DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"images": "filename.jpg",
"youtube": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"sketchfab": "https://sketchfab.com/models/7793b895f27841f4930e6b71f75a8d74"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/mods/{mod-id}/media
Delete images, sketchfab or youtube links from a mod profile. Successful request will return 204 No Content
.
NOTE: You can also delete media from your mod's profile on the mod.io website. This is the easiest way.
Parameter | Type | Required | Description |
---|---|---|---|
images[] | string | Filename of the images to delete. All images to delete require a separate field with images[] as the key (eg. images[0]=filename1.jpg, images[1]=filename2.jpg) | |
youtube[] | string | Full Youtube links to delete. All Youtube links to delete require a separate field with youtube[] as the key (eg. youtube[0]=https://www.youtube.com/watch?v=IGVZOLV9SPo, youtube[1]=https://www.youtube.com/watch?v=5nY6fjZ3EUc) | |
sketchfab[] | string | Full Sketchfab links to delete. All Sketchfab links to delete require a separate field with sketchfab[] as the key (eg. sketchfab[0]=https://sketchfab.com/models/71f04e390ff54e5f8d9a51b4e1caab7e, sketchfab[1]=https://sketchfab.com/models/5c85e649dd854cb58c2b9af081ebb0ff) |
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 15036 | The authenticated user does not have permission to delete media from this mod, this action is restricted to team managers & administrators only. | Error Object |
Reorder Mod Media
Example request
# You can also use wget
curl -X PUT https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media/reorder \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-d 'images[]=filename.jpg' \
-d 'youtube[]=https://www.youtube.com/watch?v=dQw4w9WgXcQ' \
-d 'sketchfab[]=https://sketchfab.com/models/7793b895f27841f4930e6b71f75a8d74'
PUT https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media/reorder HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media/reorder',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"images": "filename.jpg",
"youtube": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"sketchfab": "https://sketchfab.com/models/7793b895f27841f4930e6b71f75a8d74"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media/reorder',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.put('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media/reorder', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/media/reorder");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
PUT /games/{game-id}/mods/{mod-id}/media/reorder
Reorder images, sketchfab or youtube links from a mod profile. Successful request will return 204 No Content
.
NOTE: You can only reorder existing media, any differences in the media arrays will result in a 400 Bad Request
response.
Parameter | Type | Required | Description |
---|---|---|---|
images[] | string | Filename of the images to reorder. All images must be specified to reorder them with images[] as the key (eg. images[0]=filename1.jpg, images[1]=filename2.jpg) | |
youtube[] | string | Full Youtube links to reorder. All Youtube links must be specified to reorder them with youtube[] as the key (eg. youtube[0]=https://www.youtube.com/watch?v=IGVZOLV9SPo, youtube[1]=https://www.youtube.com/watch?v=5nY6fjZ3EUc) | |
sketchfab[] | string | Full Sketchfab links to reorder. All Sketchfab links must be specified to reorder with sketchfab[] as the key (eg. sketchfab[0]=https://sketchfab.com/models/71f04e390ff54e5f8d9a51b4e1caab7e, sketchfab[1]=https://sketchfab.com/models/5c85e649dd854cb58c2b9af081ebb0ff) |
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 15036 | The authenticated user does not have permission to delete media from this mod, this action is restricted to team managers & administrators only. | Error Object |
400 | Bad Request | 15064 | The request body contains media that does not exist on the mod, you can only reorder existing media. | Error Object |
Events
Get Mods Events
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/events?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/events?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/events',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/events?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/events', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/events?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/events
Get all mods events for the corresponding game sorted by latest event first. Successful request will return an array of Event Objects.
NOTE: We recommend you poll this endpoint to keep mods up-to-date. If polling this endpoint for updates you should store the id
or date_added
of the latest event, and on subsequent requests use that information in the filter, to return only newer events to process.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the event object. |
mod_id | integer | Unique id of the parent mod. |
user_id | integer | Unique id of the user who performed the action. |
date_added | integer | Unix timestamp of date mod event occurred. |
event_type | string | Type of change that occurred: MODFILE_CHANGED = Live file changed MOD_AVAILABLE = Mod is marked as accepted and public MOD_UNAVAILABLE = Mod is marked as not accepted, deleted or hidden MOD_EDITED = The mod was updated (triggered when any column value changes) MOD_DELETED = The mod has been permanently erased. This is an orphan record, looking up this id will return no data MOD_TEAM_CHANGED = A user has joined or left the mod team MOD_COMMENT_ADDED = A comment has been published for a mod MOD_COMMENT_DELETED = A comment has been deleted from a mod |
latest | boolean |
Default value is true. Returns only the latest unique events, which is useful for checking if the live modfile has changed. |
subscribed | boolean | Default value is false. Returns only events connected to mods the authenticated user is subscribed to, which is useful for keeping the users mods up-to-date. |
Example response
{
"data": [
{
"id": 13,
"mod_id": 13,
"user_id": 13,
"date_added": 1499846132,
"event_type": "MODFILE_CHANGED"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Mod Events |
Get Mod Events
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/events?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/events?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/events',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/events?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/events', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/events?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/events
Get the event log for a mod, showing changes made sorted by latest event first. Successful request will return an array of Event Objects. We recommended reading the filtering documentation to return only the records you want.
Example response
{
"data": [
{
"id": 13,
"mod_id": 13,
"user_id": 13,
"date_added": 1499846132,
"event_type": "MODFILE_CHANGED"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Mod Events |
Tags
Get Game Tag Options
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/tags?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/tags?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/tags',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/tags?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/tags', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/tags?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/tags
Get all tags for the corresponding game, that can be applied to any of its mods. Successful request will return an array of Game Tag Option Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
show_hidden_tags | bool | show the hidden tags associated with the given game. |
Example response
{
"data": [
{
"name": "Theme",
"name_localization": {
"property1": "string",
"property2": "string"
},
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localization": [
{
"tag": "string",
"translations": {
"en": "",
"de": "",
"fr": ""
}
}
],
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Game Tag Options |
Get Mod Tags
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/tags
Get all tags for the corresponding mod. Successful request will return an array of Mod Tag Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
date_added | integer | Unix timestamp of date tag was added. |
tag | string | String representation of the tag. You can check the eligible tags on the parent game object to determine all possible values for this field. |
Example response
{
"data": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Mod Tags |
Add Mod Tags
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'tags[]=easy'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"tags": "easy"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/tags
Add tags to a mod's profile. You can only add tags allowed by the parent game, which are listed in the tag_option
column in the Game's Object. Successful request will return Message Object.
Parameter | Type | Required | Description |
---|---|---|---|
tags[] | string | true | Tags to apply to the mod. Every tag to apply requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2). Only the tags pre-defined by the parent game can be applied. To determine what tags are eligible, see the tags values within tag_options column on the parent Game Object. |
Example response
{
"code": 200,
"message": "Your request was successful."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Created | Message Object | |
403 | Forbidden | 15037 | The authenticated user does not have permission to submit tags for the specified mod. Ensure the user is part of the mod team before attempting the request again. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Delete Mod Tags
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'tags[]=easy'
DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"tags": "easy"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/tags");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/mods/{mod-id}/tags
Delete tags from a mod's profile. Deleting tags is identical to adding tags except the request method is DELETE
instead of POST
. Successful request will return 204 No Content
.
Parameter | Type | Required | Description |
---|---|---|---|
tags[] | string | true | Tags to delete from the mod's profile. Every tag to delete requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2). |
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 15038 | The authenticated user does not have permission to delete tags for the specified mod. Ensure the user is part of the mod team before attempting the request again. | Error Object |
Ratings
Add Collection Rating
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/compatibility \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'rating=1'
POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/compatibility HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/compatibility',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"rating": "1"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/compatibility',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/compatibility', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/compatibility");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/collections/{collection-id}/compatibility
Submit a positive or negative rating for a collection. Each user can supply only one rating for a collection, subsequent ratings will override the old value. Successful request will return Message Object.
NOTE: You can order collections by their rating, and view their rating in the Mod Collection Object.
Parameter | Type | Required | Description |
---|---|---|---|
rating | integer | true | The authenticated users collection rating: 1 = Positive rating (thumbs up) -1 = Negative rating (thumbs down) 0 = No rating (removes any previous submitted rating) |
Example response
{
"code": 201,
"message": "You have successfully submitted a rating for the specified mod."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Created | Message Object | |
400 | Bad Request | 15028 | The authenticated user has already submitted a rating for this collection. | Error Object |
400 | Bad Request | 15043 | The authenticated user is trying to revert a rating that doesn't exist. | Error Object |
Add Mod Rating
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/ratings \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'rating=1'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/ratings HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/ratings',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"rating": "1"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/ratings',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/ratings', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/ratings");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/ratings
Submit a positive or negative rating for a mod. Each user can supply only one rating for a mod, subsequent ratings will override the old value. Successful request will return Message Object.
NOTE: You can order mods by their rating, and view their rating in the Mod Object.
Parameter | Type | Required | Description |
---|---|---|---|
rating | integer | true | The authenticated users mod rating: 1 = Positive rating (thumbs up) -1 = Negative rating (thumbs down) 0 = No rating (removes any previous submitted rating) |
Example response
{
"code": 201,
"message": "You have successfully submitted a rating for the specified mod."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Created | Message Object | |
400 | Bad Request | 15028 | The authenticated user has already submitted a rating for this mod. | Error Object |
400 | Bad Request | 15043 | The authenticated user is trying to revert a rating that doesn't exist. | Error Object |
Stats
Get Game Stats
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/stats?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/stats?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/stats',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/stats?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/stats', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/stats?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/stats
Get game stats for the corresponding game. Successful request will return a single Game Stats Object.
Example response
{
"game_id": 2,
"mods_count_total": 13,
"mods_downloads_today": 204,
"mods_downloads_total": 27492,
"mods_downloads_daily_average": 1230,
"mods_subscribers_total": 16394,
"date_expires": 1492564103
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Game Stats Object |
Get Mods Stats
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/stats?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/stats?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/stats',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/stats?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/stats', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/stats?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/stats
Get all mod stats for mods of the corresponding game. Successful request will return an array of Mod Stats Objects.
NOTE: We highly recommend you apply filters to this endpoint to get only the results you need. For more information regarding filtering please see the filtering section.
Filter | Type | Description |
---|---|---|
mod_id | integer | Unique id of the mod. |
popularity_rank_position | integer | Current ranking by popularity for the corresponding mod. |
popularity_rank_total_mods | integer | Global mod count in which popularity_rank_position is compared against. |
downloads_total | integer | A sum of all modfile downloads for the corresponding mod. |
subscribers_total | integer | A sum of all current subscribers for the corresponding mod. |
ratings_positive | integer | Amount of positive ratings. |
ratings_negative | integer | Amount of negative ratings. |
Example response
{
"data": [
{
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Mod Stats |
Get Mod Stats
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/stats?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/stats?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/stats',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/stats?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/stats', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/stats?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/stats
Get mod stats for the corresponding mod. Successful request will return a single Mod Stats Object.
Example response
{
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Mod Stats Object |
Metadata
Get Mod KVP Metadata
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/metadatakvp
Get all metadata stored by the game developer for this mod as searchable key value pairs. Successful request will return an array of Metadata KVP Objects.
NOTE: Metadata can also be stored as metadata_blob
in the Mod Object.
Example response
{
"data": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Mod KVP Metadata |
Add Mod KVP Metadata
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'metadata[]=pistol-dmg:88:400'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"metadata": "pistol-dmg:88:400"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/metadatakvp
Add metadata for this mod as searchable key value pairs. Metadata is useful to define how a mod works, or other information you need to display and manage the mod. Successful request will return Message Object.
For example: A mod might change gravity and the rate of fire of weapons, you could define these properties as key value pairs. We recommend the mod upload tool you create defines and submits metadata behind the scenes, because if these settings affect gameplay, invalid information may cause problems.
NOTE: Metadata can also be stored as metadata_kvp
in the Mod Object.
Parameter | Type | Required | Description |
---|---|---|---|
metadata[] | string | true | Key value pairs you want to add where key and value are separated by a colon ':'. Every pair to add requires a separate field with metadata[] as the key (eg. metadata[]=pistol-dmg:800, metadata[]=gravity:9.8). NOTE: If the string contains multiple colons the split will occur on the first matched, eg. sword-speed-power:100:10 will become key: sword-speed-power , value: 100:10 ). The following restrictions apply to the supplied metadata:- Keys support alphanumeric, '_' and '-' characters only. - Keys can map to multiple values (1-to-many relationship). - Keys and values cannot exceed 255 characters in length. - Key value pairs are searchable by exact match only. |
Example response
{
"code": 201,
"message": "You have successfully added new key-value metadata to the specified mod."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Created | Message Object | |
403 | Forbidden | 15013 | The authenticated user does not have permission to update this mod. Ensure the user is part of the mod team before attempting the request again. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Delete Mod KVP Metadata
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'metadata[]=pistol-dmg:88:400'
DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"metadata": "pistol-dmg:88:400"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/metadatakvp");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/mods/{mod-id}/metadatakvp
Delete key value pairs metadata defined for this mod. Successful request will return 204 No Content
.
Parameter | Type | Required | Description |
---|---|---|---|
metadata[] | string | true | Key value pairs you want to delete where the the key and value are separated by a colon ':'. Every pair to delete requires a separate field with metadata[] as the key (eg. metadata[]=pistol-dmg:800, metadata[]=gravity:9.8). NOTE: If the string contains only the key and no colon ':', all metadata with that key will be removed. |
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 15013 | The authenticated user does not have permission to delete metadata from this mod, this action is restricted to team managers & administrators only. | Error Object |
Dependencies
Get Mod Dependencies
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/dependencies
Get all dependencies the chosen mod has selected. This is useful if a mod requires other mods be installed for it to run. Successful request will return an array of Mod Dependencies Objects.
NOTE: This endpoint returns all mod dependencies, irrespective of their status, visibility or platform support. If your game automatically installs dependencies, we recommend moderating the use of this feature strictly, to ensure creators are not selecting soft dependencies to promote or credit other mods, and dependencies are checked for suitability prior to install.
For example: the official mod.io plugins where dependency support is enabled, typically subscribe users to all dependencies, so the mods suitability and synchronization can be managed by the subscription process. Following a similar process is recommend, particularly if enabling recursive
dependency fetching, given it can result in many mods being returned.
DEPRECATION WARNING: By default, this endpoint does not return dependencies recursively. However, in a future version of the API, dependencies will be shown recursively by default. We suggest that you remove any custom implementation you may have in order to retrieve dependencies recursively, and instead use the ?recursive=true
query parameter to fetch all dependencies in a single request.
Filter | Type | Description |
---|---|---|
recursive | boolean | Recommended. Include child dependencies in a recursive manner. A value of true will display dependencies up to a maximum depth of 5. A value of false will only display immediate dependencies.Defaults to false .NOTE: This will be enabled by default in API v2. |
Example response
{
"data": [
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
},
"dependency_depth": 0
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Mod Dependencies |
Add Mod Dependencies
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'dependencies[]=284' \
-d 'sync=false'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"dependencies": "284",
"sync": "false"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/dependencies
Add mod dependencies required by the corresponding mod. A dependency is a mod that should be installed for this mod to run. Successful request will return Message Object.
Parameter | Type | Required | Description |
---|---|---|---|
dependencies[] | integer | true | One or more mod IDs that this mod is dependent on. Every dependency to add requires a separate field with dependencies[] as the key (eg. dependencies[]=1, dependencies[]=2). Max of 5 dependencies per request. |
sync | integer | false | If true, will remove all existing dependencies and replace with the new ones provided in the request (if any). |
Example response
{
"code": 201,
"message": "You have successfully updated the dependencies for the specified mod."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Created | Message Object | |
403 | Forbidden | 15031 | The authenticated user does not have permission to add dependencies for this mod, this action is restricted to team managers & administrators only. | Error Object |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL to newly created resource |
Delete Mod Dependencies
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'dependencies[]=284'
DELETE https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"dependencies": "284"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependencies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/mods/{mod-id}/dependencies
Delete mod dependencies the corresponding mod has selected. Successful request will return 204 No Content
.
Parameter | Type | Required | Description |
---|---|---|---|
dependencies[] | integer | true | One or more mod IDs you want to delete as a dependency. Every dependency to delete requires a separate field with dependencies[] as the key (eg. dependencies[]=1, dependencies[]=2). |
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 15032 | The authenticated user does not have permission to delete dependencies for this mod, this action is restricted to team managers & administrators only. | Error Object |
Get Mod Dependants
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependants?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependants?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependants',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependants?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependants', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/dependants?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/dependants
Get all mods depending on the given mod. Successful request will return an array of Mod Dependants Objects.
NOTE: This endpoint returns all mod dependents, irrespective of their status, visibility or platform support.
Example response
{
"data": [
{
"mod_id": 231,
"name": "Example Mod",
"name_id": "rogue-knight-hd-pack",
"status": 1,
"visible": 1,
"date_added": 1499841487,
"date_updated": 1499841487,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Mod Dependants |
Teams
Get Mod Team Members
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/team?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/team?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/team',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/team?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/team', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/team?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/team
Get all users that are part of a mod team. Successful request will return an array of Team Member Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Required | Description |
---|---|---|---|
id | integer | Unique id of the team member record. | |
user_id | integer | Unique id of the user. | |
username | string | Display name of the user. | |
level | integer | Level of permission the user has: 1 = Moderator (can moderate comments and content attached) 4 = Manager (moderator access, including uploading builds and editing settings except supply and team members) 8 = Administrator (full access, including editing the supply and team) |
|
date_added | integer | Unix timestamp of the date the user was added to the team. | |
pending | integer | Has the user accepted the team invite? 0 = Accepted 1 = Pending |
Example response
{
"data": [
{
"id": 457,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"level": 8,
"date_added": 1492058857,
"position": "Turret Builder",
"invite_pending": 1
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Team Members |
Reports
Submit Report
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/report \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'resource=mods' \
-d 'id=3853' \
-d 'type=1' \
-d 'reason=0' \
-d 'platforms=0' \
-d 'name=Name of the user submitting the report' \
-d 'contact=Contact details of the user submitting the report' \
-d 'summary=Detailed explanation for report here'
POST https://*.modapi.io/v1/report HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/report',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"resource": "mods",
"id": 3853,
"type": 1,
"reason": 0,
"platforms": 0,
"name": "Name of the user submitting the report",
"contact": "Contact details of the user submitting the report",
"summary": "Detailed explanation for report here"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/report',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/report', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/report");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /report
The purpose of this endpoint is enable users to report a resource (game, mod or user) on mod.io. Successful request will return Message Object.
IMPORTANT: It is a requirement of the Game Terms with mod.io, and the platforms mod.io is used on (including but not limited to Steam, PlayStation, Nintendo and Xbox), to ensure all displayed content is reportable by users. You can enable a resource to be reported (by implementing a dialog similar to the example below) or linking to the report page on mod.io.
Example Dialog:
NOTE: If implementing your own report dialog, the Terms of Use and Privacy Policy must be correctly linked, or displayed inline using the agreements endpoints to get the latest versions.
If you wish to display the agreements in a web browser overlay, we recommend adding /widget and ?no_links=true to the end of the agreement URLs, to remove the menus and external links, for example:
- https://mod.io/terms/widget?no_links=true
- https://mod.io/privacy/widget?no_links=true
NOTE: If you prefer to display the report page in a web browser overlay, and you know the resource you want to report, the best URL to use is: https://mod.io/report/resource
/id
/widget
For example to report a mod with an ID of 1 the URL would be: https://mod.io/report/mods
/1
/widget. If you don't know the ID of the resource you wish to report, you can use the generic report URL: https://mod.io/report/widget
NOTE: If you are a game owner or manager, you can view all reports submitted for your game(s), and you are responsible for actioning reports. You can also configure in your game's control panel the number of reports required before content is automatically taken down for review.
Read our Terms of Use for information about what is/isn't acceptable.
Parameter | Type | Required | Description |
---|---|---|---|
resource | string | true | Type of resource you are reporting. Must be one of the following values: - games - mods - users - guides - collections. |
id | integer | true | Unique id of the resource you are reporting. |
type | integer | true | Type of report you are submitting. Must be one of the following values: 0 = Generic 1 = DMCA 2 = Not Working 3 = Rude Content 4 = Illegal Content 5 = Stolen Content 6 = False Information 7 = Other. The types of reports available when reporting collections slightly differ, available options are: 2 = Not Working 3 = Rude Content 5 = Stolen Content., |
name | string | Name of the user submitting the report. Recommended for DMCA reports. | |
contact | string | Contact details of the user submitting the report. Recommended for DMCA reports. | |
summary | string | true | Detailed description of your report. Make sure you include all relevant information and links to help moderators investigate and respond appropriately. Our online reporting process shows the information we collect and put into the name , contact and summary fields as appropiate. We recommend you implement a similar flow in-game. |
» reason
Optional category for the report, applicable to reports where type
is
set to 2
(Not Working) reports. May be one of:
- 0
: No reason provided
- 1
: Crashes Game
- 2
: Does Not Load
- 3
: Conflicts With Other Mods
- 4
: Missing Dependencies
- 5
: Installation Issues
- 6
: Buggy Behavior
- 7
: Incompatible With Game Version
- 8
: File Corruption
» platforms
Optional platform for the report, applicable to reports where type
is set to 2
(Not Working) reports. If X-Modio-Platform is present, platform will be
set automatically if not provided. May be one of:
- windows
- mac
- linux
- android
- ios
- xboxone
- xboxseriesx
- ps4
- ps5
- switch
- oculus
- source
- xboxone_draft
Example response
{
"code": 201,
"message": "You have successfully submitted a report and it will be reviewed by the mod.io team as soon as possible."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Report Created | Message Object | |
403 | Forbidden | 15029 | The authenticated user does not have permission to submit reports on mod.io due to their access being revoked. | Error Object |
403 | Forbidden | 15030 | The specified resource is not able to be reported at this time, this is potentially due to the resource in question being removed. | Error Object |
404 | Not Found | 14000 | The resource to be reported could not be found. | Error Object |
Agreements
Get Current Agreement
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/agreements/types/{agreement-type-id}/current?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/agreements/types/{agreement-type-id}/current?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/agreements/types/{agreement-type-id}/current',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/agreements/types/{agreement-type-id}/current?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/agreements/types/{agreement-type-id}/current', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/agreements/types/{agreement-type-id}/current?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /agreements/types/{agreement-type-id}/current
Get the current agreement (version) by type. Successful request will return a single Agreement Version Object.
Valid agreement types are:
1 = Terms of Use - https://mod.io/terms
2 = Privacy Policy - https://mod.io/privacy
3 = Game Terms - https://mod.io/gameterms
4 = API Access Terms - https://mod.io/apiterms
5 = Monetization Terms - https://mod.io/monetization
6 = Acceptable Use Policy - https://mod.io/aup
7 = Cookies Policy - https://mod.io/cookies
8 = Refund Policy - https://mod.io/refund
There are three ways you can display mod.io agreements. Pick which is easiest and most suitable for your implementation.
1. Linking to the applicable agreement using the URLs listed above.
2. Using this endpoint to fetch the applicable agreement and create a UI to display it inline.
3. Web browser overlay to display the applicable agreement inline. If doing this, we recommend prefixing the agreement URL path with /legal
to remove all menus, and if wanting to remove all links add ?no_links=true
to the end of the URL. For example use:
- https://mod.io/legal/terms to remove menus
- https://mod.io/legal/terms?no_links=true to remove menus and links
Example response
{
"id": 1,
"is_active": true,
"is_latest": true,
"type": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1509922961,
"date_updated": 1509922961,
"date_live": 1509922961,
"name": "Terms of Use",
"changelog": "",
"description": "Privacy Agreement - 20/11/2020.....",
"adjacent_versions": "'previous': { 'id': 13, 'date_live': 1592381157 }, 'next': { 'id': 31, 'date_live': 1722400117 }"
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Agreement Version Object | |
404 | Not Found | 14000 | Agreement could not be found. | Error Object |
Get Agreement Version
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/agreements/versions/{agreement-version-id}?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/agreements/versions/{agreement-version-id}?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/agreements/versions/{agreement-version-id}',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/agreements/versions/{agreement-version-id}?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/agreements/versions/{agreement-version-id}', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/agreements/versions/{agreement-version-id}?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /agreements/versions/{agreement-version-id}
Get the specified agreement version. Successful request will return an Agreement Version Object.
Example response
{
"id": 1,
"is_active": true,
"is_latest": true,
"type": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1509922961,
"date_updated": 1509922961,
"date_live": 1509922961,
"name": "Terms of Use",
"changelog": "",
"description": "Privacy Agreement - 20/11/2020.....",
"adjacent_versions": "'previous': { 'id': 13, 'date_live': 1592381157 }, 'next': { 'id': 31, 'date_live': 1722400117 }"
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Agreement Version Object | |
403 | Forbidden | 14019 | Only administrators can view agreement templates. | Error Object |
404 | Not Found | 14000 | Agreement could not be found. | Error Object |
Users
Mute a User
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/users/{user-id}/mute \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
POST https://*.modapi.io/v1/users/{user-id}/mute HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/users/{user-id}/mute',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/users/{user-id}/mute',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/users/{user-id}/mute', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/users/{user-id}/mute");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /users/{user-id}/mute
Mute a user. This will prevent mod.io from returning mods to you authored by the muted user. Successful request will return 204 No Content
.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
403 | Forbidden | 17039 | You cannot mute yourself, you should potentially show restraint instead. | Error Object |
404 | Not Found | 17000 | The user with the supplied id could not be found. | Error Object |
Unmute a User
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/users/{user-id}/mute \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/users/{user-id}/mute HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/users/{user-id}/mute',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/users/{user-id}/mute',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/users/{user-id}/mute', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/users/{user-id}/mute");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /users/{user-id}/mute
Unmute a previously muted user. This will re-enable mod.io to returning mods to you authored by the muted user. Successful request will return 204 No Content
.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
404 | Not Found | 17000 | The user with the supplied id could not be found. | Error Object |
Me
Get Authenticated User
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me \
-H 'Authorization: Bearer {access-token}' \
-H 'X-Modio-Delegation-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
X-Modio-Delegation-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
var headers = {
'Authorization':'Bearer {access-token}',
'X-Modio-Delegation-Token':'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'X-Modio-Delegation-Token':'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'X-Modio-Delegation-Token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me
Get the authenticated user details. Successful request will return a single User Object. This endpoint is optionally available as an S2S Service to Service request with an oauth S2S token. This behaves in the same way and will display user info for the account that created the S2S token. To retrieve another users info instead, you can optionally pass in a User Delegate Token when doing an S2S request. UDT can only be used when doing an S2S request.
Example response
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | User Object |
Get User Collections
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/collections \
-H 'Origin: https://mod.io' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/collections HTTP/1.1
Host: *.modapi.io
Accept: application/json
Origin: https://mod.io
Authorization: Bearer {access-token}
var headers = {
'Origin':'https://mod.io',
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/collections',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Origin':'https://mod.io',
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/collections',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Origin': 'https://mod.io',
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/collections', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/collections");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/collections
Browse collections the currently authenticated user is following. Successful request will return an array of Mod Collection Objects.
Example response
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get User Collections |
Get User Followed Collections
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/following/collections \
-H 'Origin: https://mod.io' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/following/collections HTTP/1.1
Host: *.modapi.io
Accept: application/json
Origin: https://mod.io
Authorization: Bearer {access-token}
var headers = {
'Origin':'https://mod.io',
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/following/collections',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Origin':'https://mod.io',
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/following/collections',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Origin': 'https://mod.io',
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/following/collections', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/following/collections");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/following/collections
Browse collections the currently authenticated user is following. Successful request will return an array of Mod Collection Objects.
Example response
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get User Followed Collections |
Get User Events
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/events?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/events?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/events',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/events?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/events', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/events?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/events
Deprecated: This endpoint is deprecated for in-game use and will be removed at a later date. As of March 31st 2024, events will only be returned for existing games for legacy reasons. Any new game should use the Get User Subscriptions endpoint to fetch the latest mods subscribed to by the authenticated user as this endpoint will no longer return events for games created after that date. If you have any concerns please reach out to us.
Get events that have been fired specific to the user. Successful request will return an array of Event Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the event object. |
game_id | integer | Unique id of the parent game. |
mod_id | integer | Unique id of the parent mod. |
user_id | integer | Unique id of the user who performed the action. |
date_added | integer | Unix timestamp of date mod was updated. |
event_type | string | Type of change that occurred: USER_TEAM_JOIN = User has joined a team. USER_TEAM_LEAVE = User has left a team. USER_SUBSCRIBE = User has subscribed to a mod. USER_UNSUBSCRIBE = User has un-subscribed from a mod. |
Example response
{
"data": [
{
"id": 13,
"game_id": 7,
"mod_id": 13,
"user_id": 13,
"date_added": 1499846132,
"event_type": "USER_SUBSCRIBE"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get User Events |
Get User Modfiles
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/files \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/files HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/files',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/files',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/files', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/files
Get all modfiles the authenticated user uploaded. Successful request will return an array of Modfile Objects. We recommended reading the filtering documentation to return only the records you want.
NOTE: If the game requires mod downloads to be initiated via the API, the binary_url
returned will contain a verification hash. This hash must be supplied to get the modfile, and will expire after a certain period of time. Saving and reusing the binary_url
won't work in this situation given it's dynamic nature.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the file. |
mod_id | integer | Unique id of the mod. |
date_added | integer | Unix timestamp of date file was added. |
date_scanned | integer | Unix timestamp of date file was virus scanned. |
virus_status | integer | Current virus scan status of the file. For newly added files that have yet to be scanned this field will change frequently until a scan is complete: 0 = Not scanned 1 = Scan complete 2 = In progress 3 = Too large to scan 4 = File not found 5 = Error Scanning |
virus_positive | integer | Was a virus detected: 0 = No threats detected 1 = Flagged as malicious 2 = Flagged as containing potentially harmful files (i.e. EXEs) |
filesize | integer | Size of the file in bytes. |
filehash | string | MD5 hash of the file. |
filename | string | Filename including extension. |
version | string | Release version this file represents. |
changelog | string | Changelog for the file. |
metadata_blob | string | Metadata that is designed to be handled by the game client. As an example, this may include properties as to how the item works, or other information you need to display. Metadata can also be stored as searchable key value pairs, and to individual mod files. |
platform_status | string | If the parent game has enabled per-platform files, by default only files which are approved and live for the target platform will be returned. To request pending files, you can filter results by their current platform status, using pending_only , approved_only , live_and_approved or live_and_pending . |
Example response
{
"data": [
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | Get Modfiles |
Get User Games
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/games \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/games HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/games',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/games',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/games', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/games");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/games
Get all games the authenticated user added or is a team member of. Successful request will return an array of Game Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the game. |
status | integer | Status of the game (only admins can filter by this field, see status and visibility for details): 0 = Not Accepted 1 = Accepted 3 = Deleted |
submitted_by | integer | Unique id of the user who has ownership of the game. |
date_added | integer | Unix timestamp of date game was registered. |
date_updated | integer | Unix timestamp of date game was updated. |
date_live | integer | Unix timestamp of date game was set live. |
name | string | Name of the game. |
name_id | string | Path for the game on mod.io. For example: https://mod.io/g/gamename |
summary | string | Summary of the games mod support. |
instructions_url | string | Link to a mod.io guide, modding wiki or a page where modders can learn how to make and submit mods. |
ugc_name | string | Word used to describe user-generated content (mods, items, addons etc). |
presentation_option | integer | Presentation style used on the mod.io website: 0 = Grid View: Displays mods in a grid 1 = Table View: Displays mods in a table |
submission_option | integer | Submission process modders must follow: 0 = Mod uploads must occur via the API using a tool created by the game developers 1 = Mod uploads can occur from anywhere, including the website and API |
curation_option | integer | Curation options enabled by this game to approve mods: 0 = No curation: Mods are immediately available to play 1 = Price change approval: Pricing changes for marketplace mods queued for acceptance 2 = Full curation: All mods must be accepted by someone to be listed |
dependency_option | integer | Dependency option for this game's mods: 0 = Disallow dependencies 1 = Allow dependencies, mods must opt in 2 = Allow dependencies, mods must opt out 3 = Allow dependencies with no restrictions |
community_options | integer | Community features enabled for this game: 0 = None 1 = Allow comments on mods 2 = Allow guides 4 = Pin on homepage 8 = Show on homepage 16 = Show more on homepage 32 = Allow change status 64 = Enable Previews (Game must be hidden) 128 = Allow preview share-URL (Previews must be enabled) 256 = Allow negative ratings 512 = Allow mods to be edited via web 1024 = Allow mod dependencies 2048 = Allow comments on guides ? = Combine to find games with multiple options enabled (see BITWISE fields) |
monetization_options | integer | Monetization options enabled for this game: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by mod.io 2 = Marketplace enabled 4 = Creator partner program enabled 8 = Quantity limited mods supported 16 = All mods must be quantity limited ? = Combine to find games with multiple options enabled (see BITWISE fields) |
api_access_options | integer | Level of API access allowed by this game: 0 = None 1 = Allow 3rd parties to access this games API endpoints 2 = Allow mods to be downloaded directly (if disabled all download URLs will contain a frequently changing verification hash to stop unauthorized use) 4 = Requires a bearer token to be supplied when attempting the download to enforce authenticated downloads only 8 = Requires a bearer token to be supplied and for the user to own the file when attempting the download ? = Combine to find games with multiple options enabled (see BITWISE fields) |
maturity_options | integer | Mature content setup for this game: 0 = Don't allow mature content in mods 1 = Allow mature content in mods 2 = This game is for mature audiences only |
Display | Type | Description |
---|---|---|
show_hidden_tags | bool | show the hidden tags associated with the given game. |
Sort | Description |
---|---|
name | Sort results alphabetically by name using the _sort query parameter name . For example _sort=name would return games from A-Z. |
date_live | Sort results by the date they went live using the _sort query parameter date_live . For example _sort=-date_live would return the most recently live games. |
date_updated | Sort results by the date they were last updated using the _sort query parameter date_updated . For example _sort=-date_updated would return the most recently updated games. |
downloads_today | Sort results by the number of mod downloads in the last 24hours using the _sort query parameter downloads_today . For example _sort=-downloads_today would return the most popular games from the last 24hours based on the number of mod downloads. |
downloads_total | Sort results by the total number of mod downloads using the _sort query parameter downloads_total . For example _sort=-downloads_total would return the most popular games based on the number of mod downloads. |
subscribers_total | Sort results by the total number of mod subscribers using the _sort query parameter subscribers_total . For example _sort=-subscribers_total would return the most popular games based on number of mod subscribers. |
mods_count_total | Sort results by the number of mods using the _sort query parameter mods_count_total . For example _sort=-mods_count_total would return the games with the most number of mods submitted. |
Example response
{
"data": [
{
"id": 2,
"status": 1,
"submitted_by": null,
"date_added": 1493702614,
"date_updated": 1499410290,
"date_live": 1499841403,
"presentation_option": 0,
"submission_option": 1,
"dependency_option": 0,
"curation_option": 0,
"community_options": 3,
"monetization_options": 0,
"limit_collection_mods": 100,
"monetization_team": {
"team_id": "1"
},
"cloud_cooking_status": 0,
"revenue_options": 0,
"max_stock": 8388607,
"api_access_options": 3,
"maturity_options": 0,
"ugc_name": "mods",
"token_name": "MIO",
"icon": {
"filename": "icon.png",
"original": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_64x64": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_128x128": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_256x256": "https://assets.modcdn.io/images/placeholder/icon.png"
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"header": {
"filename": "modio-logo-bluedark.png",
"original": "https://assets.modcdn.io/images/branding/modio-logo-bluedark.png"
},
"name": "Rogue Knight",
"name_id": "rogue-knight",
"summary": "Rogue Knight is a brand new 2D pixel platformer that supports custom levels and characters.",
"instructions": "Instructions on the process to upload mods.",
"instructions_url": "https://www.rogue-knight-game.com/modding/getting-started",
"profile_url": "https://mod.io/g/rogue-knight",
"other_urls": [
{
"label": "Our Steam Page",
"url": "https://www.steampowered.com/2348329042"
}
],
"tag_options": [
{
"name": "Theme",
"name_localized": "string",
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localized": {
"Horror": "Horreur"
},
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
}
],
"stats": {
"game_id": 2,
"mods_count_total": 13,
"mods_downloads_today": 204,
"mods_downloads_total": 27492,
"mods_downloads_daily_average": 1230,
"mods_subscribers_total": 16394,
"date_expires": 1492564103
},
"theme": {
"primary": "#44bfd5",
"dark": "#2c2c3f",
"light": "#ffffff",
"success": "#68D391",
"warning": "#d6af2e",
"danger": "#ff000e"
},
"platforms": [
{
"platform": "ps5",
"label": "PlayStation 5",
"moderated": true,
"locked": true
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | Get Games |
Get User Subscriptions
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/subscribed \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/subscribed HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/subscribed',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/subscribed',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/subscribed', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/subscribed");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/subscribed
Get all mod's the authenticated user is subscribed to. Successful request will return an array of Mod Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the mod. |
game_id | integer | Unique id of the parent game. |
status | integer | Status of the mod (only game admins can filter by this field, see status and visibility for details): 0 = Not accepted (default) 1 = Accepted (default) 3 = Deleted |
visible | integer | Visibility of the mod (only game admins can filter by this field, see status and visibility for details): 0 = Hidden (default) 1 = Public (default) |
submitted_by | integer | Unique id of the user who has ownership of the mod. |
date_added | integer | Unix timestamp of date mod was registered. |
date_updated | integer | Unix timestamp of date mod was updated. |
date_live | integer | Unix timestamp of date mod was set live. |
maturity_option | integer | Mature content found in this mod: 0 = None 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Combine to find mods with multiple options enabled (see BITWISE fields) |
monetization_options | integer | Monetization options enabled for this mod: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by the game for this mod 2 = Marketplace enabled 8 = Quantity of this mod is limited ? = Combine to find mods with multiple options enabled (see BITWISE fields) |
name | string | Name of the mod. |
name_id | string | Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/mod-name-id-here |
modfile | integer | Unique id of the file that is the current active release (see mod files). |
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. |
metadata_kvp | string | Colon-separated values representing the key-value pairs you want to filter the results by. If you supply more than one key-pair, separate the pairs by a comma. Will only filter by an exact key-pair match. |
tags | string | Comma-separated values representing the tags you want to filter the results by. If you specify multiple tags, only mods which have all tags will be returned, and only tags that are supported by the parent game can be applied. To determine what tags are eligible, see the tags values within tag_options column on the parent Game Object. If you want to ensure mods returned do not contain particular tag(s), you can use the tags-not-in filter either independently or alongside this filter. |
platform_status | string | If the parent game has enabled per-platform files, by default only mods with files which are approved and live for the target platform will be returned. To QA mods with pending files, you can filter results by their current platform status, using pending_only or live_and_pending .NOTE: only game admins can filter by this field. |
Sort | Description |
---|---|
name | Sort results alphabetically by name using the _sort query parameter name . For example _sort=name would return mods from A-Z. |
date_live | Sort results by the date they went live using the _sort query parameter date_live . For example _sort=-date_live would return the most recently live mods. |
date_updated | Sort results by the date they were last updated using the _sort query parameter date_updated . For example _sort=-date_updated would return the most recently updated mods. |
submitted_by | Sort results by the creators ID using the _sort query parameter submitted_by . For example _sort=submitted_by would return mods from creators who have been registered the longest. |
downloads_today | Sort results by the number of downloads in the last 24hours using the _sort query parameter downloads_today . For example _sort=-downloads_today would return the most popular mods from the last 24hours based on the number of mod downloads. |
downloads_total | Sort results by the total number of downloads using the _sort query parameter downloads_total . For example _sort=-downloads_total would return the most popular mods based on the number of downloads. |
subscribers_total | Sort results by the total number of subscribers using the _sort query parameter subscribers_total . For example _sort=-subscribers_total would return the most popular mods based on number of subscribers. |
ratings_weighted_aggregate | Sort results by their calculated rating (thumbs up / down received) using the _sort query parameter ratings_weighted_aggregate . For example _sort=-ratings_weighted_aggregate would return the highest rated mods. |
Example response
{
"data": [
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Cross-Platform Filtering
If the parent game has platform filtering enabled, this endpoint supports the targeting a platform request header to return the mods that are approved for the requested platform. Note: To target a platform for this endpoint, you MUST also include the game_id
filter for the game that has cross-platform filtering enabled.
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | Get Mods |
Get User Mods
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/mods \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/mods HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/mods',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/mods',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/mods', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/mods");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/mods
Get all mods the authenticated user added or is a team member of. Successful request will return an array of Mod Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the mod. |
game_id | integer | Unique id of the parent game. |
status | integer | Status of the mod: 0 = Not accepted (default) 1 = Accepted (default) 3 = Deleted (default) |
visible | integer | Visibility of the mod: 0 = Hidden (default) 1 = Public (default) |
submitted_by | integer | Unique id of the user who has ownership of the mod. |
date_added | integer | Unix timestamp of date mod was registered. |
date_updated | integer | Unix timestamp of date mod was updated. |
date_live | integer | Unix timestamp of date mod was set live. |
maturity_option | integer | Mature content found in this mod: 0 = None 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Combine to find mods with multiple options enabled (see BITWISE fields) |
monetization_options | integer | Monetization options enabled for this mod: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by the game for this mod 2 = Marketplace enabled 8 = Quantity of this mod is limited ? = Combine to find mods with multiple options enabled (see BITWISE fields) |
name | string | Name of the mod. |
name_id | string | Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/mod-name-id-here |
modfile | integer | Unique id of the file that is the current active release (see mod files). |
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. |
metadata_kvp | string | Colon-separated values representing the key-value pairs you want to filter the results by. If you supply more than one key-pair, separate the pairs by a comma. Will only filter by an exact key-pair match. |
tags | string | Comma-separated values representing the tags you want to filter the results by. If you specify multiple tags, only mods which have all tags will be returned, and only tags that are supported by the parent game can be applied. To determine what tags are eligible, see the tags values within tag_options column on the parent Game Object. If you want to ensure mods returned do not contain particular tag(s), you can use the tags-not-in filter either independently or alongside this filter. |
platform_status | string | Filter results by their current platform status, valid values are pending_only and live_and_pending .NOTE: that this parameter is only considered in the request if the parent game has enabled cross-platform filtering. |
Sort | Description |
---|---|
name | Sort results alphabetically by name using the _sort query parameter name . For example _sort=name would return mods from A-Z. |
date_live | Sort results by the date they went live using the _sort query parameter date_live . For example _sort=-date_live would return the most recently live mods. |
date_updated | Sort results by the date they were last updated using the _sort query parameter date_updated . For example _sort=-date_updated would return the most recently updated mods. |
submitted_by | Sort results by the creators ID using the _sort query parameter submitted_by . For example _sort=submitted_by would return mods from creators who have been registered the longest. |
downloads_today | Sort results by the number of downloads in the last 24hours using the _sort query parameter downloads_today . For example _sort=-downloads_today would return the most popular mods from the last 24hours based on the number of mod downloads. |
downloads_total | Sort results by the total number of downloads using the _sort query parameter downloads_total . For example _sort=-downloads_total would return the most popular mods based on the number of downloads. |
subscribers_total | Sort results by the total number of subscribers using the _sort query parameter subscribers_total . For example _sort=-subscribers_total would return the most popular mods based on number of subscribers. |
ratings_weighted_aggregate | Sort results by their calculated rating (thumbs up / down received) using the _sort query parameter ratings_weighted_aggregate . For example _sort=-ratings_weighted_aggregate would return the highest rated mods. |
Example response
{
"data": [
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | Get Mods |
Get User Purchases
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/purchased?api_key=YourApiKey \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/purchased?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/purchased',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/purchased?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/purchased', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/purchased?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/purchased
Get all mod's the authenticated user has purchased. Successful request will return an array of Mod Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the mod. |
game_id | integer | Unique id of the parent game. |
status | integer | Status of the mod (only game admins can filter by this field, see status and visibility for details): 0 = Not accepted (default) 1 = Accepted (default) 3 = Deleted |
visible | integer | Visibility of the mod (only game admins can filter by this field, see status and visibility for details): 0 = Hidden (default) 1 = Public (default) |
submitted_by | integer | Unique id of the user who has ownership of the mod. |
date_added | integer | Unix timestamp of date mod was registered. |
date_updated | integer | Unix timestamp of date mod was updated. |
date_live | integer | Unix timestamp of date mod was set live. |
maturity_option | integer | Mature content found in this mod: 0 = None 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Combine to find mods with multiple options enabled (see BITWISE fields) |
monetization_options | integer | Monetization options enabled for this mod: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by the game for this mod 2 = Marketplace enabled 8 = Quantity of this mod is limited ? = Combine to find mods with multiple options enabled (see BITWISE fields) |
name | string | Name of the mod. |
name_id | string | Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/mod-name-id-here |
modfile | integer | Unique id of the file that is the current active release (see mod files). |
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. |
metadata_kvp | string | Colon-separated values representing the key-value pairs you want to filter the results by. If you supply more than one key-pair, separate the pairs by a comma. Will only filter by an exact key-pair match. |
tags | string | Comma-separated values representing the tags you want to filter the results by. If you specify multiple tags, only mods which have all tags will be returned, and only tags that are supported by the parent game can be applied. To determine what tags are eligible, see the tags values within tag_options column on the parent Game Object. If you want to ensure mods returned do not contain particular tag(s), you can use the tags-not-in filter either independently or alongside this filter. |
platform_status | string | Filter results by their current platform status, valid values are pending_only and live_and_pending (only game admins can filter by this field, see status and visibility for details).NOTE: that this parameter is only considered in the request if the parent game has enabled cross-platform filtering. |
platforms | string | Filter results by their current platform, accepts multiple platforms as comma-separated values (e.g. ps4,switch ), valid values are all , source , windows , mac , linux , android , ios , xboxone , xboxseriesx , ps4 , ps5 , switch , oculus (only game admins can filter by this field, see status and visibility for details).NOTE: that this parameter will take precedence over the header from cross-platform filtering. |
Sort | Description |
---|---|
name | Sort results alphabetically by name using the _sort query parameter name . For example _sort=name would return mods from A-Z. |
date_live | Sort results by the date they went live using the _sort query parameter date_live . For example _sort=-date_live would return the most recently live mods. |
date_updated | Sort results by the date they were last updated using the _sort query parameter date_updated . For example _sort=-date_updated would return the most recently updated mods. |
submitted_by | Sort results by the creators ID using the _sort query parameter submitted_by . For example _sort=submitted_by would return mods from creators who have been registered the longest. |
downloads_today | Sort results by the number of downloads in the last 24hours using the _sort query parameter downloads_today . For example _sort=-downloads_today would return the most popular mods from the last 24hours based on the number of mod downloads. |
downloads_total | Sort results by the total number of downloads using the _sort query parameter downloads_total . For example _sort=-downloads_total would return the most popular mods based on the number of downloads. |
subscribers_total | Sort results by the total number of subscribers using the _sort query parameter subscribers_total . For example _sort=-subscribers_total would return the most popular mods based on number of subscribers. |
ratings_weighted_aggregate | Sort results by their calculated rating (thumbs up / down received) using the _sort query parameter ratings_weighted_aggregate . For example _sort=-ratings_weighted_aggregate would return the highest rated mods. |
Example response
{
"data": [
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Cross-Platform Filtering
If the parent game has platform filtering enabled, this endpoint supports the targeting a platform request header to return the mods that are approved for the requested platform. Note: To target a platform for this endpoint, you MUST also include the game_id
filter for the game that has cross-platform filtering enabled.
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | Get Mods |
Get Users Muted
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/users/muted \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/users/muted HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/users/muted',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/users/muted',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/users/muted', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/users/muted");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/users/muted
Get all users muted by the authenticated user. Successful request will return an array of User Objects.
Example response
{
"data": [
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
{
...
}
],
"result_count": 1,
"result_offset": 0,
"result_limit": 100,
"result_total": 1
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | Get Muted Users |
Get User Ratings
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/ratings \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/ratings HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/ratings',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/ratings',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/ratings', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/ratings");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/ratings
Get all mod rating's submitted by the authenticated user. Successful request will return an array of Rating Objects.
Filter | Type | Description |
---|---|---|
game_id | integer | Unique id of the parent game. |
mod_id | integer | Unique id of the mod. |
rating | integer | Type of rating applied: -1 = Negative Rating 1 = Positive Rating |
resource_type | integer | Type of resource: mods = Mod Ratings collections = Collection Ratings. Defaults to: mods. |
date_added | integer | Unix timestamp of date rating was submitted. |
Example response
{
"data": [
{
"game_id": 2,
"mod_id": 2,
"resource_type": "mods",
"resource_id": 2,
"rating": -1,
"date_added": 1492564103
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | Get User Ratings |
Get User Wallet
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/me/wallets?game_id=1 \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/me/wallets?game_id=1 HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/me/wallets',
method: 'get',
data: '?game_id=1',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/me/wallets?game_id=1',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/me/wallets', params={
'game_id': '1'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/me/wallets?game_id=1");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /me/wallets
Get the authenticated user wallets. Successful request will return a single Wallet Object.
Filter | Type | Required | Description |
---|---|---|---|
game_id | integer | true* | Unique id of the parent game. *Not required when g-url is used. |
Example response
{
"type": "string",
"payment_method_id": "string",
"game_id": "string",
"currency": "string",
"balance": 0,
"pending_balance": 0,
"deficit": 0,
"monetization_status": 1
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | Wallet Object | |
404 | Not Found | 14001 | The game associated with the supplied api_key is currently not available. | Error Object |
404 | Not Found | 900022 | The game may not be setup for monetization as no active monetization team could be found. | Error Object |
422 | Unprocessable Entity | 900008 | A failure has occured when trying to find the user's wallet. | Error Object |
422 | Unprocessable Entity | 900002 | A failure has occured when trying to communicate with the monetization system. | Error Object |
422 | Unprocessable Entity | 900007 | Unable to create the account with monetization. | Error Object |
422 | Unprocessable Entity | 17034 | Users email must be verified before they can create the account with monetization. | Error Object |
General
Get Resource Owner
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/general/ownership \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
POST https://*.modapi.io/v1/general/ownership HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/x-www-form-urlencoded
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/general/ownership',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/general/ownership',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/general/ownership', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/general/ownership");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /general/ownership
Get the user that is the original submitter of a resource. Successful request will return a single User Object.
NOTE: Mods and games can be managed by teams of users, for the most accurate information you should use the Team endpoints.
Parameter | Type | Required | Description |
---|---|---|---|
resource_type | string | true | Type of resource you are checking the ownership of. Must be one of the following values: - games - mods - files |
resource_id | integer | true | Unique id of the resource you are checking the ownership of. |
Example response
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | User Object |
Ping
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/ping \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/ping HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/ping',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/ping',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/ping', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/ping");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /ping
Ping the mod.io API for purpose of a reachability check, successful request will return a 200 OK with a Web Message Object.
Example response
{
"code": 200,
"success": true,
"message": "You have successfully logged out of mod.io."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Request Successful | Web Message Object |
Monetization
Get Game Token Packs
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/monetization/token-packs \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/monetization/token-packs HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/monetization/token-packs',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/monetization/token-packs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/monetization/token-packs', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/monetization/token-packs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/monetization/token-packs
Get all token packs for a game. Successful request will return a Game Token Pack Object.
Example response
{
"id": 1,
"token_pack_id": 1,
"price": 1000,
"amount": 1000,
"portal": "WEB",
"sku": "SKU0001",
"name": "Token Pack A",
"description": "This pack contains 1000 tokens!",
"date_added": 1492564103,
"date_updated": 1492564103
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Game Token Pack Successful | Game Token Pack Object |
Purchase A Mod (External)
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/checkout \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'display_amount=undefined' \
-d 'subscribe=false' \
-d 'idempotent_key=undefined'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/checkout HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/checkout',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"display_amount": 0,
"subscribe": false,
"idempotent_key": "string"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/checkout',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/checkout', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/checkout");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/checkout
Purchase a mod. A Successful request will return the newly created Pay Object.
Parameter | Type | Required | Description |
---|---|---|---|
display_amount | integer | true | The amount that was shown to the user for the purchase. |
idempotent_key | string | true | The use of the idempotency key is for if in the event of a connection error, you can confidently reattempt the request without the concern of inadvertently creating a duplicate purchase or executing the purchase twice. All idempotent keys last 24 hours. |
Example response
{
"transaction_id": 0,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gross_amount": 0,
"net_amount": 0,
"platform_fee": 0,
"gateway_fee": 0,
"transaction_type": "string",
"meta": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "Body Armour",
"game_name": "Half-Life",
"buyer_name": "Gordon Freeman",
"token_name": ".22 Magazine"
}
],
"purchase_date": 1626667557,
"wallet_type": "string",
"balance": 0,
"deficit": 0,
"payment_method_id": "string",
"mod": {
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
}
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Pay Object | |
400 | Bad Request | 15004 | The authenticated user is already subscribed to the mod. | Error Object |
402 | Payment Required | 900030 | The payment failed. Please try again later. | Error Object |
403 | Forbidden | 15011 | The item has not been accepted and can not be purchased at this time. | Error Object |
404 | Not Found | 900022 | The game may not be currently active for monetization. | Error Object |
422 | Unprocessable Entity | 900035 | The given display price does not match the price of the mod. | Error Object |
422 | Unprocessable Entity | 900008 | Unable to fetch the accounts' wallet. Please confirm the account has one | Error Object |
422 | Unprocessable Entity | 900001 | Unable to communicate with the monetization system. Please try again later. | Error Object |
422 | Unprocessable Entity | 900034 | The account already owns this item. | Error Object |
422 | Unprocessable Entity | 900049 | The account has insufficent funds to make this purchase. | Error Object |
422 | Unprocessable Entity | 900002 | A failure has occured when trying to authenticate with the monetization system. | Error Object |
422 | Unprocessable Entity | 900007 | The account has not been created with monetization. | Error Object |
422 | Unprocessable Entity | 900000 | An un expected error has occured. Please try again later. | Error Object |
422 | Unprocessable Entity | 900061 | The mod that was attempting to be purchased has sold out. Only applicable if the Game and Mod have enabled limited. | Error Object |
403 | Forbidden | 15023 | The item has been deleted and can not be purchased at this time. | Error Object |
403 | Forbidden | 900015 | The account has been disabled from monetization. | Error Object |
403 | Forbidden | 900012 | The monetization is currently in maintance mode. Please try again later. | Error Object |
403 | Forbidden | 15020 | This mod is missing a file and cannot be subscribed to. | Error Object |
403 | Forbidden | 15001 | This mod is hidden and the user cannot be subscribed to it. | Error Object |
403 | Forbidden | 15000 | This mod is currently under DMCA and the user cannot be subscribed to it. | Error Object |
403 | Forbidden | 15000 | This item cannot be purchased at this time due to a DMCA takedown request. | Error Object |
400 | Bad Request | 900074 | This game only allows purchases in-game. | Error Object |
Get Mod Monetization Team
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/mods/{mod-id}/monetization/team
Get users in a monetization team. Successful request will return a Monetization Team Accounts Object.
Example response
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"monetization_status": 0,
"monetization_options": 0,
"split": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Monetization Team Accounts Object | |
403 | Forbidden | 900023 | You do not have the required permissions. | Error Object |
404 | Not Found | 900022 | Monetization team could not be found. | Error Object |
Create Mod Monetization Team
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
POST https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/mods/{mod-id}/monetization/team");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/mods/{mod-id}/monetization/team
Send a request to create a monetization team for a mod team. Successful request will return a Monetization Team Accounts Object.
Parameter | Type | Required | Description |
---|---|---|---|
users | array | true | Array of users to add. |
users[n][id] | integer | true | Id of the user to add to the team. |
users[n][split] | integer | true | Split value for the given user. |
Example response
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"monetization_status": 0,
"monetization_options": 0,
"split": 0
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Monetization Team Accounts Object | |
403 | Forbidden | 900023 | Team members must belong to the current game or mod. | Error Object |
404 | Not Found | 900022 | Monetization team could not be found. | Error Object |
422 | Unprocessable Entity | 900024 | Unable to process your data with the payment system. | Error Object |
422 | Unprocessable Entity | 900003 | Your account does not have the required creator wallets. | Error Object |
422 | Unprocessable Entity | 900026 | Your provided split share must total 100%. | Error Object |
422 | Unprocessable Entity | 900029 | You may only add up to 5 users to a team. | Error Object |
422 | Unprocessable Entity | 900025 | Unable to process your data with the payment system. | Error Object |
422 | Unprocessable Entity | 900008 | A failure has occured when trying to find the user's wallet. | Error Object |
403 | Forbidden | 900023 | Team members must be approved before they can be added to the current team. | Error Object |
404 | Not Found | 900003 | Monetization team could not be found. | Error Object |
Service to Service
Transaction Intent
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/s2s/transactions/intent \
-H 'X-Modio-Delegation-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' \
-H 'X-Modio-Idempotent-Key: d720901c-a8ed-42ff-9343-39d4a3e16b18' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'sku=undefined' \
-d 'portal=undefined' \
-d 'gateway_uuid=undefined'
POST https://*.modapi.io/v1/s2s/transactions/intent HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
X-Modio-Delegation-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
X-Modio-Idempotent-Key: d720901c-a8ed-42ff-9343-39d4a3e16b18
Authorization: Bearer {access-token}
Content-Type: application/json
var headers = {
'X-Modio-Delegation-Token':'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c',
'X-Modio-Idempotent-Key':'d720901c-a8ed-42ff-9343-39d4a3e16b18',
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/s2s/transactions/intent',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"sku": "string",
"portal": "string",
"gateway_uuid": "string"
}';
const headers = {
'X-Modio-Delegation-Token':'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c',
'X-Modio-Idempotent-Key':'d720901c-a8ed-42ff-9343-39d4a3e16b18',
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/s2s/transactions/intent',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'X-Modio-Delegation-Token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c',
'X-Modio-Idempotent-Key': 'd720901c-a8ed-42ff-9343-39d4a3e16b18',
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/s2s/transactions/intent', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/s2s/transactions/intent");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /s2s/transactions/intent
Create a service-to-service (S2S) transaction intent. This is for performing an external token transaction. You should generate the intent, consume the item on your server's backend before committing the transaction. A successful request will return a S2S Pay Object object. Requires scope of monetization on token.
Parameter | Type | Required | Description |
---|---|---|---|
sku | string | true | The sku ID of the entitlement that will be converted into it's equivalent Virtual Token amount. |
portal | string | true | The portal the sku is tied to. Valid options are apple, google, xboxlive, psn and steam. |
gateway_uuid | string | false | An optional mapping alpha dash string that can be used to track this transaction. It is recommended to use the one from the processing platform if you have one available. |
» sku
The sku id on the platform that was mapped to the given token pack. required when type monetization_type is EXTERNAL.
» portal
The portal that was mapped to the given token pack. required when type monetization_type is EXTERNAL.
» gateway_uuid
An optional mapping alpha dash string that can be used to track this transaction. It is recommended to use the one from the processing platform if you have one available.
Example response
{
"transaction_id": 123456789,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gross_amount": 1000,
"net_amount": 900,
"platform_fee": 50,
"gateway_fee": 30,
"transaction_type": "PAID",
"meta": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "Body Armour",
"game_name": "Half-Life",
"buyer_name": "Gordon Freeman",
"token_name": ".22 Magazine"
}
],
"purchase_date": 1626667557
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | S2S Pay Object |
S2S Transaction Commit
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/s2s/transactions/commit \
-H 'X-Modio-Idempotent-Key: d720901c-a8ed-42ff-9343-39d4a3e16b18' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'transaction_id=undefined' \
-d 'clawback_uuid=undefined'
POST https://*.modapi.io/v1/s2s/transactions/commit HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
X-Modio-Idempotent-Key: d720901c-a8ed-42ff-9343-39d4a3e16b18
Authorization: Bearer {access-token}
Content-Type: application/json
var headers = {
'X-Modio-Idempotent-Key':'d720901c-a8ed-42ff-9343-39d4a3e16b18',
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/s2s/transactions/commit',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"transaction_id": 0,
"clawback_uuid": "string"
}';
const headers = {
'X-Modio-Idempotent-Key':'d720901c-a8ed-42ff-9343-39d4a3e16b18',
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/s2s/transactions/commit',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'X-Modio-Idempotent-Key': 'd720901c-a8ed-42ff-9343-39d4a3e16b18',
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/s2s/transactions/commit', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/s2s/transactions/commit");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /s2s/transactions/commit
Create a service-to-service (S2S) transaction commit. This is for performing an external token transaction. This step finalizes the transaction and will issue tokens to the user associated to it. A successful request will return a S2S Pay Object object. Requires scope of monetization on token.
Parameter | Type | Required | Description |
---|---|---|---|
transaction_id | integer | true | The ID of the transaction to complete. |
clawback_uuid | string | false | An optional mapping alpha dash string that can be used to group this transaction against other transactions. |
Example response
{
"transaction_id": 123456789,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gross_amount": 1000,
"net_amount": 900,
"platform_fee": 50,
"gateway_fee": 30,
"transaction_type": "PAID",
"meta": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "Body Armour",
"game_name": "Half-Life",
"buyer_name": "Gordon Freeman",
"token_name": ".22 Magazine"
}
],
"purchase_date": 1626667557
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | S2S Pay Object |
S2S Transaction Clawback
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/s2s/transactions/clawback \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'transaction_id=undefined' \
-d 'gateway_uuid=undefined' \
-d 'portal=undefined' \
-d 'refund_reason=undefined' \
-d 'clawback_uuid=undefined'
POST https://*.modapi.io/v1/s2s/transactions/clawback HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/json
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/s2s/transactions/clawback',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"transaction_id": 0,
"gateway_uuid": 0,
"portal": "string",
"refund_reason": "string",
"clawback_uuid": "string"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/s2s/transactions/clawback',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/s2s/transactions/clawback', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/s2s/transactions/clawback");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /s2s/transactions/clawback
Create a service-to-service (S2S) transaction clawback. This is for unwinding a token transaction. You may use the transaction_id or the gateway_uuid from the previous calls. A successful request will return a Refund Object object. Requires scope of monetization on token.
Parameter | Type | Required | Description |
---|---|---|---|
transaction_id | integer | false | The id of the transaction to complete. Required if gateway_uuid is null. |
gateway_uuid | string | false | The alpha dash on the transaction. Required if transaction_id is null. |
portal | string | true | The portal the transaction is tied to. Valid options are apple, google, xboxlive, psn and steam. |
refund_reason | string | true | The reason for the refund. |
clawback_uuid | string | false | An optional mapping alpha dash string that can be used to group this transaction against other transactions. When a deficit clawback transaction occurs, this clawback id will be set on subsequent clawbacks. |
Example response
{
"transaction_id": 987654321,
"gross_amount": 2500,
"net_amount": 2300,
"platform_fee": 100,
"gateway_fee": 50,
"tax": 150,
"tax_type": "GST",
"transaction_type": "REFUNDED",
"meta": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "Body Armour",
"game_name": "Half-Life",
"buyer_name": "Gordon Freeman",
"token_name": ".22 Magazine"
}
],
"purchase_date": 1626667557
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Refund Object |
Disconnect User
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/s2s/connections/{portal-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/s2s/connections/{portal-id} HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
Content-Type: application/json
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/s2s/connections/{portal-id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/s2s/connections/{portal-id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/s2s/connections/{portal-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/s2s/connections/{portal-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /s2s/connections/{portal-id}
Disconnect a mod.io user from a linked studio user. This will completely remove the SSO connection between the mod.io user and the external user.
Example response
204 No Content
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful or Unsuccessful Request. No Body Returned. | None |
Get Transactions
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /s2s/monetization-teams/{monetization-team-id}/transactions
Get all monetization transactions for the given monetization team. Successful request will return a 200 - Success
response.
Filter | Type | Required | Description |
---|---|---|---|
transaction_type | string | false | The transaction types to find transactions by. Can be used as an array or on its own. PENDING = pending transaction no payment taken PAID = payment taken but funds not released CLEARED = payment taken and earned funds released. REFUNDED = payment refunded to buyer CANCELLED = payment cancelled by seller FAILED = payment failed to process. |
monetization_type | string | false | The monetization types to find transactions by. Can be used as an array or on its own. FIAT = a payment made with real world currency TOKEN = a payment made with virtual currency EXTERNAL = a payment made with an external purchase service. |
buyer | integer | false | The buyer id of who made the transaction to filter by. Can only be used as a single filter. |
clawback_uuid | string | false | The unique identifier submitted during the transaction that can be used to trace a clawback event. |
gateway_uuid | string | false | The unique identifier created during the transaction that can be used to trace a transaction. |
line_items | string | false | The line_item key value to filter by. Can only be used as a single filter. Filtering can be done by key value on the line item. i.e. mod_id:1 or buyer_id:1 |
created_at_start | integer | false | Unix timestamp of date to start filtering transactions from. Assumes the end date to current if not given. |
created_at_end | integer | false | Unix timestamp of date to start filtering transactions to. Assumes the start date to current if not given. |
Example response
{
"data": [
{
"id": 1234,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gateway_name": "tilia",
"account_id": "12345",
"gross_amount": 199,
"net_amount": 199,
"platform_fee": 20,
"gateway_fee": 30,
"tax": 0,
"tax_type": "sales",
"currency": "usd",
"tokens": 0,
"transaction_type": "paid",
"monetization_type": "paid",
"purchase_date": "2024-10-07 02:29:11",
"created_at": "1728268151123456",
"payment_method": [
{
"name": "Visa ending in 1111",
"id": "123e4567-e89b-12d3-a456-426614174000",
"amount": 199,
"display_amount": "USD 1.99"
}
],
"line_items": [
{
"game_id": 0,
"buyer_id": 0,
"game_name": "my game",
"buyer_name": "smith",
"token_name": "mio",
"token_pack_id": 0,
"token_pack_name": "200 Pack"
}
]
}
],
"download": {
"per_page": "15",
"current_page": "/v1/s2s/monetization-teams/{monetization-team-id}/transactions?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0xMC0wMiAwMDo1NTozMiIsIl9wb2ludHNUb05leHRJdaAJdsa10",
"next_page_url": "/v1/s2s/monetization-teams/{monetization-team-id}/transactions?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0xMC0wMiAwMDo1NTozMiIsIl9wb2ludHNUb05leHRJdaAJdsa10",
"prev_page_url": "/v1/s2s/monetization-teams/{monetization-team-id}/transactions?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0xMC0wMiAwMDo1NTozMiIsIl9wb2ludHNUb05leHRJdaAJdsa10"
}
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Transactions |
Get Transaction
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions/{transaction-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions/{transaction-id} HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions/{transaction-id}',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions/{transaction-id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions/{transaction-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/s2s/monetization-teams/{monetization-team-id}/transactions/{transaction-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /s2s/monetization-teams/{monetization-team-id}/transactions/{transaction-id}
Get a monetization transaction for the given monetization team by the given transaction id. Successful request will return a 200 - Success
response.
Example response
{
"data": [
{
"id": 1234,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gateway_name": "tilia",
"account_id": "12345",
"gross_amount": 199,
"net_amount": 199,
"platform_fee": 20,
"gateway_fee": 30,
"tax": 0,
"tax_type": "sales",
"currency": "usd",
"tokens": 0,
"transaction_type": "paid",
"monetization_type": "paid",
"purchase_date": "2024-10-07 02:29:11",
"created_at": "1728268151123456",
"payment_method": [
{
"name": "Visa ending in 1111",
"id": "123e4567-e89b-12d3-a456-426614174000",
"amount": 199,
"display_amount": "USD 1.99"
}
],
"items": [
{
"id": 1234,
"gateway_uuid": "e9d904ed-86a4-4b10-b1d3-c76e7c62d2e3",
"gateway_name": "tilia",
"sale_price": 0,
"gateway_fee": 0,
"platform_fee": 0,
"currency": "usd",
"tokens": 0,
"token_team_id": 0,
"sale_type": "bought",
"monetization_type": "fiat",
"transaction_type": "paid",
"purchase_date": "2019-08-24T14:15:22Z",
"created_at": 1728268151123456,
"line_items": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "my mod",
"game_name": "my game",
"buyer_name": "buyers name"
}
],
"breakdown": [
{
"platform": {
"revenue": 99
},
"store": [
{
"revenue": 99,
"users": [
{
"account_name": "name",
"account_id": 123,
"revenue": 99
}
]
}
]
}
],
"revenue": 99
}
],
"line_items": [
{
"game_id": 0,
"buyer_id": 0,
"game_name": "my game",
"buyer_name": "smith",
"token_name": "mio",
"token_pack_id": 0,
"token_pack_name": "200 Pack"
}
]
}
]
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get Transaction |
Collections
Get Mod Collections
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/collections?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/collections?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/collections', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/collections
Get all mod collections. Successful request will return an array of Mod Collection Objects. We recommended reading the filtering documentation to return only the records you want.
Filter | Type | Description |
---|---|---|
id | integer | Unique id of the collection. |
status | integer | Status of the collection (only admins can filter by this field, see status and visibility for details): 0 = Not accepted 1 = Accepted (default) 3 = Deleted |
mod_id | integer | Any collection containing this mod id. |
category | integer | Any collection belonging to this category. |
submitted_by | integer | Unique id of the user who has ownership of the collection. |
submitted_by_display_name | string | The username of the user who has ownership of the collection |
date_added | integer | Unix timestamp of date collection was registered. |
date_updated | integer | Unix timestamp of date collection was updated. |
date_live | integer | Unix timestamp of date collection was set live. |
name | string | Name of the collection. |
name_id | string | Path for the collection on mod.io. For example: --parse_collectionurl. |
maturity_option | integer | Mature content found in a collection. NOTE: The value of this field will default to 0 unless the parent game allows you to flag mature content (see maturity_options field in Game Object). 0 = None (default) 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Add the options you want together, to enable multiple options (see BITWISE fields) |
tags | string | A tag associated with a collection, possible values are: --parse_collectiontags. |
Sort | Description |
---|---|
name | Sort results alphabetically by name using the _sort query parameter name . For example _sort=name would return games from A-Z. |
date_live | Sort results by the date they went live using the _sort query parameter date_live . For example _sort=-date_live would return the most recently live games. |
date_updated | Sort results by the date they were last updated using the _sort query parameter date_updated . For example _sort=-date_updated would return the most recently updated games. |
Example response
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK | Get Mod Collections |
Add a Collection
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/collections \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-d 'name=undefined' \
-d 'name_id=undefined' \
-d 'summary=undefined' \
-d 'category=undefined' \
-d 'description=undefined' \
-d 'logo=undefined' \
-d 'status=undefined' \
-d 'visible=undefined' \
-d 'tags[]=undefined' \
-d 'mod_ids[]=undefined'
POST https://*.modapi.io/v1/games/{game-id}/collections HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"name": "My Awesome Collection",
"name_id": "my-awesome-collection",
"summary": "This is a collection of the best mods.",
"category": "Available options are: <br><br>- * Essential<br>- * Themed<br>- * Miscellaneous",
"description": "This collection includes mods for enhancing gameplay.",
"logo": "logo.png",
"status": 1,
"visible": 1,
"tags": [
"gameplay",
"magic"
],
"mod_ids": [
101,
102,
103
]
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/collections', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/collections
Create a new collection for a game. Successful request will return a new Mod Collection Object.
Example response
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
201 | Created | Created | Mod Collection Object | |
400 | Bad Request | Bad Request | Error Object | |
403 | Forbidden | Forbidden | Error Object |
Get Mod Collection
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/collections/{collection-id}
Get a mod collection. Successful request will return a Mod Collection Object
Example response
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK | Mod Collection Object |
Update a Collection
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-d 'name=undefined' \
-d 'name_id=undefined' \
-d 'summary=undefined' \
-d 'category=undefined' \
-d 'description=undefined' \
-d 'logo=undefined' \
-d 'status=undefined' \
-d 'visible=undefined' \
-d 'tags[]=undefined' \
-d 'mod_ids[]=undefined' \
-d 'sync=undefined'
POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id} HTTP/1.1
Host: *.modapi.io
Content-Type: multipart/form-data
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"name": "My Awesome Collection",
"name_id": "my-awesome-collection",
"summary": "This is a collection of the best mods.",
"category": "Available options are: <br><br>- * Essential<br>- * Themed<br>- * Miscellaneous",
"description": "This collection includes mods for enhancing gameplay.",
"logo": "logo.png",
"status": 1,
"visible": 1,
"tags": [
"gameplay",
"magic"
],
"mod_ids": [
101,
102,
103
],
"sync": false
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/collections/{collection-id}
Update an existing collection for a game. Successful request will return the updated Mod Collection Object.
Example response
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK | Mod Collection Object | |
400 | Bad Request | Bad Request | Error Object | |
403 | Forbidden | Forbidden | Error Object |
Delete a Collection
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id} \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'permanent=0' \
-d 'reason=undefined'
DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id} HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"permanent": 1,
"reason": "Stolen Content"
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/collections/{collection-id}
Delete a collection for a game. Successful request will return 204 No Content
.
NOTE: You can perform a soft delete or a permanent delete by specifying the permanent
boolean parameter in the request body.
Example response
{
"error": {
"code": 403,
"error_ref": 10000,
"message": "You do not have the required permissions to access this resource.",
"errors": {}
}
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
400 | Bad Request | Bad Request. Invalid parameters provided. | Error Object | |
403 | Forbidden | Forbidden. The authenticated user does not have permission to delete this collection. | Error Object |
Follow a Collection
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/collections/{collection-id}/followers
Follow a collection for a game. Successful request will return the Mod Collection Object.
Example response
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK. The collection was already followed. | Mod Collection Object | |
201 | Created | Created. The collection was successfully followed. | Mod Collection Object | |
400 | Bad Request | Bad Request. Invalid parameters provided. | Error Object | |
403 | Forbidden | Forbidden. The authenticated user does not have permission to follow this collection. | Error Object |
Unfollow a Collection
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers HTTP/1.1
Host: *.modapi.io
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/followers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/collections/{collection-id}/followers
Unfollow a collection for a game. Successful request will return 204 No Content
.
Example response
{
"error": {
"code": 403,
"error_ref": 10000,
"message": "You do not have the required permissions to access this resource.",
"errors": {}
}
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
400 | Bad Request | Bad Request. Invalid parameters provided. | Error Object |
Get Collection Mods
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods?api_key=YourApiKey \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods?api_key=YourApiKey HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods',
method: 'get',
data: '?api_key=YourApiKey',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods?api_key=YourApiKey',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods', params={
'api_key': 'YourApiKey'
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods?api_key=YourApiKey");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /games/{game-id}/collections/{collection-id}/mods
Get all mods within a collection. Successful request will return a paginated list of Mod Objects.
Example response
{
"data": [
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK | Get Collection Mods |
Delete Collection Mods
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-d 'mod_ids[]=undefined'
DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods HTTP/1.1
Host: *.modapi.io
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Bearer {access-token}
var headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const inputBody = '{
"mod_ids": [
1
]
}';
const headers = {
'Authorization':'Bearer {access-token}',
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Authorization': 'Bearer {access-token}',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/mods");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/collections/{collection-id}/mods
Delete mods from a specific collection. Successful request will return 204 No Content
.
Example response
{
"error": {
"code": 403,
"error_ref": 10000,
"message": "You do not have the required permissions to access this resource.",
"errors": {}
}
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
204 | No Content | Successful Request. No Body Returned. | None | |
400 | Bad Request | Bad Request. Invalid parameters provided. | Error Object | |
403 | Forbidden | Forbidden. The authenticated user does not have permission to delete mods from this collection. | Error Object |
Subscribe to Collection Mods
Example request
# You can also use wget
curl -X POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions \
-H 'Accept: application/json'
POST https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.post('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /games/{game-id}/collections/{collection-id}/subscriptions
Subscribe to all mods within a collection. Successful request will return a Mod Collection Object.
Example response
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK. Successfully subscribed to the collection mods. | Mod Collection Object | |
400 | Bad Request | Bad Request. Invalid parameters provided. | Error Object | |
403 | Forbidden | Forbidden. The authenticated user does not have permission to subscribe to this collection. | Error Object |
Unsubscribe from Collection Mods
Example request
# You can also use wget
curl -X DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions \
-H 'Accept: application/json'
DELETE https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions HTTP/1.1
Host: *.modapi.io
Accept: application/json
var headers = {
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.delete('https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/games/{game-id}/collections/{collection-id}/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /games/{game-id}/collections/{collection-id}/subscriptions
Unsubscribe from all mods within a collection. Successful request will return a Mod Collection Object.
Example response
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | OK. Successfully unsubscribed from the collection mods. | Mod Collection Object | |
400 | Bad Request | Bad Request. Invalid parameters provided. | Error Object | |
403 | Forbidden | Forbidden. The authenticated user does not have permission to unsubscribe from this collection. | Error Object |
Get User Profile Collections
Example request
# You can also use wget
curl -X GET https://*.modapi.io/v1/users/{user-id}/collections \
-H 'Origin: https://mod.io' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
GET https://*.modapi.io/v1/users/{user-id}/collections HTTP/1.1
Host: *.modapi.io
Accept: application/json
Origin: https://mod.io
Authorization: Bearer {access-token}
var headers = {
'Origin':'https://mod.io',
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
$.ajax({
url: 'https://*.modapi.io/v1/users/{user-id}/collections',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
const request = require('node-fetch');
const headers = {
'Origin':'https://mod.io',
'Authorization':'Bearer {access-token}',
'Accept':'application/json'
};
fetch('https://*.modapi.io/v1/users/{user-id}/collections',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Origin': 'https://mod.io',
'Authorization': 'Bearer {access-token}',
'Accept': 'application/json'
}
r = requests.get('https://*.modapi.io/v1/users/{user-id}/collections', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://*.modapi.io/v1/users/{user-id}/collections");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /users/{user-id}/collections
Browse collections the given user is following. Successful request will return an array of Mod Collection Objects.
Example response
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Responses
Status | Meaning | Error Ref | Description | Response Schema |
---|---|---|---|---|
200 | OK | Successful Request | Get User Profile Collections |
Response Schemas
Access Token Object
{
"code": 200,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"date_expires": 1570673249
}
Properties
Name | Type | Description |
---|---|---|
code | integer | HTTP Response Code. |
access_token | string | The user's access token. |
date_expires | integer | Unix timestamp of the date this token will expire. Default is one year from issue date. See Access Token Lifetime & Expiry. |
Agreement Version Object
{
"id": 1,
"is_active": true,
"is_latest": true,
"type": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1509922961,
"date_updated": 1509922961,
"date_live": 1509922961,
"name": "Terms of Use",
"changelog": "",
"description": "Privacy Agreement - 20/11/2020.....",
"adjacent_versions": "'previous': { 'id': 13, 'date_live': 1592381157 }, 'next': { 'id': 31, 'date_live': 1722400117 }"
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique id of the agreement. |
is_active | boolean | Is the agreement currently active? (This can also be determined if date_live <= the current time). |
is_latest | boolean | Is this the latest version of the agreement? |
type | integer | The type of agreement. Can be one of the following: 1 = Terms 2 = Privacy 3 = Game 4 = API 5 = Monetization 6 = AUP 7 = Cookies 8 = Refund |
user | User Object | No description |
date_added | integer | Unix timestamp of the date the agreement was added. |
date_updated | integer | Unix timestamp of the date the agreement was updated. |
date_live | integer | Unix timestamp of the date the agreement was set live. |
name | string | Name of the agreement. |
changelog | string | Changelog for version of this agreement. |
description | string | The contents of the agreement. |
adjacent_versions | object | The previous and next versions of the agreement. |
Avatar Object
{
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
}
Properties
Name | Type | Description |
---|---|---|
filename | string | Avatar filename including extension. |
original | string | URL to the full-sized avatar. |
thumb_50x50 | string | URL to the small avatar thumbnail. |
thumb_100x100 | string | URL to the medium avatar thumbnail. |
Collection Stats Object
{
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
}
Properties
Name | Type | Description |
---|---|---|
collection_id | integer | The collection id. |
downloads_today | integer | The number of downloads today. |
downloads_unique | integer | The number of unique downloads. |
downloads_total | integer | The total number of downloads. |
followers_total | integer | The total number of followers. |
ratings_positive_30_days | integer | The number of positive ratings in the last 30 days. |
Comment Object
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique id of the comment. |
game_id | integer | Unique game id (if applicable). |
mod_id | integer | Deprecated: Please use resource_id instead, this will be removed in subsequent API version. |
resource_id | integer | Unique id of the parent resource. |
resource_ownership | integer | Bitwise value of the user who published the comment. |
user | User Object | The user who published the comment. |
date_added | integer | Unix timestamp of date the comment was posted. |
reply_id | integer | Id of the parent comment this comment is replying to (can be 0 if the comment is not a reply). |
thread_position | string | Levels of nesting in a comment thread. How it works: - The first comment will have the position '01'. - The second comment will have the position '02'. - If someone responds to the second comment the position will be '02.01'. - A maximum of 3 levels is supported. |
karma | integer | Karma received for the comment (can be postive or negative). |
karma_guest | integer | Deprecated: No longer used and will be removed in subsequent API version. |
content | string | Contents of the comment. |
options | integer | The options specified by the mod or guide team. Available options are: 0 = All of the options below are disabled 1 = Pinned comment 2 = Locked comment ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
Download Object
{
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
}
Properties
Name | Type | Description |
---|---|---|
binary_url | string | URL to download the file from the mod.io CDN. NOTE: If the game requires mod downloads to be initiated via the API, the binary_url returned will contain a verification hash. This hash must be supplied to get the modfile, and will expire after a certain period of time. Saving and reusing the binary_url won't work in this situation given it's dynamic nature. |
date_expires | integer | Unix timestamp of when the binary_url will expire. |
Embeddable Mod Hub Configuration Object
{
"id": 1,
"name": "string",
"urls": [
"string"
],
"style": "string",
"css": "string",
"allow_subscribing": true,
"allow_rating": true,
"allow_reporting": true,
"allow_downloading": true,
"allow_commenting": true,
"allow_filtering": true,
"allow_searching": true,
"allow_infinite_scroll": true,
"allow_email_auth": true,
"allow_sso_auth": true,
"allow_steam_auth": true,
"allow_PSN_auth": true,
"allow_xbox_auth": true,
"allow_egs_auth": true,
"allow_discord_auth": true,
"allow_google_auth": true,
"show_library": true,
"show_comments": true,
"show_collections": true,
"show_guides": true,
"show_user_avatars": true,
"show_sort_tabs": true,
"allow_links": true,
"filter_right_side": true,
"name_right_side": true,
"allow_adding_mods": true,
"allow_editing_mods": true,
"results_per_page": 0,
"min_age": 0,
"date_added": 0,
"date_updated": 0,
"company_name": "string",
"agreement_urls": [
{}
]
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique EMH id. |
name | string | Name of the EMH version. |
style | string | Pre-defined styling properties. |
css | string | Custom styling properties. |
allow_subscribing | boolean | Flag to allow subscribing. |
allow_rating | boolean | Flag to allow rating. |
allow_reporting | boolean | Flag to allow reporting. |
allow_downloading | boolean | Flag to allow downloading. |
allow_commenting | boolean | Flag to allow commenting. |
allow_filtering | boolean | Flag to allow filtering. |
allow_searching | boolean | Flag to allow searching. |
allow_infinite_scroll | boolean | Flag to allow infinite scroll. |
allow_email_auth | boolean | Flag to allow email authentication. |
allow_sso_auth | boolean | Flag to allow SSO authentication. |
allow_steam_auth | boolean | Flag to allow Steam authentication. |
allow_PSN_auth | boolean | Flag to allow PSN authentication. |
allow_xbox_auth | boolean | Flag to allow Xbox authentication. |
allow_egs_auth | boolean | Flag to allow Epic Games Store authentication. |
allow_discord_auth | boolean | Flag to allow Discord authentication. |
allow_google_auth | boolean | Flag to allow Google authentication. |
show_library | boolean | Flag to allow viewing the items you have interacted with. |
show_comments | boolean | Flag to show comments. |
show_collections | boolean | Flag to show collections. |
show_guides | boolean | Flag to show guides. |
show_user_avatars | boolean | Flag to show user avatars. |
show_sort_tabs | boolean | Flag to show sort tabs. |
allow_links | boolean | Flag to allow user submitted links. |
filter_right_side | boolean | Flag to move the filters to the right. |
name_right_side | boolean | Flag to move the mod/guide name to the right. |
allow_adding_mods | boolean | Flag to allow users to create and add mods via the EMH. |
allow_editing_mods | boolean | Flag to allow users to edit existing mods via the EMH. |
results_per_page | integer | Number of results to show per page. |
min_age | integer | Minimum age for EMH access. |
date_added | integer | Timestamp indicating the date when the configuration was added. |
date_updated | integer | Timestamp indicating the date when the configuration was last updated. |
company_name | string | The company name used for EMH agreements. |
urls | string[] | An array of URLs that may access this EMH configuration. |
agreement_urls | object[] | The configured agreement names and urls used for the EMH. |
Entitlement Details Object
{
"tokens_allocated": 1000
}
Properties
Name | Type | Description |
---|---|---|
tokens_allocated | integer | The amount of virtual tokens (Mio's) allocated from the entitlement consumption. |
Entitlement Fulfillment Object
{
"transaction_id": "124641934672",
"transaction_state": 2,
"sku_id": "MODIO0001",
"entitlement_consumed": true,
"entitlement_type": 0,
"details": {
"tokens_allocated": 1000
}
}
Properties
Name | Type | Description |
---|---|---|
transaction_id | string | The mod.io transaction ID for the entitlement transfer. |
transaction_state | integer | The mod.io transaction state from converting the portal entitlements into mod.io assets / currency. Possible values: 0 = Failed 1 = Pending 2 = Fulfilled 3 = Consume Limit Exceeded |
sku_id | string | The portal SKU ID associated with the transaction. |
entitlement_consumed | bool | Has the entitlement been consumed in the 3rd-party portal? |
entitlement_type | integer | The entitlement type, once consumed and the entitlement is transferred to mod.io. Possible values: 0 = Virtual Tokens |
details | Entitlement Details Object | Details associated with the transaction. |
Error Object
{
"error": {
"code": 403,
"error_ref": 10000,
"message": "You do not have the required permissions to access this resource.",
"errors": {}
}
}
Properties
Name | Type | Description |
---|---|---|
error | object | Contains error data. |
» code | integer | The HTTP code. |
» error_ref | integer | The mod.io error code. |
» message | string | The server response to your request. Responses will vary depending on the endpoint, but the object structure will persist. |
» errors | object | Optional Validation errors object. This field is only supplied if the response is a validation error 422 Unprocessible Entity . See errors documentation for more information. |
Filehash Object
{
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
}
Properties
Name | Type | Description |
---|---|---|
md5 | string | MD5 hash of the file. |
Game EMH Object
{
"id": 2,
"status": 1,
"community_options": 3,
"curation_option": 0,
"ugc_name": "mods",
"name": "Rogue Knight",
"name_id": "rogue-knight",
"instructions": "Instructions on the process to upload mods.",
"tag_options": [
{
"name": "Theme",
"name_localized": "string",
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localized": {
"Horror": "Horreur"
},
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
}
],
"dependency_option": 0,
"maturity_options": 0,
"submission_option": 1,
"theme": {
"primary": "#44bfd5",
"dark": "#2c2c3f",
"light": "#ffffff",
"success": "#68D391",
"warning": "#d6af2e",
"danger": "#ff000e"
},
"platforms": [
{
"platform": "ps5",
"label": "PlayStation 5",
"moderated": true,
"locked": true
}
]
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique game id. |
status | integer | Status of the game (see status and visibility for details): 0 = Not Accepted 1 = Accepted 3 = Deleted |
community_options | integer | Community features enabled for this game: 0 = All of the options below are disabled 1 = Allow comments on mods 2 = Allow guides 4 = Pin on homepage 8 = Show on homepage 16 = Show more on homepage 32 = Allow change status 64 = Enable Previews (Game must be hidden) 128 = Allow preview share-URL (Previews must be enabled) 256 = Allow negative ratings 512 = Allow mods to be edited via web 1024 = Allow mod dependencies 2048 = Allow comments on guides ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
curation_option | integer | Curation option enabled by this game to approve mods: 0 = No curation: Mods are immediately available to play 1 = Price change approval: Pricing changes for marketplace mods queued for acceptance 2 = Full curation: All mods must be accepted by someone to be listed |
ugc_name | string | Word used to describe user-generated content (mods, items, addons etc). |
name | string | Name of the game. |
name_id | string | Path for the game on mod.io. For example: https://mod.io/g/rogue-knight |
instructions | string | A guide about creating and uploading mods for this game to mod.io (applicable if submission_option = 0). |
dependency_option | integer | Dependency option for this game's mods: 0 = Disallow dependencies 1 = Allow dependencies, mods must opt in 2 = Allow dependencies, mods must opt out 3 = Allow dependencies with no restrictions |
maturity_options | integer | Mature content setup for this game: 0 = Don't allow mature content in mods 1 = Allow mature content in mods 2 = This game is for mature audiences only |
submission_option | integer | Submission process modders must follow: 0 = Mod uploads must occur via the API using a tool created by the game developers 1 = Mod uploads can occur from anywhere, including the website and API |
theme | Game Theme Object | Theme color values for the game. |
tag_options | Game Tag Option Localized Object[] | Groups of tags configured by the game developer, that mods can select. Hidden tags will only be returned if show_hidden_tags is set to true . Group names and tags will be localized into the specified Accept-Language header value if provided, for a list of supported languages see Localization (Note that if a localized variant of a tag is not available it will default to English). |
platforms | Game Platforms Object[] | Platforms that are supported by this title. |
Game Monetization Team Object
{
"team_id": "1"
}
Properties
Name | Type | Description |
---|---|---|
team_id | integer | The ID of the monetization team. |
Game Object
{
"id": 2,
"status": 1,
"submitted_by": null,
"date_added": 1493702614,
"date_updated": 1499410290,
"date_live": 1499841403,
"presentation_option": 0,
"submission_option": 1,
"dependency_option": 0,
"curation_option": 0,
"community_options": 3,
"monetization_options": 0,
"limit_collection_mods": 100,
"monetization_team": {
"team_id": "1"
},
"cloud_cooking_status": 0,
"revenue_options": 0,
"max_stock": 8388607,
"api_access_options": 3,
"maturity_options": 0,
"ugc_name": "mods",
"token_name": "MIO",
"icon": {
"filename": "icon.png",
"original": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_64x64": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_128x128": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_256x256": "https://assets.modcdn.io/images/placeholder/icon.png"
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"header": {
"filename": "modio-logo-bluedark.png",
"original": "https://assets.modcdn.io/images/branding/modio-logo-bluedark.png"
},
"name": "Rogue Knight",
"name_id": "rogue-knight",
"summary": "Rogue Knight is a brand new 2D pixel platformer that supports custom levels and characters.",
"instructions": "Instructions on the process to upload mods.",
"instructions_url": "https://www.rogue-knight-game.com/modding/getting-started",
"profile_url": "https://mod.io/g/rogue-knight",
"other_urls": [
{
"label": "Our Steam Page",
"url": "https://www.steampowered.com/2348329042"
}
],
"tag_options": [
{
"name": "Theme",
"name_localized": "string",
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localized": {
"Horror": "Horreur"
},
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
}
],
"stats": {
"game_id": 2,
"mods_count_total": 13,
"mods_downloads_today": 204,
"mods_downloads_total": 27492,
"mods_downloads_daily_average": 1230,
"mods_subscribers_total": 16394,
"date_expires": 1492564103
},
"theme": {
"primary": "#44bfd5",
"dark": "#2c2c3f",
"light": "#ffffff",
"success": "#68D391",
"warning": "#d6af2e",
"danger": "#ff000e"
},
"platforms": [
{
"platform": "ps5",
"label": "PlayStation 5",
"moderated": true,
"locked": true
}
]
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique game id. |
status | integer | Status of the game (see status and visibility for details): 0 = Not Accepted 1 = Accepted 3 = Deleted |
submitted_by | object | Deprecated: Value will always be an empty object, this will be removed in subsequent API version. |
date_added | integer | Unix timestamp of date game was registered. |
date_updated | integer | Unix timestamp of date game was updated. |
date_live | integer | Unix timestamp of date game was set live. |
presentation_option | integer | Presentation style used on the mod.io website: 0 = Grid View: Displays mods in a grid 1 = Table View: Displays mods in a table |
submission_option | integer | Submission process modders must follow: 0 = Mod uploads must occur via the API using a tool created by the game developers 1 = Mod uploads can occur from anywhere, including the website and API |
dependency_option | integer | Dependency option for this game's mods: 0 = Disallow dependencies 1 = Allow dependencies, mods must opt in 2 = Allow dependencies, mods must opt out 3 = Allow dependencies with no restrictions |
curation_option | integer | Curation option enabled by this game to approve mods: 0 = No curation: Mods are immediately available to play 1 = Price change approval: Pricing changes for marketplace mods queued for acceptance 2 = Full curation: All mods must be accepted by someone to be listed |
community_options | integer | Community features enabled for this game: 0 = All of the options below are disabled 1 = Allow comments on mods 2 = Allow guides 4 = Pin on homepage 8 = Show on homepage 16 = Show more on homepage 32 = Allow change status 64 = Enable Previews (Game must be hidden) 128 = Allow preview share-URL (Previews must be enabled) 256 = Allow negative ratings 512 = Allow mods to be edited via web 1024 = Allow mod dependencies 2048 = Allow comments on guides ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
monetization_options | integer | Monetization options enabled for this game: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by mod.io 2 = Marketplace enabled 4 = Creator partner program enabled 8 = Quantity limited mods supported ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
limit_collection_mods | integer | The default limit of mods allowed within a collection. |
monetization_team | Game Monetization Team Object | The monetization team for this resource. Game Monetization Team Object. |
cloud_cooking_status | integer | Cloud Cooking status for this game: 0 = Cloud Cooking disabled 1 = Cloud Cooking initializing 2 = Cloud Cooking initialized 3 = Cloud Cooking finalizing 4 = Cloud Cooking finalized |
revenue_options | integer | Deprecated: Please use monetization_options instead, this will be removed in subsequent API version. |
max_stock | integer | Max Stock for limited mods. |
api_access_options | integer | Level of API access allowed by this game: 0 = All of the options below are disabled 1 = Allow 3rd parties to access this games API endpoints 2 = Allow mods to be downloaded directly (if disabled all download URLs will contain a frequently changing verification hash to stop unauthorized use) 4 = Checks authorization on mods to be downloaded directly (if enabled the consuming application must send the users bearer token) 8 = Checks ownership on mods to be downloaded directly (if enabled the consuming application must send the users bearer token) ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
maturity_options | integer | Mature content setup for this game: 0 = Don't allow mature content in mods 1 = Allow mature content in mods 2 = This game is for mature audiences only |
ugc_name | string | Word used to describe user-generated content (mods, items, addons etc). |
token_name | string | Word used to describe the games token. |
icon | Icon Object | Contains media URL's to the icon for the game. |
logo | Logo Object | Contains media URL's to the logo for the game. |
header | Header Image Object | Contains media URL's to the preview header for the game. |
name | string | Name of the game. |
name_id | string | Path for the game on mod.io. For example: https://mod.io/g/rogue-knight |
summary | string | Summary of the games mod support. |
instructions | string | A guide about creating and uploading mods for this game to mod.io (applicable if submission_option = 0). |
instructions_url | string | Link to a mod.io guide, your modding wiki or a page where modders can learn how to make and submit mods to your games profile. |
profile_url | string | URL to the game. |
stats | Game Stats Object | Numerous aggregate stats for the game. |
theme | Game Theme Object | Theme color values for the game. |
other_urls | Game OtherUrls Object[] | Creator defined URLs to share. |
tag_options | Game Tag Option Localized Object[] | Groups of tags configured by the game developer, that mods can select. Hidden tags will only be returned if show_hidden_tags is set to true . Group names and tags will be localized into the specified Accept-Language header value if provided, for a list of supported languages see Localization (Note that if a localized variant of a tag is not available it will default to English). |
platforms | Game Platforms Object[] | Platforms that are supported by this title. |
Game OtherUrls Object
{
"label": "Our Steam Page",
"url": "https://www.steampowered.com/2348329042"
}
Properties
Name | Type | Description |
---|---|---|
label | string | Label of the link you are sharing. |
url | string | The URL to be associated with the label. |
Game Platforms Object
{
"platform": "ps5",
"label": "PlayStation 5",
"moderated": true,
"locked": true
}
Properties
Name | Type | Description |
---|---|---|
platform | string | A target platform. |
label | string | A presentable label of the platform. |
moderated | boolean | Is this platform moderated by game admins? If false, then user submissions for the platform will be available immediately providing the game has mod curation disabled. |
locked | boolean | Are users able to upload files to this platform? By default, users are able to upload to all supported platforms, platforms set to true may only be used by game admins only. |
Game Stats Object
{
"game_id": 2,
"mods_count_total": 13,
"mods_downloads_today": 204,
"mods_downloads_total": 27492,
"mods_downloads_daily_average": 1230,
"mods_subscribers_total": 16394,
"date_expires": 1492564103
}
Properties
Name | Type | Description |
---|---|---|
game_id | integer | Unique game id. |
mods_count_total | integer | Available mod count for the game. |
mods_downloads_today | integer | Last 24hours of mod downloads for the game. |
mods_downloads_total | integer | Total mods downloaded for the game. |
mods_downloads_daily_average | integer | Average mods downloaded on a daily basis. |
mods_subscribers_total | integer | Total users who have subscribed to the mods for the game. |
date_expires | integer | Unix timestamp until this game's statistics are considered stale. |
Game Tag Option Localized Object
{
"name": "Theme",
"name_localized": "string",
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localized": {
"Horror": "Horreur"
},
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
}
Properties
Name | Type | Description |
---|---|---|
name | string | Name of the tag group. |
name_localized | string | No description |
type | string | Can multiple tags be selected via 'checkboxes' or should only a single tag be selected via a 'dropdown'. |
tags_localized | object | List of tag names and the localized variant of the tag. |
tag_count_map | object | List of tag names and the count of mods with these tags. |
hidden | boolean | Groups of tags flagged as 'hidden' are intended to be used for filtering (eg. game version), but should not be displayed to users. Hidden tags will only be returned if show_hidden_tags is set to true . |
locked | boolean | Groups of tags flagged as 'locked' are editable only if the authenticated user is a team member of the parent game. Useful for games to tag special functionality, which users can see and filter on (eg. competition winners). |
tags | string[] | Array of tags in this group. |
Game Tag Option Object
{
"name": "Theme",
"name_localization": {
"property1": "string",
"property2": "string"
},
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localization": [
{
"tag": "string",
"translations": {
"en": "",
"de": "",
"fr": ""
}
}
],
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
}
Properties
Name | Type | Description |
---|---|---|
name | string | Name of the tag group. |
name_localization | object | An object where keys are two-character language codes (e.g., 'en', 'de', 'fr') and values are the localized names. |
type | string | Can multiple tags be selected via 'checkboxes' or should only a single tag be selected via a 'dropdown'. |
tag_count_map | object | List of tag names and the count of mods with these tags. |
hidden | boolean | Groups of tags flagged as 'hidden' are intended to be used for filtering (eg. game version), but should not be displayed to users. Hidden tags will only be returned if show_hidden_tags is set to true . |
locked | boolean | Groups of tags flagged as 'locked' are editable only if the authenticated user is a team member of the parent game. Useful for games to tag special functionality, which users can see and filter on (eg. competition winners). |
tags | string[] | Array of tags in this group. |
tags_localization | object[] | No description |
» tag | string | The tag. |
» translations | object | No description |
»» en | string | English translation of the tag. |
»» de | string | German translation of the tag. |
»» fr | string | French translation of the tag. |
Game Theme Object
{
"primary": "#44bfd5",
"dark": "#2c2c3f",
"light": "#ffffff",
"success": "#68D391",
"warning": "#d6af2e",
"danger": "#ff000e"
}
Properties
Name | Type | Description |
---|---|---|
primary | string | The primary hex color code. |
dark | string | The dark hex color code. |
light | string | The light hex color code. |
success | string | The success hex color code. |
warning | string | The warning hex color code. |
danger | string | The danger hex color code. |
Game Token Pack Object
{
"id": 1,
"token_pack_id": 1,
"price": 1000,
"amount": 1000,
"portal": "WEB",
"sku": "SKU0001",
"name": "Token Pack A",
"description": "This pack contains 1000 tokens!",
"date_added": 1492564103,
"date_updated": 1492564103
}
Properties
Name | Type | Description |
---|---|---|
id | integer | The internal mod.io ID of the game token pack. |
token_pack_id | integer | The ID of the token pack. |
price | integer | The price of the token pack in USD. |
amount | integer | The amount of tokens the pack contains. |
portal | string | The portal of the token pack. |
sku | string | The SKU ID of the token pack. |
name | string | The name of the game token pack. |
description | string | The description of the game token pack. |
date_added | integer | Unix timestamp of the date the token pack was added to the game. |
date_updated | integer | Unix timestamp of the date the game token pack was updated. |
Game User Preview Object
{
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"user_from": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"resource_url": "https://mod.io/g/@rogueknight/m/@some-mod",
"date_added": 1499841487
}
Properties
Name | Type | Description |
---|---|---|
user | User Object | The previewing user. |
user_from | User Object | The user who invited the previewing user, if the previewer was added manually. |
resource_url | string | The URL of the resource that the registrant should be redirect to upon success. |
date_added | integer | Unix timestamp of the date the user was registered as a previewer. |
Get Collection Comments
{
"data": [
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
],
"result_count": 1,
"result_offset": 0,
"result_limit": 100,
"result_total": 1
}
Properties
Name | Type | Description |
---|---|---|
data | Comment Object[] | Array containing comment objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Collection Mods
{
"data": [
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Object[] | Array containing mod objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Entitlement Sync Status
{
"wallet": {
"balance": 0
},
"data": [
{
"transaction_id": "124641934672",
"transaction_state": 2,
"sku_id": "MODIO0001",
"entitlement_consumed": true,
"entitlement_type": 0,
"details": {
"tokens_allocated": 1000
}
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
wallet | Wallet Balance Object | A summary of wallet-related data, such as the updated wallet balance after any eligible entitlements have been sync'd. This value is returned for convenience, and will be null if no eligible entitlements were converted into mod.io Virtual Tokens. To reliably ascertain the users current balance, you should call the Get User Wallet endpoint. |
data | Entitlement Fulfillment Object[] | Array containing entitlement fulfillment objects. |
result_count | integer | Number of entitlements mod.io was able to retrieve in this request. This is not an indication the entitlement was consumed and the transaction successful. This value will cap out at 5. |
result_offset | integer | Number of results skipped over. Always 0. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Number of entitlements mod.io was able to retrieve that can be associated with SKU's registered on mod.io. Due to the max limit of 5 entitlements consumed per request your application should check if results_total > results_count and if so, repeat the request to consume the next batch. |
Get Followers
{
"data": [
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | User Object[] | Array containing user objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100(max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Following
{
"data": [
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | User Object[] | Array containing user objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100(max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Game Tag Options
{
"data": [
{
"name": "Theme",
"name_localization": {
"property1": "string",
"property2": "string"
},
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localization": [
{
"tag": "string",
"translations": {
"en": "",
"de": "",
"fr": ""
}
}
],
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Game Tag Option Object[] | Array containing game tag objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Games
{
"data": [
{
"id": 2,
"status": 1,
"submitted_by": null,
"date_added": 1493702614,
"date_updated": 1499410290,
"date_live": 1499841403,
"presentation_option": 0,
"submission_option": 1,
"dependency_option": 0,
"curation_option": 0,
"community_options": 3,
"monetization_options": 0,
"limit_collection_mods": 100,
"monetization_team": {
"team_id": "1"
},
"cloud_cooking_status": 0,
"revenue_options": 0,
"max_stock": 8388607,
"api_access_options": 3,
"maturity_options": 0,
"ugc_name": "mods",
"token_name": "MIO",
"icon": {
"filename": "icon.png",
"original": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_64x64": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_128x128": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_256x256": "https://assets.modcdn.io/images/placeholder/icon.png"
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"header": {
"filename": "modio-logo-bluedark.png",
"original": "https://assets.modcdn.io/images/branding/modio-logo-bluedark.png"
},
"name": "Rogue Knight",
"name_id": "rogue-knight",
"summary": "Rogue Knight is a brand new 2D pixel platformer that supports custom levels and characters.",
"instructions": "Instructions on the process to upload mods.",
"instructions_url": "https://www.rogue-knight-game.com/modding/getting-started",
"profile_url": "https://mod.io/g/rogue-knight",
"other_urls": [
{
"label": "Our Steam Page",
"url": "https://www.steampowered.com/2348329042"
}
],
"tag_options": [
{
"name": "Theme",
"name_localized": "string",
"type": "checkboxes",
"tags": [
"Horror"
],
"tags_localized": {
"Horror": "Horreur"
},
"tag_count_map": {
"Horror": 52
},
"hidden": false,
"locked": false
}
],
"stats": {
"game_id": 2,
"mods_count_total": 13,
"mods_downloads_today": 204,
"mods_downloads_total": 27492,
"mods_downloads_daily_average": 1230,
"mods_subscribers_total": 16394,
"date_expires": 1492564103
},
"theme": {
"primary": "#44bfd5",
"dark": "#2c2c3f",
"light": "#ffffff",
"success": "#68D391",
"warning": "#d6af2e",
"danger": "#ff000e"
},
"platforms": [
{
"platform": "ps5",
"label": "PlayStation 5",
"moderated": true,
"locked": true
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Game Object[] | Array containing game objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Guide Comments
{
"data": [
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
],
"result_count": 1,
"result_offset": 0,
"result_limit": 100,
"result_total": 1
}
Properties
Name | Type | Description |
---|---|---|
data | Comment Object[] | Array containing comment objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Guide Tags
{
"data": [
{
"name": "Instructions",
"date_added": 1499841487,
"count": 22
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Guide Tag Object[] | Array containing guide tag objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Guides
{
"data": [
{
"id": 1209,
"game_id": 3,
"game_name": "My Awesome Game",
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1509922961,
"date_updated": 1509922961,
"date_live": 1509922961,
"status": 1,
"url": "https://mod.io/g/rogue-knight/r/getting-started",
"name": "Getting Started",
"name_id": "getting-started",
"summary": "Alright, so let's get started with modding on mod.io",
"description": "<h1>Getting Started</h2><p>Download this suspiciou....",
"community_options": 2048,
"tags": [
{
"name": "Instructions",
"date_added": 1499841487,
"count": 22
}
],
"stats": [
{
"guide_id": 2,
"visits_today": 0,
"visits_total": 0,
"comments_total": 0
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Guide Object[] | Array containing guide objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mod Collection List
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Collection Object[] | Array containing collection objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mod Collections
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Collection Object[] | Array containing game objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mod Comments
{
"data": [
{
"id": 2,
"game_id": 2,
"mod_id": 2,
"resource_id": 2,
"resource_ownership": 2,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1499841487,
"reply_id": 0,
"thread_position": "01",
"karma": 1,
"karma_guest": 0,
"content": "Hey <a href=\"https://mod.io/u/guest\">guest</a>, you should check out this mod!",
"options": 0
}
],
"result_count": 1,
"result_offset": 0,
"result_limit": 100,
"result_total": 1
}
Properties
Name | Type | Description |
---|---|---|
data | Comment Object[] | Array containing comment objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mod Dependants
{
"data": [
{
"mod_id": 231,
"name": "Example Mod",
"name_id": "rogue-knight-hd-pack",
"status": 1,
"visible": 1,
"date_added": 1499841487,
"date_updated": 1499841487,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Dependants Object[] | Array containing mod depenants objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mod Dependencies
{
"data": [
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
},
"dependency_depth": 0
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Dependencies Object[] | Array containing mod dependencies objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mod Events
{
"data": [
{
"id": 13,
"mod_id": 13,
"user_id": 13,
"date_added": 1499846132,
"event_type": "MODFILE_CHANGED"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Event Object[] | Array containing mod event objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mod KVP Metadata
{
"data": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Metadata KVP Object[] | Array containing metadata kvp objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mod Stats
{
"data": [
{
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Stats Object[] | Array containing stats objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mod Tags
{
"data": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Tag Object[] | Array containing mod tag objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Modfile Cooks
{
"data": [
{
"cook_uuid": "123e4567-e89b-12d3-a456-426614174000",
"modfile": 0,
"platform": "ps5",
"status": 1,
"dateadded": 1499841487,
"dateupdated": 1499841487,
"metadata": [
"string"
],
"logs": [
"string"
],
"filename": "rogue-knight-v1.zip",
"filesize": 15181,
"version": "1.3"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Modfile Cook Object[] | Array containing modfile cooks. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 * (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Modfiles
{
"data": [
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Modfile Object[] | Array containing modfile objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Mods
{
"data": [
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Object[] | Array containing mod objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Multipart Upload Parts
{
"data": [
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"part_number": 1,
"part_size": 52428800,
"date_added": 1499846132
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Multipart Upload Part Object[] | Array containing Multipart Upload Part Objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100(max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Multipart Upload Sessions
{
"data": [
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"status": 0
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Multipart Upload Object[] | Array containing Multipart Upload Part Objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100(max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Muted Users
{
"data": [
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
{
...
}
],
"result_count": 1,
"result_offset": 0,
"result_limit": 100,
"result_total": 1
}
Properties
Name | Type | Description |
---|---|---|
data | User Object[] | Array containing user objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Source Modfiles
{
"data": [
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Modfile Object[] | Array containing source modfiles. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 * (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Team Members
{
"data": [
{
"id": 457,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"level": 8,
"date_added": 1492058857,
"position": "Turret Builder",
"invite_pending": 1
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Team Member Object[] | Array containing team member objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get Transaction
{
"data": [
{
"id": 1234,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gateway_name": "tilia",
"account_id": "12345",
"gross_amount": 199,
"net_amount": 199,
"platform_fee": 20,
"gateway_fee": 30,
"tax": 0,
"tax_type": "sales",
"currency": "usd",
"tokens": 0,
"transaction_type": "paid",
"monetization_type": "paid",
"purchase_date": "2024-10-07 02:29:11",
"created_at": "1728268151123456",
"payment_method": [
{
"name": "Visa ending in 1111",
"id": "123e4567-e89b-12d3-a456-426614174000",
"amount": 199,
"display_amount": "USD 1.99"
}
],
"items": [
{
"id": 1234,
"gateway_uuid": "e9d904ed-86a4-4b10-b1d3-c76e7c62d2e3",
"gateway_name": "tilia",
"sale_price": 0,
"gateway_fee": 0,
"platform_fee": 0,
"currency": "usd",
"tokens": 0,
"token_team_id": 0,
"sale_type": "bought",
"monetization_type": "fiat",
"transaction_type": "paid",
"purchase_date": "2019-08-24T14:15:22Z",
"created_at": 1728268151123456,
"line_items": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "my mod",
"game_name": "my game",
"buyer_name": "buyers name"
}
],
"breakdown": [
{
"platform": {
"revenue": 99
},
"store": [
{
"revenue": 99,
"users": [
{
"account_name": "name",
"account_id": 123,
"revenue": 99
}
]
}
]
}
],
"revenue": 99
}
],
"line_items": [
{
"game_id": 0,
"buyer_id": 0,
"game_name": "my game",
"buyer_name": "smith",
"token_name": "mio",
"token_pack_id": 0,
"token_pack_name": "200 Pack"
}
]
}
]
}
Properties
Name | Type | Description |
---|---|---|
data | Transaction Object Show[] | Array containing transaction objects. |
Get Transactions
{
"data": [
{
"id": 1234,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gateway_name": "tilia",
"account_id": "12345",
"gross_amount": 199,
"net_amount": 199,
"platform_fee": 20,
"gateway_fee": 30,
"tax": 0,
"tax_type": "sales",
"currency": "usd",
"tokens": 0,
"transaction_type": "paid",
"monetization_type": "paid",
"purchase_date": "2024-10-07 02:29:11",
"created_at": "1728268151123456",
"payment_method": [
{
"name": "Visa ending in 1111",
"id": "123e4567-e89b-12d3-a456-426614174000",
"amount": 199,
"display_amount": "USD 1.99"
}
],
"line_items": [
{
"game_id": 0,
"buyer_id": 0,
"game_name": "my game",
"buyer_name": "smith",
"token_name": "mio",
"token_pack_id": 0,
"token_pack_name": "200 Pack"
}
]
}
],
"download": {
"per_page": "15",
"current_page": "/v1/s2s/monetization-teams/{monetization-team-id}/transactions?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0xMC0wMiAwMDo1NTozMiIsIl9wb2ludHNUb05leHRJdaAJdsa10",
"next_page_url": "/v1/s2s/monetization-teams/{monetization-team-id}/transactions?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0xMC0wMiAwMDo1NTozMiIsIl9wb2ludHNUb05leHRJdaAJdsa10",
"prev_page_url": "/v1/s2s/monetization-teams/{monetization-team-id}/transactions?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0xMC0wMiAwMDo1NTozMiIsIl9wb2ludHNUb05leHRJdaAJdsa10"
}
}
Properties
Name | Type | Description |
---|---|---|
download | Pagination Object | Contains pagination data. |
data | Transaction Object Index[] | Array containing transaction objects. |
Get User Collections
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Collection Object[] | Array containing mod collection objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100(max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get User Events
{
"data": [
{
"id": 13,
"game_id": 7,
"mod_id": 13,
"user_id": 13,
"date_added": 1499846132,
"event_type": "USER_SUBSCRIBE"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | array | Array containing user event objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get User Followed Collections
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Collection Object[] | Array containing mod collection objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100(max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get User Followers
{
"data": [
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | User Object[] | Array containing user objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100(max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get User Following
{
"data": [
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | User Object[] | Array containing user objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100(max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get User Profile Collections
{
"data": [
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | Mod Collection Object[] | Array containing mod collection objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100(max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Get User Ratings
{
"data": [
{
"game_id": 2,
"mod_id": 2,
"resource_type": "mods",
"resource_id": 2,
"rating": -1,
"date_added": 1492564103
},
{
...
}
],
"result_count": 70,
"result_offset": 0,
"result_limit": 100,
"result_total": 70
}
Properties
Name | Type | Description |
---|---|---|
data | array | Array containing rating objects. |
result_count | integer | Number of results returned in this request. |
result_offset | integer | Number of results skipped over. Defaults to 0 unless overridden by _offset filter. |
result_limit | integer | Maximum number of results returned in the request. Defaults to 100 (max) unless overridden by _limit filter. |
result_total | integer | Total number of results found. |
Guide Object
{
"id": 1209,
"game_id": 3,
"game_name": "My Awesome Game",
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1509922961,
"date_updated": 1509922961,
"date_live": 1509922961,
"status": 1,
"url": "https://mod.io/g/rogue-knight/r/getting-started",
"name": "Getting Started",
"name_id": "getting-started",
"summary": "Alright, so let's get started with modding on mod.io",
"description": "<h1>Getting Started</h2><p>Download this suspiciou....",
"community_options": 2048,
"tags": [
{
"name": "Instructions",
"date_added": 1499841487,
"count": 22
}
],
"stats": [
{
"guide_id": 2,
"visits_today": 0,
"visits_total": 0,
"comments_total": 0
}
]
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique id of the guide. |
game_id | integer | Unique id of the parent game. |
game_name | string | Name of the parent game. |
logo | Logo Object | No description |
user | User Object | No description |
date_added | integer | Unix timestamp of the date the guide was made. |
date_updated | integer | Unix timestamp of the date the guide was updated. |
date_live | integer | Unix timestamp of the date the guide was set live. |
status | integer | Status of the guide: 0 = Not Accepted 1 = Accepted 3 = Deleted |
url | string | URL to the guide. |
name | string | The name of the guide |
name_id | string | Path for the guide on mod.io. For example: https://mod.io/g/rogue-knight/r/getting-started |
summary | string | The summary of the guide |
description | string | Detailed description of the guide (the contents) which allows HTML. |
community_options | integer | The bitwise community options that are applied to this guide, can be one of: 0 = Disabled 2048 = Allows Comments _(default) |
tags | Guide Tag Object[] | Contains guide tag data. |
stats | Guide Stats Object[] | Contains stats data. |
Guide Stats Object
{
"guide_id": 2,
"visits_today": 0,
"visits_total": 0,
"comments_total": 0
}
Properties
Name | Type | Description |
---|---|---|
guide_id | integer | Unique guide id. |
visits_today | integer | Last 24hours of visits for this guide |
visits_total | integer | Total number of visits for this guide |
comments_total | integer | Total number of comments for this guide |
Guide Tag Object
{
"name": "Instructions",
"date_added": 1499841487,
"count": 22
}
Properties
Name | Type | Description |
---|---|---|
name | string | Tag name. |
date_added | integer | Unix timestamp of date tag was applied. |
count | integer | The amount of times this tag has been applied to guides. This value will only be returned for the Get Guide Tags endpoint. |
Header Image Object
{
"filename": "modio-logo-bluedark.png",
"original": "https://assets.modcdn.io/images/branding/modio-logo-bluedark.png"
}
Properties
Name | Type | Description |
---|---|---|
filename | string | Header image filename including extension. |
original | string | URL to the full-sized header image. |
Icon Object
{
"filename": "icon.png",
"original": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_64x64": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_128x128": "https://assets.modcdn.io/images/placeholder/icon.png",
"thumb_256x256": "https://assets.modcdn.io/images/placeholder/icon.png"
}
Properties
Name | Type | Description |
---|---|---|
filename | string | Icon filename including extension. |
original | string | URL to the full-sized icon. |
thumb_64x64 | string | URL to the small icon thumbnail. |
thumb_128x128 | string | URL to the medium icon thumbnail. |
thumb_256x256 | string | URL to the large icon thumbnail. |
Image Object
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
Properties
Name | Type | Description |
---|---|---|
filename | string | Image filename including extension. |
original | string | URL to the full-sized image. |
thumb_320x180 | string | URL to the image thumbnail. |
thumb_1280x720 | string | URL to the image thumbnail. |
Internal Public User Object
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"profile_url": "https://mod.io/u/xant",
"privacy_options": "0",
"monetization_options": 0,
"monetization_status": 1
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique id of the user. |
name_id | string | Path for the user on mod.io. For example: https://mod.io/u/name-id-here |
username | string | Display name of the user. |
display_name_portal | string | The users' display name for the targeted portal. Value will be null if no valid X-Modio-Portal portal header value is provided. For more information see Targeting a Portal. |
date_online | integer | Unix timestamp of date the user was last online. |
date_joined | integer | Unix timestamp of date the user joined. |
avatar | Avatar Object | Contains media URL's to the users avatar. |
profile_url | string | URL to the users profile. |
privacy_options | string | Users profile privacy setting. |
monetization_options | integer | Monetization options enabled for this user: 0 = Access to monetization features disabled 1 = Access to monetization features enabled 2 = Marketplace enabled ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
monetization_status | integer | The status of a monetized user for the corresponding status . Possible values:0 = Unregistered 1 = Pending 2 = Rejected 4 = Review 8 = Action 16 = Approved 32 = Member |
Key-Value Pair Object
{
"key": "retry-after",
"value": "98"
}
Properties
Name | Type | Description |
---|---|---|
key | string | Key of the key-value pair. |
value | string | Value of the key-value pair. Will always be a string, even if numeric. |
Line Items Object
{
"game_id": 0,
"buyer_id": 0,
"game_name": "my game",
"buyer_name": "smith",
"token_name": "mio",
"token_pack_id": 0,
"token_pack_name": "200 Pack"
}
Properties
Name | Type | Description |
---|---|---|
game_id | integer | The game id of the transaction. |
buyer_id | integer | The buyer id of the transaction. |
game_name | string | The name of the game the purchase occured on. |
buyer_name | string | The username of the buyer. |
token_name | string | The pretty name of the virtual currency used in the transaction. |
token_pack_id | integer | The id of the virtual currency pack used in the transaction. |
token_pack_name | string | The pretty name of the virtual currency pack used in the transaction. |
Logo Object
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
Properties
Name | Type | Description |
---|---|---|
filename | string | Logo filename including extension. |
original | string | URL to the full-sized logo. |
thumb_320x180 | string | URL to the small logo thumbnail. |
thumb_640x360 | string | URL to the medium logo thumbnail. |
thumb_1280x720 | string | URL to the large logo thumbnail. |
Message Object
{
"code": 200,
"message": "Your request was successful."
}
Properties
Name | Type | Description |
---|---|---|
code | integer | HTTP status code of response. |
message | string | The server response to your request. Responses will vary depending on the endpoint, but the object structure will persist. |
Metadata KVP Object
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
Properties
Name | Type | Description |
---|---|---|
metakey | string | The key of the key-value pair. |
metavalue | string | The value of the key-value pair. |
Mod Collection Object
{
"id": 1,
"game_id": 101,
"status": 1,
"visible": true,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"category": "Action",
"date_added": 1633036800,
"date_updated": 1633123200,
"date_live": 1633209600,
"limit_number_mods": 10,
"maturity_option": 1,
"filesize": 2048,
"filesize_uncompressed": 2048,
"platforms": [
"windows",
"ps4"
],
"tags": [
"Multiplayer",
"Adventure"
],
"stats": {
"collection_id": 123,
"downloads_today": 50,
"downloads_unique": 200,
"downloads_total": 1000,
"followers_total": 300,
"ratings_positive_30_days": 25
},
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"name": "My Collection",
"name_id": "my-collection",
"summary": "This is a summary of the collection.",
"description": "This is a detailed description of the collection."
}
Properties
Name | Type | Description |
---|---|---|
id | integer | The collection id. |
game_id | integer | The game id. |
status | integer | The status of the collection. |
visible | boolean | Visibility status of the collection. |
submitted_by | User Object | The user who submitted the collection. |
category | string | The category of the collection. |
date_added | integer | The date the collection was added. |
date_updated | integer | The date the collection was last updated. |
date_live | integer | The date the collection went live. |
limit_number_mods | integer | The maximum limit of mods allowed in this collection. |
maturity_option | integer | The maturity options detected within this collection. |
filesize | integer | The total filesize of all mods in the collection. |
filesize_uncompressed | integer | The total uncompressed filesize of all mods in the collection. |
stats | Collection Stats Object | The stats of the collection. |
logo | Logo Object | The logo of the collection. |
name | string | The name of the collection. |
name_id | string | The name id of the collection. |
summary | string | The summary of the collection. |
description | string | The description of the collection. |
platforms | string[] | The platforms the mods are compatible within this collection. |
tags | string[] | The tags associated with the collection. |
Mod Dependants Object
{
"mod_id": 231,
"name": "Example Mod",
"name_id": "rogue-knight-hd-pack",
"status": 1,
"visible": 1,
"date_added": 1499841487,
"date_updated": 1499841487,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
}
Properties
Name | Type | Description |
---|---|---|
mod_id | integer | Unique ID of the mod that serves as the dependency. |
name | string | Name of the mod dependency. |
name_id | string | Path for the mod on mod.io. For example: https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack |
status | integer | Status of the mod (see status and visibility for details): 0 = Not Accepted 1 = Accepted 3 = Deleted |
visible | integer | Visibility of the mod (see status and visibility for details): 0 = Hidden 1 = Public |
date_added | integer | Unix timestamp of date the dependency was added. |
date_updated | integer | Unix timestamp of date mod was updated. |
logo | Logo Object | Contains media URL's to the logo for the mod. |
Mod Dependencies Object
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
},
"dependency_depth": 0
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique mod id. |
game_id | integer | Unique game id. |
status | integer | Status of the mod (see status and visibility for details): 0 = Not Accepted 1 = Accepted 3 = Deleted |
visible | integer | Visibility of the mod (see status and visibility for details): 0 = Hidden 1 = Public |
submitted_by | User Object | The user who published the mod. |
date_added | integer | Unix timestamp of date mod was registered. |
date_updated | integer | Unix timestamp of date mod was updated. |
date_live | integer | Unix timestamp of date mod was set live. |
maturity_option | integer | Mature content found in this mod, this is only relevant if the parent game allows mods to be labelled as mature: 0 = None 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Add the options you want together, to enable multiple filters (see BITWISE fields) |
community_options | integer | Community features enabled for this mod: 0 = All of the options below are disabled 1 = Enable comments 64 = Enable previews 128 = Enable preview URLs 1024 = Allow dependencies ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
monetization_options | integer | Monetization features enabled for this mod: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by the game for this mod 2 = Marketplace enabled 8 = Quantity of this mod is limited ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
stock | integer | The stock of the mod. 0 is the default value, and is only used when the mod has limited quantity enabled. |
price | integer | The price of the mod. |
tax | integer | The tax of the mod. |
logo | Logo Object | Contains media URL's to the logo for the mod. |
homepage_url | string | Official homepage of the mod. |
name | string | Name of the mod. |
name_id | string | Path for the mod on mod.io. For example: https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack |
summary | string | Summary of the mod. |
description | string | Detailed description of the mod which allows HTML. |
description_plaintext | string |
description field converted into plaintext. |
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. Metadata can also be stored as searchable key value pairs, and to individual mod files. |
profile_url | string | URL to the mod. |
media | Mod Media Object | Contains YouTube & Sketchfab links, aswell as media URL's of images for the mod. |
modfile | Modfile Object | The primary modfile for the mod. |
dependencies | boolean | If the mod has any dependencies, this value will be set to true . |
stats | Mod Stats Object | Numerous aggregate stats for the mod. |
dependency_depth | integer | The depth of the dependency tree for this mod. |
platforms | Mod Platforms Object[] | Contains mod platform data. |
metadata_kvp | Metadata KVP Object[] | Contains key-value metadata. |
tags | Mod Tag Object[] | Contains mod tag data. |
Mod Event Object
{
"id": 13,
"mod_id": 13,
"user_id": 13,
"date_added": 1499846132,
"event_type": "MODFILE_CHANGED"
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique id of the event object. |
mod_id | integer | Unique id of the parent mod. |
user_id | integer | Unique id of the user who performed the action. |
date_added | integer | Unix timestamp of date the event occurred. |
event_type | string | Type of event that was triggered. List of possible events: - MODFILE_CHANGED - MOD_AVAILABLE - MOD_UNAVAILABLE - MOD_EDITED - MOD_DELETED - MOD_TEAM_CHANGED |
Mod Media Object
{
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
}
Properties
Name | Type | Description |
---|---|---|
youtube | string[] | Array of YouTube links. |
sketchfab | string[] | Array of SketchFab links. |
images | Image Object[] | Array of image objects (a gallery). |
Mod Object
{
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique mod id. |
game_id | integer | Unique game id. |
status | integer | Status of the mod (see status and visibility for details): 0 = Not Accepted 1 = Accepted 3 = Deleted |
visible | integer | Visibility of the mod (see status and visibility for details): 0 = Hidden 1 = Public |
submitted_by | User Object | The user who published the mod. |
date_added | integer | Unix timestamp of date mod was registered. |
date_updated | integer | Unix timestamp of date mod was updated. |
date_live | integer | Unix timestamp of date mod was set live. |
maturity_option | integer | Mature content found in this mod, this is only relevant if the parent game allows mods to be labelled as mature: 0 = None 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Add the options you want together, to enable multiple filters (see BITWISE fields) |
community_options | integer | Community features enabled for this mod: 0 = All of the options below are disabled 1 = Enable comments 64 = Enable previews 128 = Enable preview URLs 1024 = Allow dependencies ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
monetization_options | integer | Monetization features enabled for this mod: 0 = Access to monetization features disabled 1 = Access to monetization features enabled by the game for this mod 2 = Marketplace enabled 8 = Quantity of this mod is limited ? = Add the options you want together, to enable multiple features (see BITWISE fields) |
credit_options | integer | Credit options enabled for this mod: 0 = All the options are disabled 1 = Show credits section 2 = Mark with original or permitted assets 4 = Allow redistribution with credit 8 = Allow porting with credit 16 = Allow patching without credit 32 = Allow patching with credit 64 = Allow patching with permission 128 = Allow repackaging without credit 256 = Allow repackaging with credit 512 = Allow repackaging with permission 1024 = Allow users to resell ? = Add the options you want together, to enable multiple options (see BITWISE fields) |
stock | integer | The stock of the mod. 0 is the default value, and is only used when the mod has limited quantity enabled. |
price | integer | The price of the mod. |
tax | integer | The tax of the mod. |
logo | Logo Object | Contains media URL's to the logo for the mod. |
homepage_url | string | Official homepage of the mod. |
name | string | Name of the mod. |
name_id | string | Path for the mod on mod.io. For example: https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack |
summary | string | Summary of the mod. |
description | string | Detailed description of the mod which allows HTML. |
description_plaintext | string |
description field converted into plaintext. |
metadata_blob | string | Metadata that is designed to be handled by the game client and is recommended to not be exposed to content creators when submitting their mods. Metadata can also be stored as searchable key value pairs, and to individual mod files. |
profile_url | string | URL to the mod. |
media | Mod Media Object | Contains YouTube & Sketchfab links, aswell as media URL's of images for the mod. |
modfile | Modfile Object | The primary modfile for the mod. |
dependencies | boolean | If the mod has any dependencies, this value will be set to true . |
stats | Mod Stats Object | Numerous aggregate stats for the mod. |
platforms | Mod Platforms Object[] | Contains mod platform data. |
metadata_kvp | Metadata KVP Object[] | Contains key-value metadata. |
tags | Mod Tag Object[] | Contains mod tag data. |
Mod Platforms Object
{
"platform": "windows",
"modfile_live": 1
}
Properties
Name | Type | Description |
---|---|---|
platform | string | A target platform. |
modfile_live | integer | The unique id of the modfile that is currently live on the platform specified in the platform field. |
Mod Stats Object
{
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
Properties
Name | Type | Description |
---|---|---|
mod_id | integer | Unique mod id. |
popularity_rank_position | integer | Current rank of the mod. |
popularity_rank_total_mods | integer | Number of ranking spots the current rank is measured against. |
downloads_today | integer | Last 24hours of downloads for the mod. |
downloads_total | integer | Total downloads for the mod. |
subscribers_total | integer | Total users who have subscribed to the mod. |
ratings_total | integer | Total times the mod has been rated. |
ratings_positive | integer | Number of positive ratings. |
ratings_negative | integer | Number of negative ratings. |
ratings_percentage_positive | integer | Number of positive ratings, divided by the total ratings to determine it’s percentage score. |
ratings_weighted_aggregate | float | Overall rating of this item calculated using the Wilson score confidence interval. This column is good to sort on, as it will order items based on number of ratings and will place items with many positive ratings above those with a higher score but fewer ratings. |
ratings_display_text | string | Textual representation of the rating in format: - Overwhelmingly Positive - Very Positive - Positive - Mostly Positive - Mixed - Negative - Mostly Negative - Very Negative - Overwhelmingly Negative - Unrated |
date_expires | integer | Unix timestamp until this mods's statistics are considered stale. |
Mod Tag Object
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
Properties
Name | Type | Description |
---|---|---|
name | string | Tag name. |
name_localized | string | The localized tag name influenced by the Accept-Language header, defaults to English. |
date_added | integer | Deprecated: Unix timestamp of date tag was applied. |
Mod User Preview Object
{
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"user_from": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"resource_url": "https://mod.io/g/@rogueknight/m/@some-mod",
"subscribed": false,
"date_added": 1499841487
}
Properties
Name | Type | Description |
---|---|---|
user | User Object | The previewing user. |
user_from | User Object | The user who invited the previewing user, if the previewer was added manually. |
resource_url | string | The URL of the resource that the registrant should be redirect to upon success. |
subscribed | boolean | If the user is also subscribed to the resource. |
date_added | integer | Unix timestamp of the date the user was registered as a previewer. |
Modfile Cook Object
{
"cook_uuid": "123e4567-e89b-12d3-a456-426614174000",
"modfile": 0,
"platform": "ps5",
"status": 1,
"dateadded": 1499841487,
"dateupdated": 1499841487,
"metadata": [
"string"
],
"logs": [
"string"
],
"filename": "rogue-knight-v1.zip",
"filesize": 15181,
"version": "1.3"
}
Properties
Name | Type | Description |
---|---|---|
cook_uuid | string | The UUID of a cook. |
modfile | integer | The id of the source modfile. |
platform | string | The platform being cooked for. |
status | integer | The status of the cook. |
dateadded | integer | Unix timestamp the cook was started. |
dateupdated | integer | Unix timestamp the cook was last updated. |
filename | string | Filename including extension. |
filesize | integer | Size of the file in bytes. |
version | string | Release version this file represents. |
metadata | string[] | The metadata of the cook. |
logs | string[] | The logs of the cook. |
Modfile Object
{
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique modfile id. |
mod_id | integer | Unique mod id. |
date_added | integer | Unix timestamp of date file was added. |
date_updated | integer | Unix timestamp of date file was updated. |
date_scanned | integer | Unix timestamp of date file was virus scanned. |
virus_status | integer | Current virus scan status of the file. For newly added files that have yet to be scanned this field will change frequently until a scan is complete: 0 = Not scanned 1 = Scan complete 2 = In progress 3 = Too large to scan 4 = File not found 5 = Error Scanning |
virus_positive | integer | Was a virus detected: 0 = No threats detected 1 = Flagged as malicious 2 = Flagged as containing potentially harmful files (i.e. EXEs) |
virustotal_hash | string | Deprecated: No longer used and will be removed in subsequent API version. |
filesize | integer | Size of the file in bytes. |
filesize_uncompressed | integer | The uncompressed filesize of the zip archive. |
filehash | Filehash Object | Contains a dictionary of filehashes for the contents of the download. |
filename | string | Filename including extension. |
version | string | Release version this file represents. |
changelog | string | Changelog for the file. |
metadata_blob | string | Metadata stored by the game developer for this file. |
download | Download Object | Contains download data for the modfile. |
platforms | Modfile Platform Object[] | Contains modfile platform data. |
Modfile Platform Object
{
"platform": "windows",
"status": 1
}
Properties
Name | Type | Description |
---|---|---|
platform | string | A target platform. |
status | integer | The status of the modfile for the corresponding platform . Possible values:0 = Pending 1 = Approved 2 = Denied 3 = Targetted |
Modfile Platform Supported Object
{
"targetted": [
"string"
],
"approved": [
"string"
],
"denied": [
"string"
],
"live": [
"string"
],
"pending": [
"string"
]
}
Properties
Name | Type | Description |
---|---|---|
targetted | string[] | Array of valid platform strings showing which platforms the modfile has targeted for release. |
approved | string[] | Array of valid platform strings showing which platforms the modfile has been approved for. |
denied | string[] | Array of valid platform strings showing which platforms the modfile has been denied for. |
live | string[] | Array of valid platform strings showing which platforms the modfile is currently marked as live on. |
pending | string[] | Array of valid platform strings showing which platforms the modfile is currently marked as pending on. |
Monetization Team Accounts Object
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"monetization_status": 0,
"monetization_options": 0,
"split": 0
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique id of the user. |
name_id | string | Path for the user on mod.io. For example: https://mod.io/u/name-id-here |
username | string | Display name of the user. |
monetization_status | integer | The monetization status of the user. |
monetization_options | integer | The monetization options of the user. |
split | integer | User monetization split. |
Multipart Upload Object
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"status": 0
}
Properties
Name | Type | Description |
---|---|---|
upload_id | string | A universally unique identifier (UUID) that represents the upload session. |
status | integer | The status of the upload session: 0 = Incomplete 1 = Pending 2 = Processing 3 = Complete 4 = Cancelled |
Multipart Upload Part Object
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"part_number": 1,
"part_size": 52428800,
"date_added": 1499846132
}
Properties
Name | Type | Description |
---|---|---|
upload_id | string | A universally unique identifier (UUID) that represents the upload session. |
part_number | integer | The part number this object represents. |
part_size | integer | The size of this part in bytes. |
date_added | integer | Unix timestamp of date the part was uploaded. |
Pagination Object
{
"per_page": "15",
"current_page": "/v1/s2s/monetization-teams/{monetization-team-id}/transactions?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0xMC0wMiAwMDo1NTozMiIsIl9wb2ludHNUb05leHRJdaAJdsa10",
"next_page_url": "/v1/s2s/monetization-teams/{monetization-team-id}/transactions?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0xMC0wMiAwMDo1NTozMiIsIl9wb2ludHNUb05leHRJdaAJdsa10",
"prev_page_url": "/v1/s2s/monetization-teams/{monetization-team-id}/transactions?cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0xMC0wMiAwMDo1NTozMiIsIl9wb2ludHNUb05leHRJdaAJdsa10"
}
Properties
Name | Type | Description |
---|---|---|
per_page | integer | The number of items shown per page. |
current_page | string | The url for the current page. |
next_page_url | integer | The url for the next page if it exists. |
prev_page_url | integer | The url for the previous page if it exists. |
Pay Object
{
"transaction_id": 0,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gross_amount": 0,
"net_amount": 0,
"platform_fee": 0,
"gateway_fee": 0,
"transaction_type": "string",
"meta": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "Body Armour",
"game_name": "Half-Life",
"buyer_name": "Gordon Freeman",
"token_name": ".22 Magazine"
}
],
"purchase_date": 1626667557,
"wallet_type": "string",
"balance": 0,
"deficit": 0,
"payment_method_id": "string",
"mod": {
"id": 2,
"game_id": 2,
"status": 1,
"visible": 1,
"submitted_by": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"date_added": 1492564103,
"date_updated": 1499841487,
"date_live": 1499841403,
"maturity_option": 0,
"community_options": 3,
"monetization_options": 0,
"credit_options": 0,
"stock": 0,
"price": 0,
"tax": 0,
"logo": {
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_640x360": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
},
"homepage_url": "https://www.rogue-hdpack.com/",
"name": "Rogue Knight HD Pack",
"name_id": "rogue-knight-hd-pack",
"summary": "It's time to bask in the glory of beautiful 4k textures!",
"description": "<p>Rogue HD Pack does exactly what you thi...",
"description_plaintext": "Rogue HD Pack does exactly what you thi...",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"profile_url": "https://mod.io/g/rogue-knight/m/rogue-knight-hd-pack",
"media": {
"youtube": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"sketchfab": [
"https://sketchfab.com/models/ef40b2d300334d009984c8865b2db1c8"
],
"images": [
{
"filename": "card.png",
"original": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_320x180": "https://assets.modcdn.io/images/placeholder/card.png",
"thumb_1280x720": "https://assets.modcdn.io/images/placeholder/card.png"
}
]
},
"modfile": {
"id": 2,
"mod_id": 2,
"date_added": 1499841487,
"date_updated": 1499841487,
"date_scanned": 1499841487,
"virus_status": 0,
"virus_positive": 0,
"virustotal_hash": "",
"filesize": 15181,
"filesize_uncompressed": 16384,
"filehash": {
"md5": "2d4a0e2d7273db6b0a94b0740a88ad0d"
},
"filename": "rogue-knight-v1.zip",
"version": "1.3",
"changelog": "VERSION 1.3 -- Changes -- Fixed critical castle floor bug.",
"metadata_blob": "rogue,hd,high-res,4k,hd textures",
"download": {
"binary_url": "https://api.mod.io/v1/games/1/mods/1/files/1/download/c489a0354111a4d76640d47f0cdcb294",
"date_expires": 1579316848
},
"platforms": [
{
"platform": "windows",
"status": 1
}
]
},
"dependencies": false,
"platforms": [
{
"platform": "windows",
"modfile_live": 1
}
],
"metadata_kvp": [
{
"metakey": "pistol-dmg",
"metavalue": "800"
}
],
"tags": [
{
"name": "Unity",
"name_localized": "Unity",
"date_added": 1499841487
}
],
"stats": {
"mod_id": 2,
"popularity_rank_position": 13,
"popularity_rank_total_mods": 204,
"downloads_today": 327,
"downloads_total": 27492,
"subscribers_total": 16394,
"ratings_total": 1230,
"ratings_positive": 1047,
"ratings_negative": 183,
"ratings_percentage_positive": 91,
"ratings_weighted_aggregate": 87.38,
"ratings_display_text": "Very Positive",
"date_expires": 1492564103
}
}
}
Properties
Name | Type | Description |
---|---|---|
transaction_id | integer | The transaction id. |
gateway_uuid | string | The universally unique ID (UUID) that represents a unique tranasction with the payment gateway. |
gross_amount | integer | The gross amount of the purchase in the lowest denomination of currency. |
net_amount | integer | The net amount of the purchase in the lowest denomination of currency. |
platform_fee | integer | The platform fee of the purchase in the lowest denomination of currency. |
gateway_fee | integer | The gateway fee of the purchase in the lowest denomination of currency. |
transaction_type | string | The state of the transaction that was processed. E.g. CANCELLED, CLEARED, FAILED, PAID, PENDING, REFUNDED. |
purchase_date | integer | The time of the purchase. |
wallet_type | string | The type of wallet that was used for the purchase. E.g. STANDARD_MIO. |
balance | integer | The balance of the wallet. |
deficit | integer | The deficit of the wallet. |
payment_method_id | string | The payment method id that was used. |
mod | Mod Object | The mod that was purchased. |
meta | array[] | A metadata array of objects returned from the transaction. |
» mod_id | integer | Mod ID. |
» game_id | integer | Game ID. |
» buyer_id | integer | Buyer ID. |
» mod_name | string | Name of the mod. |
» game_name | string | Name of the game. |
» buyer_name | string | Name of the buyer. |
» token_name | string | Name of the token. |
Payment Method Object
{
"name": "Visa ending in 1111",
"id": "123e4567-e89b-12d3-a456-426614174000",
"amount": 199,
"display_amount": "USD 1.99"
}
Properties
Name | Type | Description |
---|---|---|
name | string | The pretty name of the payment method that was used. |
id | string | The UUID of the payment method id that was used. |
amount | integer | The amount the payment method was charged. |
display_amount | string | A pretty string of the amount the payment method was charged. |
Preview Object
{
"resource_url": "https://mod.io/g/@rogueknight/m/@some-mod?preview=00000000000000000000000000000000",
"date_added": 1499841487,
"date_updated": 1499841487
}
Properties
Name | Type | Description |
---|---|---|
resource_url | string | The sharable URL that resource admins can pass around. |
date_added | integer | Unix timestamp of the date the hash was first generated. |
date_updated | integer | Unix timestamp of the date the hash was regenerated. |
Proxy Transformer Object
{
"success": true
}
Properties
Name | Type | Description |
---|---|---|
success | bool | Did the operation succeed? |
Rating Object
{
"game_id": 2,
"mod_id": 2,
"resource_type": "mods",
"resource_id": 2,
"rating": -1,
"date_added": 1492564103
}
Properties
Name | Type | Description |
---|---|---|
game_id | integer | Unique game id. |
mod_id | integer | Unique mod id. Deprecated, use resource_type and resource_id instead. |
resource_type | string | Type of resource: mods = Mod Ratings collections = Collection Ratings. Defaults to: mods. |
resource_id | integer | Unique id of the requested resource type. |
rating | integer | Mod rating value: 1 = Positive Rating -1 = Negative Rating |
date_added | integer | Unix timestamp of date rating was submitted. |
Refund Object
{
"transaction_id": 987654321,
"gross_amount": 2500,
"net_amount": 2300,
"platform_fee": 100,
"gateway_fee": 50,
"tax": 150,
"tax_type": "GST",
"transaction_type": "REFUNDED",
"meta": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "Body Armour",
"game_name": "Half-Life",
"buyer_name": "Gordon Freeman",
"token_name": ".22 Magazine"
}
],
"purchase_date": 1626667557
}
Properties
Name | Type | Description |
---|---|---|
transaction_id | integer | The transaction id. |
gross_amount | integer | The gross amount of the purchase in the lowest denomination of currency. |
net_amount | integer | The net amount of the purchase in the lowest denomination of currency. |
platform_fee | integer | The platform fee of the purchase in the lowest denomination of currency. |
gateway_fee | integer | The gateway fee of the purchase in the lowest denomination of currency. |
tax | integer | The tax amount of the purchase in cents. |
tax_type | string | The tax type. |
transaction_type | string | The state of the transaction that was processed. E.g. CANCELLED, CLEARED, FAILED, PAID, PENDING, REFUNDED. |
purchase_date | integer | The time of the purchase. |
meta | array[] | A metadata array of objects returned from the transaction. |
» mod_id | integer | Mod ID. |
» game_id | integer | Game ID. |
» buyer_id | integer | Buyer ID. |
» mod_name | string | Name of the mod. |
» game_name | string | Name of the game. |
» buyer_name | string | Name of the buyer. |
» token_name | string | Name of the token. |
S2S Pay Object
{
"transaction_id": 123456789,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gross_amount": 1000,
"net_amount": 900,
"platform_fee": 50,
"gateway_fee": 30,
"transaction_type": "PAID",
"meta": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "Body Armour",
"game_name": "Half-Life",
"buyer_name": "Gordon Freeman",
"token_name": ".22 Magazine"
}
],
"purchase_date": 1626667557
}
Properties
Name | Type | Description |
---|---|---|
transaction_id | integer | The transaction id. |
gateway_uuid | string | The universally unique ID (UUID) that represents a unique tranasction with the payment gateway. |
gross_amount | integer | The gross amount of the purchase in the lowest denomination of currency. |
net_amount | integer | The net amount of the purchase in the lowest denomination of currency. |
platform_fee | integer | The platform fee of the purchase in the lowest denomination of currency. |
gateway_fee | integer | The gateway fee of the purchase in the lowest denomination of currency. |
transaction_type | string | The state of the transaction that was processed. E.g. CANCELLED, CLEARED, FAILED, PAID, PENDING, REFUNDED. |
purchase_date | integer | The time of the purchase. |
meta | array[] | A metadata array of objects returned from the transaction. |
» mod_id | integer | Mod ID. |
» game_id | integer | Game ID. |
» buyer_id | integer | Buyer ID. |
» mod_name | string | Name of the mod. |
» game_name | string | Name of the game. |
» buyer_name | string | Name of the buyer. |
» token_name | string | Name of the token. |
Team Member Object
{
"id": 457,
"user": {
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
},
"level": 8,
"date_added": 1492058857,
"position": "Turret Builder",
"invite_pending": 1
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique team member id. |
user | User Object | The user associated with this team access. |
level | integer | Level of permission the user has: 1 = Moderator (can moderate comments and content attached) 4 = Manager (moderator access, including uploading builds and editing settings except supply and team members) 8 = Administrator (full access, including editing the supply and team) |
date_added | integer | Unix timestamp of the date the user was added to the team. |
position | string | Custom title given to the user in this team. |
invite_pending | integer | If the team member invitation is still pending: 0 = Invitation Accepted 1 = Invitation Pending |
Terms Object
{
"plaintext": "This game uses mod.io to support user-generated content. By selecting "I Agree" you agree to the mod.io Terms of Use and a mod.io account will be created for you (using your display name, avatar and ID). Please see the mod.io Privacy Policy on how mod.io processes your personal data.",
"html": "<p>This game uses <a href="https://mod.io">mod.io</a> to support user-generated content. By selecting "I Agree" you agree to the mod.io <a href="https://mod.io/terms">Terms of Use</a> and a mod.io account will be created for you (using your display name, avatar and ID). Please see the mod.io <a href="https://mod.io/privacy">Privacy Policy</a> on how mod.io processes your personal data.</p>",
"buttons": {
"agree": {
"text": "I Agree"
},
"disagree": {
"text": "No, Thanks"
}
},
"links": {
"website": {
"text": "Website",
"url": "https://mod.io",
"required": false
},
"terms": {
"text": "Terms of Use",
"url": "https://mod.io/terms",
"required": true
},
"privacy": {
"text": "Privacy Policy",
"url": "https://mod.io/privacy",
"required": true
},
"refund": {
"text": "Refund Policy",
"url": "https://mod.io/privacy",
"required": false
},
"manage": {
"text": "Manage Account",
"url": "https://mod.io/me/account",
"required": false
}
}
}
Properties
Name | Type | Description |
---|---|---|
plaintext | string | Terms text in plaintext formatting. |
html | string | Terms text in HTML formatting. |
buttons | object | Buttons to embed into the Terms. |
» agree | object | I Agree Button. |
»» text | string | Button text. |
» disagree | object | Disagree Button. |
»» text | string | Button text. |
links | object | Links to embed into the Terms. |
» website | object | Website link. |
»» text | string | Text for the link. |
»» url | string | Link to the mod.io website. |
»» required | boolean | Is this link required. |
» terms | object | Terms of Use link. |
»» text | string | Text for the link. |
»» url | string | Link to the mod.io Terms of Use. |
»» required | boolean | Is this link required. |
» privacy | object | Privacy Policy link. |
»» text | string | Text for the link. |
»» url | string | Link to the mod.io Privacy Policy. |
»» required | boolean | Is this link required. |
» refund | object | Refund Policy link. |
»» text | string | Text for the link. |
»» url | string | Link to the mod.io Refund Policy. |
»» required | boolean | Is this link required. |
» manage | object | Manage User Account link. |
»» text | string | Text for the link. |
»» url | string | Link to the mod.io page to manage a User's Account. |
»» required | boolean | Is this link required. |
Transaction Items Object
{
"id": 1234,
"gateway_uuid": "e9d904ed-86a4-4b10-b1d3-c76e7c62d2e3",
"gateway_name": "tilia",
"sale_price": 0,
"gateway_fee": 0,
"platform_fee": 0,
"currency": "usd",
"tokens": 0,
"token_team_id": 0,
"sale_type": "bought",
"monetization_type": "fiat",
"transaction_type": "paid",
"purchase_date": "2019-08-24T14:15:22Z",
"created_at": 1728268151123456,
"line_items": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "my mod",
"game_name": "my game",
"buyer_name": "buyers name"
}
],
"breakdown": [
{
"platform": {
"revenue": 99
},
"store": [
{
"revenue": 99,
"users": [
{
"account_name": "name",
"account_id": 123,
"revenue": 99
}
]
}
]
}
],
"revenue": 99
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique identifier for the transaction. |
gateway_uuid | string(uuid) | UUID of the payment gateway. |
gateway_name | string | Name of the payment gateway. |
sale_price | number(float) | Sale price of the item. |
gateway_fee | number(float) | Fee charged by the gateway. |
platform_fee | number(float) | Fee charged by the platform. |
currency | string | Currency code for the transaction. |
tokens | integer | Number of tokens involved in the transaction. |
token_team_id | integer | ID of the token team. |
sale_type | string | Type of sale, e.g., bought or sold. |
monetization_type | string | Type of monetization, e.g., fiat. |
transaction_type | string | Type of transaction, e.g., paid or cleared. |
purchase_date | string(date-time) | Date and time of the purchase. |
created_at | integer(int64) | Creation timestamp with microseconds. |
revenue | number(float) | Total revenue for the transaction. |
line_items | array[] | Array of line item objects. |
» mod_id | integer | Mod ID. |
» game_id | integer | Game ID. |
» buyer_id | integer | Buyer ID. |
» mod_name | string | Name of the mod. |
» game_name | string | Name of the game. |
» buyer_name | string | Name of the buyer. |
breakdown | array[] | Array containing breakdown of revenues. |
» platform | object | phpcs:disable Generic.Files.LineLength.TooLong |
»» revenue | number(float) | Platform revenue. |
» store | array[] | Array of store revenue objects. |
»» revenue | number(float) | Store revenue. |
»» users | array[] | Array of user revenue details. |
»»» account_name | string | Account name. |
»»» account_id | integer | Account ID. |
»»» revenue | number(float) | User revenue. |
Transaction Object Index
{
"id": 1234,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gateway_name": "tilia",
"account_id": "12345",
"gross_amount": 199,
"net_amount": 199,
"platform_fee": 20,
"gateway_fee": 30,
"tax": 0,
"tax_type": "sales",
"currency": "usd",
"tokens": 0,
"transaction_type": "paid",
"monetization_type": "paid",
"purchase_date": "2024-10-07 02:29:11",
"created_at": "1728268151123456",
"payment_method": [
{
"name": "Visa ending in 1111",
"id": "123e4567-e89b-12d3-a456-426614174000",
"amount": 199,
"display_amount": "USD 1.99"
}
],
"line_items": [
{
"game_id": 0,
"buyer_id": 0,
"game_name": "my game",
"buyer_name": "smith",
"token_name": "mio",
"token_pack_id": 0,
"token_pack_name": "200 Pack"
}
]
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique transaction id. |
gateway_uuid | string | The universally unique ID (UUID) that represents a unique tranasction with the payment gateway. |
gateway_name | string | The gateway that processed the transaction. |
account_id | integer | The unique monetization account id that actioned the transaction. |
gross_amount | integer | The gross amount of the transaction. |
net_amount | integer | The net amount of the transaction. |
platform_fee | integer | The platform fee of the transaction. |
gateway_fee | integer | The gateway fee of the transaction. |
tax | integer | The tax amount of the transaction. |
tax_type | string | The tax type on the processed transaction. |
currency | string | The currency type on the processed transaction. |
tokens | integer | The amount of virtual currency associated with the transaction. Will be omitted when no tokens are involved. |
transaction_type | string | The transaction status type on the processed transaction. I.e. is it paid, pending, refunded or cleared. |
monetization_type | string | The monetizaton type on the processed transaction. I.e. is it fiat, tokens or external. |
purchase_date | string | The beginging purchase date the transaction started on in a human reabled date time stamp. |
created_at | string | The timestamp of date the transaction status was recorded in micro time precsion. |
payment_method | Payment Method Object[] | Array containing payment method objects. |
line_items | Line Items Object[] | Array containing line item objects. |
Transaction Object Show
{
"id": 1234,
"gateway_uuid": "123e4567-e89b-12d3-a456-426614174000",
"gateway_name": "tilia",
"account_id": "12345",
"gross_amount": 199,
"net_amount": 199,
"platform_fee": 20,
"gateway_fee": 30,
"tax": 0,
"tax_type": "sales",
"currency": "usd",
"tokens": 0,
"transaction_type": "paid",
"monetization_type": "paid",
"purchase_date": "2024-10-07 02:29:11",
"created_at": "1728268151123456",
"payment_method": [
{
"name": "Visa ending in 1111",
"id": "123e4567-e89b-12d3-a456-426614174000",
"amount": 199,
"display_amount": "USD 1.99"
}
],
"items": [
{
"id": 1234,
"gateway_uuid": "e9d904ed-86a4-4b10-b1d3-c76e7c62d2e3",
"gateway_name": "tilia",
"sale_price": 0,
"gateway_fee": 0,
"platform_fee": 0,
"currency": "usd",
"tokens": 0,
"token_team_id": 0,
"sale_type": "bought",
"monetization_type": "fiat",
"transaction_type": "paid",
"purchase_date": "2019-08-24T14:15:22Z",
"created_at": 1728268151123456,
"line_items": [
{
"mod_id": 1234,
"game_id": 4567,
"buyer_id": 8910,
"mod_name": "my mod",
"game_name": "my game",
"buyer_name": "buyers name"
}
],
"breakdown": [
{
"platform": {
"revenue": 99
},
"store": [
{
"revenue": 99,
"users": [
{
"account_name": "name",
"account_id": 123,
"revenue": 99
}
]
}
]
}
],
"revenue": 99
}
],
"line_items": [
{
"game_id": 0,
"buyer_id": 0,
"game_name": "my game",
"buyer_name": "smith",
"token_name": "mio",
"token_pack_id": 0,
"token_pack_name": "200 Pack"
}
]
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique transaction id. |
gateway_uuid | string | The universally unique ID (UUID) that represents a unique tranasction with the payment gateway. |
gateway_name | string | The gateway that processed the transaction. |
account_id | integer | The unique monetization account id that actioned the transaction. |
gross_amount | integer | The gross amount of the transaction. |
net_amount | integer | The net amount of the transaction. |
platform_fee | integer | The platform fee of the transaction. |
gateway_fee | integer | The gateway fee of the transaction. |
tax | integer | The tax amount of the transaction. |
tax_type | string | The tax type on the processed transaction. |
currency | string | The currency type on the processed transaction. |
tokens | integer | The amount of virtual currency associated with the transaction. Will be omitted when no tokens are involved. |
transaction_type | string | The transaction status type on the processed transaction. I.e. is it paid, pending, refunded or cleared. |
monetization_type | string | The monetizaton type on the processed transaction. I.e. is it fiat, tokens or external. |
purchase_date | string | The beginging purchase date the transaction started on in a human reabled date time stamp. |
created_at | string | The timestamp of date the transaction status was recorded in micro time precsion. |
payment_method | Payment Method Object[] | Array containing payment method objects. |
items | Transaction Items Object[] | Array containing Transaction items objects. |
line_items | Line Items Object[] | Array containing line item objects. |
User Access Object
{
"resource_type": "games",
"resource_id": 3026,
"resource_name": "My Awesome Mod",
"resource_name_id": "my-awesome-mod",
"resource_url": ""
}
Properties
Name | Type | Description |
---|---|---|
resource_type | string | Type of resource. Can be one of the following: - games - mods -guides |
resource_id | integer | Unique id of the resource. |
resource_name | integer | The relative name of the resource. |
resource_name_id | string | Path for the resource on mod.io. |
resource_url | string | URL to the resource that was reported. If the resource has been permanently deleted, and thus you cannot access it anymore - this field will be null. |
User Delegation Token Object
{
"entity": "purchase_server",
"token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1....."
}
Properties
Name | Type | Description |
---|---|---|
entity | string | The entity the User Delegation Token was created for. Possible Values are purchase_server . |
token | string | The user delegation token. This cannot be used to authenticate API requests and instead can only be used as request context for select S2S endpoints. |
User Event Object
{
"id": 13,
"game_id": 7,
"mod_id": 13,
"user_id": 13,
"date_added": 1499846132,
"event_type": "USER_SUBSCRIBE"
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique id of the event object. |
game_id | integer | Unique id of the parent game. |
mod_id | integer | Unique id of the parent mod. |
user_id | integer | Unique id of the user who performed the action. |
date_added | integer | Unix timestamp of date the event occurred. |
event_type | string | Type of event that was triggered. List of possible events: - USER_TEAM_JOIN - USER_TEAM_LEAVE - USER_SUBSCRIBE - USER_UNSUBSCRIBE |
User Object
{
"id": 1,
"name_id": "xant",
"username": "XanT",
"display_name_portal": null,
"date_online": 1509922961,
"date_joined": 1509922961,
"avatar": {
"filename": "avatar.png",
"original": "https://assets.modcdn.io/images/placeholder/avatar.png",
"thumb_50x50": "https://assets.modcdn.io/images/placeholder/avatar_50x50.png",
"thumb_100x100": "https://assets.modcdn.io/images/placeholder/avatar_100x100.png"
},
"timezone": "",
"language": "",
"profile_url": "https://mod.io/u/xant"
}
Properties
Name | Type | Description |
---|---|---|
id | integer | Unique id of the user. |
name_id | string | Path for the user on mod.io. For example: https://mod.io/u/name-id-here |
username | string | Display name of the user. |
display_name_portal | string | The users' display name for the targeted portal. Value will be null if no valid X-Modio-Portal portal header value is provided. For more information see Targeting a Portal. |
date_online | integer | Unix timestamp of date the user was last online. |
date_joined | integer | Unix timestamp of date the user joined. |
avatar | Avatar Object | Contains media URL's to the users avatar. |
timezone | string | Deprecated: No longer used and will be removed in subsequent API version. |
language | string | Deprecated: No longer used and will be removed in subsequent API version. To localize the API response we recommend you set the Accept-Language header. |
profile_url | string | URL to the users profile. |
Wallet Balance Object
{
"balance": 0
}
Properties
Name | Type | Description |
---|---|---|
balance | integer | The balance of the wallet. |
Wallet Object
{
"type": "string",
"payment_method_id": "string",
"game_id": "string",
"currency": "string",
"balance": 0,
"pending_balance": 0,
"deficit": 0,
"monetization_status": 1
}
Properties
Name | Type | Description |
---|---|---|
type | string | The type of the wallet. |
payment_method_id | string | The payment_method_id of the wallet. |
game_id | string | The game_id if it's a game wallet. |
currency | string | The currency of the wallet. |
balance | integer | The balance of the wallet. |
pending_balance | integer | The pending funds of the wallet that are not availble to be spent. |
deficit | integer | The deficit of the wallet. |
monetization_status | integer | The status of a monetized user for the corresponding status . Possible values:0 = Unregistered 1 = Pending 2 = Rejected 4 = Review 8 = Action 16 = Approved 32 = Member |
Web Message Object
{
"code": 200,
"success": true,
"message": "You have successfully logged out of mod.io."
}
Properties
Name | Type | Description |
---|---|---|
code | integer | HTTP response code. |
success | boolean | Was the request completed successfully? |
message | string | Optional message to display to the user. |