Pterodactyl API v1
File Manager

Write file

Writes raw content to the specified file, creating it if it does not exist. The request body is written to the file verbatim.

POST/api/client/servers/{server}/files/write

Authorization

ClientToken
AuthorizationBearer <token>

Client API key (generated at /account/api)

In: header

Path Parameters

server*string

Server identifier (short 8-character ID)

Query Parameters

file*string

Path to the target file, relative to the server root (e.g. /eula.txt). Sent URL-encoded in the query string.

Request Body

text/plain

Raw content to write to the file. Sent as-is; an empty body produces an empty file.

body*string

Response Body

curl -X POST "https://pterodactyl.file.properties/api/client/servers/1a7ce997/files/write?file=%2Feula.txt" \  -H "Authorization: Bearer ptlc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \  -H "Accept: application/json" \  -H "Content-Type: text/plain" \  -d 'eula=true'
Empty