{{define "api-list-post"}}
POST/list

### Description

Creates a list of files that can be viewed together on the file viewer page.

### Parameters

POST body should be a JSON object, example below. A list can contain maximally 5000 files. If you try to add more the request will fail.

#### Example

    {
    	"title": "My beautiful photos",
    	"description": "An album of photos from my vacation in Austria",
    	"files": [ // Ordered array of files to add to the list
    		{
    			"id": "abc123",
    			"description": "First photo of the week, such a beautiful valley"
    		},
    		{
    			"id": "123abc",
    			"description": "The week went by so quickly, here's a photo from the plane back"
    		}
    	]
    }

### Returns

    HTTP 200: OK
    {
    	"success": true,
    	"id": "yay137" // ID of the newly created list
    }

    HTTP 422: Unprocessable Entity
    {
    	"success": false,
    	"value": "file_not_found",
    	"id": "Oh42No", // The file you tried to add with this ID does not exist
    	"message": "File Oh42No was not found in the database."
    }

    HTTP 413: Payload too large
    {
    	"success": false,
    	"value": "too_many_files",
    	"message": "This list contains too many files, max 5000 allowed."
    }

    HTTP 422: Unprocessable Entity
    {
    	"success": false,
    	"value": "json_parse_failed",
    	"message": "The JSON object in the request body could not be read."
    }

    HTTP 413: Payload too large
    {
    	"success": false,
    	"value": "title_too_long",
    	"message": "The title of this list is too long, max 300 characters allowed."
    }

    HTTP 413: Payload too large
    {
    	"success": false,
    	"value": "description_too_long",
    	"message": "The description of this list or one of the files in the list is too long, max 3000 characters allowed."
    }

    HTTP 422: Unprocessable Entity
    {
    	"success": false,
    	"value": "cannot_create_empty_list",
    	"message": "You cannot make a list with no files."
    }

{{end}}