# API workspaces



This page is for the person who connects a program to the API.



Workspace containers for the files of an account.

## listWorkspaces

`GET /api/workspaces`

List every workspace of the signed in account.

Lists the workspaces that the account is a member of, with the current role in each. An account never sees a workspace it does not belong to.

### Authentication

Use one of these options:
- [sessionCookie](https://docs.tidynotebook.com/api-reference.md#sessioncookie)
- [personalApiKey](https://docs.tidynotebook.com/api-reference.md#personalapikey)

### Parameters

#### x-request-id

```json
{
  "name": "x-request-id",
  "in": "header",
  "required": false,
  "style": "simple",
  "explode": false,
  "description": "Optional caller supplied correlation identifier. The server echoes the value and generates a UUID when the header is absent. A value outside the pattern below is rejected with a 400 problem.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._-]+$"
  }
}
```

### Responses

#### 200

Every workspace of the signed in account.

```json
{
  "description": "Every workspace of the signed in account.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/WorkspaceList"
      }
    }
  }
}
```

Schemas: [WorkspaceList](https://docs.tidynotebook.com/api-schemas.md#workspacelist).

#### 400

The request did not match the contract.

```json
{
  "description": "The request did not match the contract.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 401

The request carries no usable session.

```json
{
  "description": "The request carries no usable session.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 403

The actor may not perform this operation.

```json
{
  "description": "The actor may not perform this operation.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 500

The service failed to complete the request.

```json
{
  "description": "The service failed to complete the request.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

## createWorkspace

`POST /api/workspaces`

Create a workspace owned by the signed in account.

Creates a workspace whose only member is the account that created it, as its owner.

### Authentication

Use one of these options:
- [sessionCookie](https://docs.tidynotebook.com/api-reference.md#sessioncookie)
- [personalApiKey](https://docs.tidynotebook.com/api-reference.md#personalapikey)

### Parameters

#### x-request-id

```json
{
  "name": "x-request-id",
  "in": "header",
  "required": false,
  "style": "simple",
  "explode": false,
  "description": "Optional caller supplied correlation identifier. The server echoes the value and generates a UUID when the header is absent. A value outside the pattern below is rejected with a 400 problem.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._-]+$"
  }
}
```

### Request body

```json
{
  "description": "The name to give the workspace.",
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/WorkspaceNameInput"
      }
    }
  }
}
```

Schemas: [WorkspaceNameInput](https://docs.tidynotebook.com/api-schemas.md#workspacenameinput).

### Responses

#### 201

One workspace of the signed in account.

```json
{
  "description": "One workspace of the signed in account.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Workspace"
      }
    }
  }
}
```

Schemas: [Workspace](https://docs.tidynotebook.com/api-schemas.md#workspace).

#### 400

The request did not match the contract.

```json
{
  "description": "The request did not match the contract.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 401

The request carries no usable session.

```json
{
  "description": "The request carries no usable session.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 403

The actor may not perform this operation.

```json
{
  "description": "The actor may not perform this operation.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 413

The request body is larger than the configured limit. A save of a note adds document_too_large, which means that the update or the document it would produce passes a bound of the workspace. The work stays on the device, which offers recovery rather than sending the same bytes again.

```json
{
  "description": "The request body is larger than the configured limit. A save of a note adds document_too_large, which means that the update or the document it would produce passes a bound of the workspace. The work stays on the device, which offers recovery rather than sending the same bytes again.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 415

The request media type is not supported.

```json
{
  "description": "The request media type is not supported.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 423

The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.

```json
{
  "description": "The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 500

The service failed to complete the request.

```json
{
  "description": "The service failed to complete the request.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

## updateWorkspace

`PUT /api/workspaces/{workspaceId}`

Rename a workspace.

Renames a workspace. An owner or an administrator of that workspace may do this.

### Authentication

Use one of these options:
- [sessionCookie](https://docs.tidynotebook.com/api-reference.md#sessioncookie)
- [personalApiKey](https://docs.tidynotebook.com/api-reference.md#personalapikey)

### Parameters

#### x-request-id

```json
{
  "name": "x-request-id",
  "in": "header",
  "required": false,
  "style": "simple",
  "explode": false,
  "description": "Optional caller supplied correlation identifier. The server echoes the value and generates a UUID when the header is absent. A value outside the pattern below is rejected with a 400 problem.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._-]+$"
  }
}
```

#### workspaceId

```json
{
  "name": "workspaceId",
  "in": "path",
  "required": true,
  "style": "simple",
  "explode": false,
  "description": "Identifier of the workspace that the operation acts on.",
  "schema": {
    "$ref": "#/components/schemas/Uuid"
  }
}
```

Schemas: [Uuid](https://docs.tidynotebook.com/api-schemas.md#uuid).

### Request body

```json
{
  "description": "The name to give the workspace.",
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/WorkspaceNameInput"
      }
    }
  }
}
```

Schemas: [WorkspaceNameInput](https://docs.tidynotebook.com/api-schemas.md#workspacenameinput).

### Responses

#### 200

One workspace of the signed in account.

```json
{
  "description": "One workspace of the signed in account.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Workspace"
      }
    }
  }
}
```

Schemas: [Workspace](https://docs.tidynotebook.com/api-schemas.md#workspace).

#### 400

The request did not match the contract.

```json
{
  "description": "The request did not match the contract.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 401

The request carries no usable session.

```json
{
  "description": "The request carries no usable session.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 403

The actor may not perform this operation.

```json
{
  "description": "The actor may not perform this operation.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 404

The requested resource does not exist.

```json
{
  "description": "The requested resource does not exist.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 413

The request body is larger than the configured limit. A save of a note adds document_too_large, which means that the update or the document it would produce passes a bound of the workspace. The work stays on the device, which offers recovery rather than sending the same bytes again.

```json
{
  "description": "The request body is larger than the configured limit. A save of a note adds document_too_large, which means that the update or the document it would produce passes a bound of the workspace. The work stays on the device, which offers recovery rather than sending the same bytes again.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 415

The request media type is not supported.

```json
{
  "description": "The request media type is not supported.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 423

The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.

```json
{
  "description": "The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 500

The service failed to complete the request.

```json
{
  "description": "The service failed to complete the request.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

## deleteWorkspace

`DELETE /api/workspaces/{workspaceId}`

Delete a workspace and every record that belongs to it.

Deletes a workspace and its complete content history. Only its owner may do this.

### Authentication

Use one of these options:
- [sessionCookie](https://docs.tidynotebook.com/api-reference.md#sessioncookie)
- [personalApiKey](https://docs.tidynotebook.com/api-reference.md#personalapikey)

### Parameters

#### x-request-id

```json
{
  "name": "x-request-id",
  "in": "header",
  "required": false,
  "style": "simple",
  "explode": false,
  "description": "Optional caller supplied correlation identifier. The server echoes the value and generates a UUID when the header is absent. A value outside the pattern below is rejected with a 400 problem.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._-]+$"
  }
}
```

#### workspaceId

```json
{
  "name": "workspaceId",
  "in": "path",
  "required": true,
  "style": "simple",
  "explode": false,
  "description": "Identifier of the workspace that the operation acts on.",
  "schema": {
    "$ref": "#/components/schemas/Uuid"
  }
}
```

Schemas: [Uuid](https://docs.tidynotebook.com/api-schemas.md#uuid).

### Responses

#### 200

The named record no longer exists.

```json
{
  "description": "The named record no longer exists.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Removed"
      }
    }
  }
}
```

Schemas: [Removed](https://docs.tidynotebook.com/api-schemas.md#removed).

#### 400

The request did not match the contract.

```json
{
  "description": "The request did not match the contract.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 401

The request carries no usable session.

```json
{
  "description": "The request carries no usable session.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 403

The actor may not perform this operation.

```json
{
  "description": "The actor may not perform this operation.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 404

The requested resource does not exist.

```json
{
  "description": "The requested resource does not exist.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 423

The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.

```json
{
  "description": "The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 500

The service failed to complete the request.

```json
{
  "description": "The service failed to complete the request.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

## getDailyNoteSettings

`GET /api/workspaces/{workspaceId}/daily-note-settings`

Read the daily note settings of the signed in member.

Reports the settings of daily notes that the signed in account keeps in this workspace: the note whose text a new daily note starts with, and whether the note of today opens when the application starts. A member that never stored a setting reads the defaults, which name no template and open nothing. The settings of another member are never part of the answer.

### Authentication

Use one of these options:
- [sessionCookie](https://docs.tidynotebook.com/api-reference.md#sessioncookie)
- [personalApiKey](https://docs.tidynotebook.com/api-reference.md#personalapikey)

### Parameters

#### x-request-id

```json
{
  "name": "x-request-id",
  "in": "header",
  "required": false,
  "style": "simple",
  "explode": false,
  "description": "Optional caller supplied correlation identifier. The server echoes the value and generates a UUID when the header is absent. A value outside the pattern below is rejected with a 400 problem.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._-]+$"
  }
}
```

#### workspaceId

```json
{
  "name": "workspaceId",
  "in": "path",
  "required": true,
  "style": "simple",
  "explode": false,
  "description": "Identifier of the workspace that the operation acts on.",
  "schema": {
    "$ref": "#/components/schemas/Uuid"
  }
}
```

Schemas: [Uuid](https://docs.tidynotebook.com/api-schemas.md#uuid).

### Responses

#### 200

The stored daily note settings of the signed in member.

```json
{
  "description": "The stored daily note settings of the signed in member.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DailyNoteSettings"
      }
    }
  }
}
```

Schemas: [DailyNoteSettings](https://docs.tidynotebook.com/api-schemas.md#dailynotesettings).

#### 400

The request did not match the contract.

```json
{
  "description": "The request did not match the contract.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 401

The request carries no usable session.

```json
{
  "description": "The request carries no usable session.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 403

The actor may not perform this operation.

```json
{
  "description": "The actor may not perform this operation.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 404

The requested resource does not exist.

```json
{
  "description": "The requested resource does not exist.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 423

The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.

```json
{
  "description": "The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 500

The service failed to complete the request.

```json
{
  "description": "The service failed to complete the request.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

## updateDailyNoteSettings

`PUT /api/workspaces/{workspaceId}/daily-note-settings`

Replace the daily note settings of the signed in member.

Replaces the settings of daily notes that the signed in account keeps in this workspace. A template must name a live note of this workspace, and a template that names no such note is refused as not found. A folder and a name format that cannot make a note path for every date are refused as an invalid path. The settings of another member do not change.

### Authentication

Use one of these options:
- [sessionCookie](https://docs.tidynotebook.com/api-reference.md#sessioncookie)
- [personalApiKey](https://docs.tidynotebook.com/api-reference.md#personalapikey)

### Parameters

#### x-request-id

```json
{
  "name": "x-request-id",
  "in": "header",
  "required": false,
  "style": "simple",
  "explode": false,
  "description": "Optional caller supplied correlation identifier. The server echoes the value and generates a UUID when the header is absent. A value outside the pattern below is rejected with a 400 problem.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._-]+$"
  }
}
```

#### workspaceId

```json
{
  "name": "workspaceId",
  "in": "path",
  "required": true,
  "style": "simple",
  "explode": false,
  "description": "Identifier of the workspace that the operation acts on.",
  "schema": {
    "$ref": "#/components/schemas/Uuid"
  }
}
```

Schemas: [Uuid](https://docs.tidynotebook.com/api-schemas.md#uuid).

### Request body

```json
{
  "description": "The daily note settings to store for the signed in member.",
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DailyNoteSettingsInput"
      }
    }
  }
}
```

Schemas: [DailyNoteSettingsInput](https://docs.tidynotebook.com/api-schemas.md#dailynotesettingsinput).

### Responses

#### 200

The stored daily note settings of the signed in member.

```json
{
  "description": "The stored daily note settings of the signed in member.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DailyNoteSettings"
      }
    }
  }
}
```

Schemas: [DailyNoteSettings](https://docs.tidynotebook.com/api-schemas.md#dailynotesettings).

#### 400

The request did not match the contract.

```json
{
  "description": "The request did not match the contract.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 401

The request carries no usable session.

```json
{
  "description": "The request carries no usable session.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 403

The actor may not perform this operation.

```json
{
  "description": "The actor may not perform this operation.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 404

The requested resource does not exist.

```json
{
  "description": "The requested resource does not exist.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 413

The request body is larger than the configured limit. A save of a note adds document_too_large, which means that the update or the document it would produce passes a bound of the workspace. The work stays on the device, which offers recovery rather than sending the same bytes again.

```json
{
  "description": "The request body is larger than the configured limit. A save of a note adds document_too_large, which means that the update or the document it would produce passes a bound of the workspace. The work stays on the device, which offers recovery rather than sending the same bytes again.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 415

The request media type is not supported.

```json
{
  "description": "The request media type is not supported.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 422

The request is well formed but its content cannot be accepted. The code names the reason: invalid_path, invalid_graph, invalid_content, or too_many_files. A save of a note adds document_malformed for bytes that are not an update, document_dependency_missing for work that names an insertion or a deletion the document lacks, and document_unsupported for work that writes anything other than the text of the note, and unrenderable_note for a note over a limit of the Markdown grammar, with the limit in noteRefusal. Each of them leaves the accepted state exactly as it was.

```json
{
  "description": "The request is well formed but its content cannot be accepted. The code names the reason: invalid_path, invalid_graph, invalid_content, or too_many_files. A save of a note adds document_malformed for bytes that are not an update, document_dependency_missing for work that names an insertion or a deletion the document lacks, and document_unsupported for work that writes anything other than the text of the note, and unrenderable_note for a note over a limit of the Markdown grammar, with the limit in noteRefusal. Each of them leaves the accepted state exactly as it was.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 423

The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.

```json
{
  "description": "The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 500

The service failed to complete the request.

```json
{
  "description": "The service failed to complete the request.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

## getTemplateSettings

`GET /api/workspaces/{workspaceId}/template-settings`

Read the template settings of the signed in member.

Reports the template folder that the signed in account keeps in this workspace. Every note below this folder, also in a subfolder, is a template that the application can insert into a note. A member that never stored a setting reads the default folder, Templates. The settings of another member are never part of the answer.

### Authentication

Use one of these options:
- [sessionCookie](https://docs.tidynotebook.com/api-reference.md#sessioncookie)
- [personalApiKey](https://docs.tidynotebook.com/api-reference.md#personalapikey)

### Parameters

#### x-request-id

```json
{
  "name": "x-request-id",
  "in": "header",
  "required": false,
  "style": "simple",
  "explode": false,
  "description": "Optional caller supplied correlation identifier. The server echoes the value and generates a UUID when the header is absent. A value outside the pattern below is rejected with a 400 problem.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._-]+$"
  }
}
```

#### workspaceId

```json
{
  "name": "workspaceId",
  "in": "path",
  "required": true,
  "style": "simple",
  "explode": false,
  "description": "Identifier of the workspace that the operation acts on.",
  "schema": {
    "$ref": "#/components/schemas/Uuid"
  }
}
```

Schemas: [Uuid](https://docs.tidynotebook.com/api-schemas.md#uuid).

### Responses

#### 200

The stored template settings of the signed in member.

```json
{
  "description": "The stored template settings of the signed in member.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TemplateSettings"
      }
    }
  }
}
```

Schemas: [TemplateSettings](https://docs.tidynotebook.com/api-schemas.md#templatesettings).

#### 400

The request did not match the contract.

```json
{
  "description": "The request did not match the contract.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 401

The request carries no usable session.

```json
{
  "description": "The request carries no usable session.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 403

The actor may not perform this operation.

```json
{
  "description": "The actor may not perform this operation.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 404

The requested resource does not exist.

```json
{
  "description": "The requested resource does not exist.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 423

The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.

```json
{
  "description": "The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 500

The service failed to complete the request.

```json
{
  "description": "The service failed to complete the request.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

## updateTemplateSettings

`PUT /api/workspaces/{workspaceId}/template-settings`

Replace the template settings of the signed in member.

Replaces the template folder that the signed in account keeps in this workspace. A folder that is not a folder path in its stored spelling is refused as an invalid path. The settings of another member do not change, and no note moves.

### Authentication

Use one of these options:
- [sessionCookie](https://docs.tidynotebook.com/api-reference.md#sessioncookie)
- [personalApiKey](https://docs.tidynotebook.com/api-reference.md#personalapikey)

### Parameters

#### x-request-id

```json
{
  "name": "x-request-id",
  "in": "header",
  "required": false,
  "style": "simple",
  "explode": false,
  "description": "Optional caller supplied correlation identifier. The server echoes the value and generates a UUID when the header is absent. A value outside the pattern below is rejected with a 400 problem.",
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 128,
    "pattern": "^[A-Za-z0-9._-]+$"
  }
}
```

#### workspaceId

```json
{
  "name": "workspaceId",
  "in": "path",
  "required": true,
  "style": "simple",
  "explode": false,
  "description": "Identifier of the workspace that the operation acts on.",
  "schema": {
    "$ref": "#/components/schemas/Uuid"
  }
}
```

Schemas: [Uuid](https://docs.tidynotebook.com/api-schemas.md#uuid).

### Request body

```json
{
  "description": "The template settings to store for the signed in member.",
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TemplateSettingsInput"
      }
    }
  }
}
```

Schemas: [TemplateSettingsInput](https://docs.tidynotebook.com/api-schemas.md#templatesettingsinput).

### Responses

#### 200

The stored template settings of the signed in member.

```json
{
  "description": "The stored template settings of the signed in member.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/TemplateSettings"
      }
    }
  }
}
```

Schemas: [TemplateSettings](https://docs.tidynotebook.com/api-schemas.md#templatesettings).

#### 400

The request did not match the contract.

```json
{
  "description": "The request did not match the contract.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 401

The request carries no usable session.

```json
{
  "description": "The request carries no usable session.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 403

The actor may not perform this operation.

```json
{
  "description": "The actor may not perform this operation.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 404

The requested resource does not exist.

```json
{
  "description": "The requested resource does not exist.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 413

The request body is larger than the configured limit. A save of a note adds document_too_large, which means that the update or the document it would produce passes a bound of the workspace. The work stays on the device, which offers recovery rather than sending the same bytes again.

```json
{
  "description": "The request body is larger than the configured limit. A save of a note adds document_too_large, which means that the update or the document it would produce passes a bound of the workspace. The work stays on the device, which offers recovery rather than sending the same bytes again.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 415

The request media type is not supported.

```json
{
  "description": "The request media type is not supported.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 422

The request is well formed but its content cannot be accepted. The code names the reason: invalid_path, invalid_graph, invalid_content, or too_many_files. A save of a note adds document_malformed for bytes that are not an update, document_dependency_missing for work that names an insertion or a deletion the document lacks, and document_unsupported for work that writes anything other than the text of the note, and unrenderable_note for a note over a limit of the Markdown grammar, with the limit in noteRefusal. Each of them leaves the accepted state exactly as it was.

```json
{
  "description": "The request is well formed but its content cannot be accepted. The code names the reason: invalid_path, invalid_graph, invalid_content, or too_many_files. A save of a note adds document_malformed for bytes that are not an update, document_dependency_missing for work that names an insertion or a deletion the document lacks, and document_unsupported for work that writes anything other than the text of the note, and unrenderable_note for a note over a limit of the Markdown grammar, with the limit in noteRefusal. Each of them leaves the accepted state exactly as it was.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 423

The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.

```json
{
  "description": "The account is locked, and a locked account keeps only a fixed list of operations (record 0201). The code is account_locked. Nothing changed.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

#### 500

The service failed to complete the request.

```json
{
  "description": "The service failed to complete the request.",
  "content": {
    "application/problem+json": {
      "schema": {
        "$ref": "#/components/schemas/ProblemDetails"
      }
    }
  }
}
```

Schemas: [ProblemDetails](https://docs.tidynotebook.com/api-schemas.md#problemdetails).

