# REST operations

<!-- Generated by `pnpm docs:reference`. Do not edit this file; change the code it is read from. -->

SleekPixel serves these operations under `/wp-json`. Each is declared, with its description, in the TypeSpec source of `contracts/api/sleek-pixel/openapi.json`.

## Data

### `Data_posts`

`GET /sleek-pixel/v1/data/posts`, requires `manage_options`.

The posts a design can read, matching a search.

## Fonts

### `Fonts_list`

`GET /sleek-pixel/v1/font`, requires `manage_options`.

Every uploaded font: a list, or by ID from older backends.

### `Fonts_remove`

`DELETE /sleek-pixel/v1/font/{id}`, requires `manage_options`.

Deletes a font.

### `Fonts_update`

`PATCH /sleek-pixel/v1/font/{id}`, requires `manage_options`.

Renames a custom font: its `title` is the name the editor lists.

### `Fonts_upload`

`POST /sleek-pixel/v1/font`, requires `manage_options`.

Uploads a font file (ttf, otf, woff or woff2) as a custom font.

## Images

### `Images_create`

`POST /sleek-pixel/v1/image`, requires `manage_options`.

Creates an image design.

### `Images_list`

`GET /sleek-pixel/v1/image`, requires `manage_options`.

Every image design, newest first: a list, or by ID from older backends.

### `Images_read`

`GET /sleek-pixel/v1/image/{id}`, requires `manage_options`.

One image design.

### `Images_remove`

`DELETE /sleek-pixel/v1/image/{id}`, requires `manage_options`.

Deletes an image design.

### `Images_update`

`PATCH /sleek-pixel/v1/image/{id}`, requires `manage_options`.

Saves an image design.

## Render

### `Render_image`

`GET /sleek-pixel/v1/render/{id}`, requires `manage_options`.

Renders an image design for a post and answers the image in the configured file format.

### `Render_preview`

`POST /sleek-pixel/v1/render/{id}`, requires `manage_options`.

Renders the posted, unsaved design for a post and answers it as a base64 data URL.

### `Render_url`

`GET /sleek-pixel/v1/render/{id}/url`, requires `manage_options`.

Renders an image design for a post and answers its cached URL.

## SettingsOperations

### `SettingsOperations_checkApi`

`POST /sleek-pixel/v1/settings/check-api`, requires `manage_options`.

Checks a Google Fonts API key with Google.

### `SettingsOperations_read`

`GET /sleek-pixel/v1/settings`, requires `manage_options`.

The output settings; `apiKey_googleFonts` says whether a Google Fonts key is stored, never the key.

### `SettingsOperations_saveApiKeys`

`PATCH /sleek-pixel/v1/settings/api-keys`, requires `manage_options`.

Saves the Google Fonts API key after Google accepts it, or deletes it when empty.

### `SettingsOperations_saveOptions`

`PATCH /sleek-pixel/v1/settings/options`, requires `manage_options`.

Merges the posted fields into the output settings.

## User

### `User_read`

`GET /sleek-pixel/v1/user`, requires `manage_options`.

The current user's editor preferences.

### `User_save`

`PATCH /sleek-pixel/v1/user`, requires `manage_options`.

Saves the current user's editor preferences.
