# Update Class Section

## Update a class section endpoint

<mark style="color:green;">`POST`</mark> `/v1/section/update`

This endpoint updates exisiting class section within a specified school. It requires authentication via a valid access token and a JSON payload with the necessary details for the new section.

**Headers**

| Name          | Value                   |
| ------------- | ----------------------- |
| Content-Type  | `application/json`      |
| Authorization | `Bearer <access_token>` |

**Body**

<table><thead><tr><th width="177">Name</th><th width="141">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>number</td><td>ID of the section you want to update</td></tr><tr><td><code>title</code></td><td>string</td><td>Name of the user</td></tr><tr><td><code>school_slug</code></td><td>string</td><td>Slug of the school</td></tr><tr><td><code>grade_id</code></td><td>number</td><td>ID of the grade</td></tr><tr><td><code>max_students</code></td><td>number</td><td>Max students of the section</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="201" %}

```json
```

{% endtab %}

{% tab title="400" %}

```json
{
  message: string
  error: string
  statusCode: number
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dugsi-docs.tiigsi.io/class-section-endpoints/update-class-section.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
