Upload list file
Deprecated
POST
/api/v1/list/{id}/file
const url = 'https://example.com/api/v1/list/example/file';const form = new FormData();form.append('name', 'example');form.append('public', 'true');form.append('description', 'example');form.append('trails', 'example');form.append('trails-', 'example');form.append('trails+', 'example');
const options = {method: 'POST'};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/list/example/file \ --header 'Content-Type: multipart/form-data' \ --form name=example \ --form public=true \ --form description=example \ --form trails=example \ --form trails-=example \ --form 'trails+=example'Deprecated alias of POST /api/v1/list/form/{id}, which accepts the same multipart body and is the endpoint to use. Kept for compatibility; behaves like the form endpoint, except that a body without an avatar part (PocketBase’s +/- modifiers are accepted) is rejected with 400 missing_file instead of being applied as a no-op.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
name
string
public
boolean
description
string
trails
Array<string>
trails-
Remove trail by ID
string
trails+
Add trail by ID
string
Responses
Section titled “Responses”List updated
Media typeapplication/json
object
id
required
List ID (15 chars)
string
name
required
string
public
required
boolean
description
string
author
required
Author user ID
string
trails
Array<string>
created
string format: date-time
updated
string format: date-time
Examplegenerated
{ "id": "example", "name": "example", "public": true, "description": "example", "author": "example", "trails": [ "example" ], "created": "2026-04-15T12:00:00Z", "updated": "2026-04-15T12:00:00Z"}Bad Request (no avatar part in the body, invalid id, or body id differs from the path)
Not Found
Internal Server Error