# SettingsService

**Spinbox is experimental: APIs change and data may be lost.** What is built and what proves it is on [Status](https://docs.spinbox.dev/reference/status.md); what Spinbox does not do is on [Limitations](https://docs.spinbox.dev/overview/limitations.md).

> spin.v1.SettingsService: each procedure, its request and its response.

<!-- Generated by tools/refgen from spin:internal/controlplane/apidocs/spin.v1.openapi.json. Edit the source, not this file. -->

## GetNotificationPreferences

`POST /spin.v1.SettingsService/GetNotificationPreferences`

Which of those the caller is emailed about, and for an administrator which of the installation's events besides.

**Request**

No fields: `{}`.

**Response**

| Field | Type | What it is |
|---|---|---|
| `preferences` | list of [NotificationPreference](https://docs.spinbox.dev/reference/api/types.md#notificationpreference) | One per event a person may be told of, in the order they are shown: an administrator's include the installation's. |
| `emailConfigured` | boolean |  |

## GetUserSettings

`POST /spin.v1.SettingsService/GetUserSettings`

User settings

**Request**

No fields: `{}`.

**Response**

| Field | Type | What it is |
|---|---|---|
| `settings` | [UserSettings](https://docs.spinbox.dev/reference/api/types.md#usersettings) |  |

## ListNotifications

`POST /spin.v1.SettingsService/ListNotifications`

What happened to the caller's workspaces that they are told of, newest first, with whether each was sent and how. Recorded whether or not the installation can send email.

**Request**

No fields: `{}`.

**Response**

| Field | Type | What it is |
|---|---|---|
| `notifications` | list of [Notification](https://docs.spinbox.dev/reference/api/types.md#notification) |  |
| `emailConfigured` | boolean | Whether the installation can send email at all. |

## UpdateNotificationPreferences

`POST /spin.v1.SettingsService/UpdateNotificationPreferences`

**Request**

| Field | Type | What it is |
|---|---|---|
| `preferences` | list of [NotificationPreference](https://docs.spinbox.dev/reference/api/types.md#notificationpreference) | Each event named is set; one not named keeps what it was. |

**Response**

| Field | Type | What it is |
|---|---|---|
| `preferences` | list of [NotificationPreference](https://docs.spinbox.dev/reference/api/types.md#notificationpreference) |  |

## UpdateUserSettings

`POST /spin.v1.SettingsService/UpdateUserSettings`

**Request**

| Field | Type | What it is |
|---|---|---|
| `dotfiles` | [DotfilesConfig](https://docs.spinbox.dev/reference/api/types.md#dotfilesconfig) |  |
| `startupTaskfile` | string |  |
| `defaultShell` | string |  |
| `editorSettings` | map of string to string |  |
| `defaultEnv` | map of string to string |  |

**Response**

| Field | Type | What it is |
|---|---|---|
| `settings` | [UserSettings](https://docs.spinbox.dev/reference/api/types.md#usersettings) |  |

## ValidateTaskfile

`POST /spin.v1.SettingsService/ValidateTaskfile`

Validate Taskfile syntax

**Request**

| Field | Type | What it is |
|---|---|---|
| `taskfileContent` | string |  |

**Response**

| Field | Type | What it is |
|---|---|---|
| `valid` | boolean |  |
| `errors` | list of string |  |
| `taskNames` | list of string | List of defined tasks |
