Set a Server Preference
This API endpoint will set a single Plex server setting. Some of the preferences can be set from the Plex settings while others are not available from the Web app.
URL
PUT http://{ip_address}:32400/:/prefs?{name}={value}&X-Plex-Token={plex_token}Parameters
| Name | Description |
|---|---|
| ip_address | The IP address of the Plex Media server. |
| plex_token | The Plex token. |
| name | The name of the preference to be set. The different preference names can be found on the server settings page. |
| value | The value to set for the preference. |
Return Status
| HTTP Code | Description |
|---|---|
| 200 | Success. The request was successful. |
| 400 | Bad Request. The preference name is not valid. |
| 401 | Unauthorized. The Plex token provided was not valid. |
Response
No response is returned by the command. The status code will indicate whether the preference was set successfully.
Remarks
The preference names are case-sensitive. For example, using friendlyName instead of FriendlyName will not set the preference and will result in a 400 Bad Request response with the following message:
cannot set preference value for unknown preference friendlyName
You can send a request to the Get Server Preferences endpoint to get all settings for a Plex server, and then send those settings into this endpoint to transfer settings between Plex servers.
Examples
curl -X PUT http://{ip_address}:32400/:/prefs?{name}={value}&X-Plex-Token={plex_token}
import requests
plex_url = http://{ip_address}:32400/:/prefs?{name}={value}&X-Plex-Token={plex_token}
response = requests.put(plex_url)
print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/:/prefs?{name}={value}&X-Plex-Token={plex_token}' -Method PUT
Write-Output $responseScript examples
Below are a list of post and articles that provide an example that use this API endpoint: