Skip to content

Create Lists

URL: /lists

METHOD: POST

HEADERS:

KeyValueOptional
Acceptapplication/jsonNo
AuthorizationBearer <your-api-token>Yes

Body Data

NameTypeRequiredDescription
namestringYesThe name of the list
gameintegerYesThe ID of the game the list is for
descriptionstringYesA brief description of the list
files[]arrayYesThe files of the list. At least one file is required
versionstringNoThe version of the list
websitestringNoThe URL of the list’s website
discordstringNoThe URL of the list’s Discord server
readmestringNoThe URL of the list’s readme file
privatebooleanNoWhether the list is private. Defaults to false
expiresstringNoThe expiration time of the list. Valid values are 3h, 24h, 3d, 1w, or perm. If this property is not provided, the default value will be determined based on whether the user is logged in or not. Default for anonymous lists is 24h, for logged in is perm

Example HTTP Responses

Success Response

Code: HTTP 201 CREATED

Content:

{
"data": {
"name": "A Test List!",
"version": null,
"slug": "a-test-list-3",
"url": "/v1/lists/a-test-list-3",
"description": "A Description about the test list!",
"website": "example.com",
"discord": "example.com",
"readme": null,
"private": true,
"expires": null,
"created": "2023-03-25T01:19:17.000000Z",
"updated": "2023-03-25T01:19:17.000000Z",
"author": {
"name": "Test22",
"verified": false
},
"game": {
"name": "TESIII Morrowind"
},
"links": {
"url": "http://localhost:3000/lists/a-test-list-3",
"self": "http://localhost/v1/lists/a-test-list-3"
}
}
}

Error Responses

Code: HTTP 401 UNAUTHORIZED

Content:

{
"message": "Unauthenticated. (Make sure the token is correct.)"
}

Code: HTTP 403 FORBIDDEN

Content:

{
"message": "This action is forbidden. (Token doesn't have permission for this action.)"
}

Code: HTTP 422 UNPROCESSABLE ENTITY

Content:

{
"message": "The game field is required.",
"errors": {
"game": ["The game field is required."]
}
}

Example Usage

POST /v1/lists

{
"name": "My Load Order",
"game": 1,
"description": "This is my amazing load order.",
"files[]": [file, file], // Files must be, well, files.
"version": "1.0.0",
"website": "https://example.com/loadorder",
"discord": "https://example.com/discord",
"readme": "https://example.com/loadorder/readme.txt",
"private": true,
"expires": "1w"
}

This will create a list titled My Load Order that is private and expires in one week.