putLoginBackground
PUT
/api/v1/settings/login-background
const url = 'https://example.com/api/v1/settings/login-background';const options = { method: 'PUT', headers: {'X-CSRF-Token': 'example', 'Content-Type': 'application/json'}, body: '{"assetId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/settings/login-background \ --header 'Content-Type: application/json' \ --header 'X-CSRF-Token: example' \ --data '{ "assetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Select the login background image asset. Requires an Owner or Administrator in an enrolled dashboard session. Cookie-authenticated unsafe requests require X-CSRF-Token.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters”X-CSRF-Token
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
assetId
required
string format: uuid
Examplegenerated
{ "assetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “ Responses ”Login background selected
Media typeapplication/json
object
data
required
object
assetId
Chosen image asset, or null when no background is set and the login page falls back to its default artwork.
string | null format: uuid
imageUrl
required
string
Examplegenerated
{ "data": { "assetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "imageUrl": "example" }}Invalid request body
Dashboard authentication required
Insufficient role
Setup is not complete
Asset is not a valid image asset