---
updatedAt: 2025-06-12T21:53:25.000Z
agentTools:
  projectIndex: https://readme.gooru.org/llms.txt
---

# Move existing Unit and its children to existing Course

This API will move existing Unit and its children to existing Course. The URI contains the target course where we are moving the unit. The body specifies the source of unit and unit itself.

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Error Code
      </th>

      <th style={{ textAlign: "left" }}>
        Error Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        400 - Bad Request
      </td>

      <td style={{ textAlign: "left" }}>
        Missing required filed(s)
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        401 - Unauthorized
      </td>

      <td style={{ textAlign: "left" }}>
        Missing "**Authorization**" in header.\
        Invalid "**Authorization**"
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        403 - Forbidden
      </td>

      <td style={{ textAlign: "left" }}>
        Login required.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        404 - Not Found
      </td>

      <td style={{ textAlign: "left" }}>
        Missing **course-id** in path params.\
        Invalid **course-id** 
      </td>
    </tr>
  </tbody>
</Table>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "2"
  },
  "servers": [
    {
      "url": "http://gooru.org/api/nucleus/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/courses/{courseId}/units": {
      "put": {
        "summary": "Move existing Unit and its children to existing Course",
        "description": "This API will move existing Unit and its children to existing Course. The URI contains the target course where we are moving the unit. The body specifies the source of unit and unit itself.",
        "operationId": "move-existing-unit-and-its-children-to-existing-course",
        "parameters": [
          {
            "name": "courseId",
            "in": "path",
            "description": "UUID",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Token {authorization access token}",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Set the Request content-type.",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {},
              "examples": {
                "Request Example": {
                  "value": {
                    "course_id": "3194b786-1717-4e64-84c8-6f838dd2a687",
                    "unit_id": "cb7bff5d-b90c-40a3-926d-aac442d225ac"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```