# Replace a lesson type

> Every field again; a field left out takes its default. Needs a `catalog:write` token.

```json
{
  "/api/v1/lesson-types/{id}": {
    "put": {
      "operationId": "replaceLessonType",
      "tags": [
        "Lesson types"
      ],
      "summary": "Replace a lesson type",
      "description": "Every field again; a field left out takes its default. Needs a `catalog:write` token.",
      "security": [
        {
          "bearerAuth": []
        }
      ],
      "requestBody": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LessonTypeReplace"
            }
          }
        }
      },
      "responses": {
        "200": {
          "description": "Replaced.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LessonType"
              }
            }
          }
        },
        "400": {
          "description": "The body does not match the schema or fails validation.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        },
        "401": {
          "description": "Missing, unknown, revoked or expired token.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        },
        "403": {
          "description": "The token's scope does not allow this request.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        },
        "404": {
          "description": "The school has no such lesson type.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        },
        "409": {
          "description": "A trial lesson type already exists.",
          "content": {
            "application/problem+json": {
              "schema": {
                "$ref": "#/components/schemas/Problem"
              }
            }
          }
        }
      }
    }
  }
}
```
