Settings
These are the docs for the settings endpoints. Used for getting and changing the settings of your user, as well as local browser (cookie-based) settings.
Get the settings
Returns the settings. If requesting as the logged in user, it will return settings saved on the user. If not logged in it will return the settings saved in the browser as a cookie (or default settings if the cookie isn't set, and sets one).
GET /api/v3/settings
Required scope
user:read
(if logged in)
Response
It will also set a new session cookie with settings if one didn't exist on the request.
{
"copyLinkOnCreate": false,
"defaultIndentationUnit": "spaces",
"defaultIndentationWidth": 4,
"defaultLanguage": "Autodetect",
"pasteView": "tabbed",
"textWrap": true,
"theme": "myst"
}
Update the settings
Updates the settings. If requesting as the logged in user, it will update the settings saved on the user. If not logged in it will update the settings saved in the browser as a cookie.
PATCH /api/v3/settings
Required scope
user
(if logged in)
Request
It will also set a new session cookie with settings if one didn't exist on the request.
{
"copyLinkOnCreate": false,
"defaultIndentationUnit": "spaces",
"defaultIndentationWidth": 4,
"defaultLanguage": "Autodetect",
"pasteView": "tabbed",
"textWrap": true,
"theme": "myst"
}
Get the user settings
Returns the user settings of the currently logged in user.
Update the user settings
Updates the user settings of the currently logged in user.
Update the username
Updates the currently logged in user's username (if available).
PATCH /api/v3/settings/username
Update the avatar
Updates the currently logged in user's avatar.
PATCH /api/v3/settings/avatar
You should make the request as a multipart/form-data
request with the file attached.
Required scope
user