Select a background image
const url = 'https://example.com/api/v1/appearance/unsplash/example';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"family":"paper","scheme":"light"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/appearance/unsplash/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "family": "paper", "scheme": "light" }'Selects a background image. It requires a signed-in User with the data scope. It can return 400 if the request is invalid, 401 if the session is missing or expired, 403 if access is denied, 404 if the requested item does not exist, 429 if the request limit is reached and 503 if the service is temporarily unavailable. Route: /api/v1/appearance/unsplash/{photo_id}. Inputs: photo_id. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Stable family keys used for backgrounds shared between devices.
Family and scheme target for a server-downloaded Unsplash photo.
Responses
Section titled “Responses”Readable appearance state and instance capabilities.
object
The old light/dark pair, present only until the client writes its family-keyed migration. Kept as a read bridge for one release.
object
Use the selected theme’s static mesh gradient.
object
Use one six-digit hexadecimal colour.
object
A CSS linear gradient with two or three ordered colour stops.
object
A colour stop. Positions are percentages in ascending order.
object
A CSS radial gradient with a movable centre and two or three stops.
object
A percentage point in a background preview.
object
A colour stop. Positions are percentages in ascending order.
object
Use a stable Files item in this User’s Home.
object
Stable reference and display settings for an image background.
object
Contrast overlay from 0.0 (none) to 1.0 (full).
Immutable Files item identity. It survives file moves and renames.
How the image entered the Home.
Use the selected theme’s static mesh gradient.
object
Use one six-digit hexadecimal colour.
object
A CSS linear gradient with two or three ordered colour stops.
object
A colour stop. Positions are percentages in ascending order.
object
A CSS radial gradient with a movable centre and two or three stops.
object
A percentage point in a background preview.
object
A colour stop. Positions are percentages in ascending order.
object
Use a stable Files item in this User’s Home.
object
Stable reference and display settings for an image background.
object
Contrast overlay from 0.0 (none) to 1.0 (full).
Immutable Files item identity. It survives file moves and renames.
How the image entered the Home.
Background choices by theme family. A missing family uses its theme.
object
The two backgrounds saved for a family.
object
Use the selected theme’s static mesh gradient.
object
Use one six-digit hexadecimal colour.
object
A CSS linear gradient with two or three ordered colour stops.
object
A colour stop. Positions are percentages in ascending order.
object
A CSS radial gradient with a movable centre and two or three stops.
object
A percentage point in a background preview.
object
A colour stop. Positions are percentages in ascending order.
object
Use a stable Files item in this User’s Home.
object
Stable reference and display settings for an image background.
object
Contrast overlay from 0.0 (none) to 1.0 (full).
Immutable Files item identity. It survives file moves and renames.
How the image entered the Home.
Use the selected theme’s static mesh gradient.
object
Use one six-digit hexadecimal colour.
object
A CSS linear gradient with two or three ordered colour stops.
object
A colour stop. Positions are percentages in ascending order.
object
A CSS radial gradient with a movable centre and two or three stops.
object
A percentage point in a background preview.
object
A colour stop. Positions are percentages in ascending order.
object
Use a stable Files item in this User’s Home.
object
Stable reference and display settings for an image background.
object
Contrast overlay from 0.0 (none) to 1.0 (full).
Immutable Files item identity. It survives file moves and renames.
How the image entered the Home.
Feature availability for optional appearance sources.
object
The three type roles that a User can choose in Settings → Appearance.
object
Display face ids are stable settings values, not font file names.
Mono face ids are stable settings values, not font file names.
UI face ids are stable settings values, not font file names.
Example
{ "auto_scheme": { "mode": "system" }, "background": { "dark": { "kind": "theme" }, "light": { "kind": "theme" } }, "backgrounds": { "additionalProperty": { "dark": { "kind": "theme" }, "light": { "kind": "theme" } } }, "fonts": { "display": "bricolage-grotesque", "mono": "maple-mono", "ui": "google-sans" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}