Plex Host Docs
API

Files

Endpoints for the same file manager the dashboard uses — listing directories, reading and writing file contents, and the signed URLs used for larger uploads and downloads.

Actions that mutate the filesystem (write, copy, delete, rename, create directory) acknowledge with { "success": true } in data rather than echoing the file back — fetch the file again if you need its new contents.

GET
/api/v1/servers/{id}/files
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Query Parameters

path?string

Directory to list, absolute from server root.

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/servers/string/files"
{
  "data": [
    {
      "isEditable": true,
      "isFile": true,
      "isSymlink": true,
      "mimetype": "string",
      "mode": "string",
      "modifiedAt": "2019-08-24T14:15:22Z",
      "name": "string",
      "size": 0
    }
  ],
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
GET
/api/v1/servers/{id}/files/content
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Query Parameters

path*string

Absolute path of the file to read.

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/servers/string/files/content?path=string"
{
  "data": {
    "content": "string",
    "path": "string"
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
PUT
/api/v1/servers/{id}/files/content
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://example.com/api/v1/servers/string/files/content" \  -H "Content-Type: application/json" \  -d '{    "content": "string",    "path": "string"  }'
{
  "data": {
    "success": true
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
POST
/api/v1/servers/{id}/files/copy
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/servers/string/files/copy" \  -H "Content-Type: application/json" \  -d '{    "path": "string"  }'
{
  "data": {
    "success": true
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
POST
/api/v1/servers/{id}/files/delete
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/servers/string/files/delete" \  -H "Content-Type: application/json" \  -d '{    "paths": [      "string"    ]  }'
{
  "data": {
    "success": true
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
POST
/api/v1/servers/{id}/files/directories
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/servers/string/files/directories" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "parentPath": "string"  }'
{
  "data": {
    "success": true
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
GET
/api/v1/servers/{id}/files/disk-usage
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/servers/string/files/disk-usage"
{
  "data": {
    "limitBytes": 0,
    "usedBytes": 0
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
POST
/api/v1/servers/{id}/files/download-url
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/servers/string/files/download-url" \  -H "Content-Type: application/json" \  -d '{    "path": "string"  }'
{
  "data": {
    "expiresAt": "2019-08-24T14:15:22Z",
    "url": "string"
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
POST
/api/v1/servers/{id}/files/rename
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/servers/string/files/rename" \  -H "Content-Type: application/json" \  -d '{    "fromPath": "string",    "toPath": "string"  }'
{
  "data": {
    "success": true
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
POST
/api/v1/servers/{id}/files/upload-url
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Server id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/servers/string/files/upload-url" \  -H "Content-Type: application/json" \  -d '{    "directory": "string"  }'
{
  "data": {
    "expiresAt": "2019-08-24T14:15:22Z",
    "url": "string"
  },
  "meta": {
    "requestId": "string"
  }
}
{
  "error": {
    "code": "string",
    "details": [
      "string"
    ],
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}

On this page