# Create Lesson Resource **POST /lessons/{lessonId}/resources** Adds a new resource (file, link, or media) to a lesson. ## Servers - Local development server: http://localhost:8080/api (Local development server) - Production server: https://api.huy-devops.site/api (Production server) ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **lessonId** (string) The lesson ID ### Body: application/json (object) - **lessonId** (string) ID of the lesson - **name** (string) Name of the resource - **type** (string) Type of resource - **url** (string(uri) | null) URL of the resource - **filePath** (string | null) File path of the resource - **description** (string | null) Description of the resource - **isRequired** (boolean | null) Whether the resource is required - **isPrepared** (boolean | null) Whether the resource has been prepared ## Responses ### 201 Lesson resource created successfully #### Body: application/json (object) - **success** (boolean) - **code** (integer(int32)) - **message** (string) - **data** (object) Lesson resource representing teaching materials and resources ### 400 Bad Request - Invalid input data or malformed request #### Body: application/json (object) - **success** (boolean) - **code** (integer) - **errorCode** (string) - **message** (string) - **timestamp** (string(date-time)) ### 401 Unauthorized - Invalid or missing authentication token #### Body: application/json (object) - **success** (boolean) - **code** (integer) - **errorCode** (string) - **message** (string) - **timestamp** (string(date-time)) ### 404 Lesson not found #### Body: application/json (object) - **success** (boolean) - **code** (integer) - **errorCode** (string) - **message** (string) - **timestamp** (string(date-time)) ### 500 Internal Server Error #### Body: application/json (object) - **success** (boolean) - **code** (integer) - **errorCode** (string) - **message** (string) - **timestamp** (string(date-time)) [Powered by Bump.sh](https://bump.sh)