---
title: "Rename, reorder or collapse a section"
method: PATCH
path: "/sections/{id}"
tags: ["Sections"]
---

# Rename, reorder or collapse a section

`PATCH /sections/{id}`

## Request

- Base URL: `https://tasg.app/api/v1`
- URL: `https://tasg.app/api/v1/sections/{id}`
- Auth: HTTP bearer

Renaming a section does not retro-actively change the status of tasks already in it.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `name` string
  - `position` number: Sort key; defaults to (max + 1).
  - `collapsed` boolean

## Response `200`

Updated.

- object
  - `section` Section, required
    - `id` string, uuid, required
    - `project_id` string, uuid, required
    - `name` string, required
    - `position` number, required
    - `collapsed` boolean, required
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400`: Validation failed: the body or query did not match the schema, or a business rule was violated. `error` says which.
- `401`: Missing, invalid, expired or revoked credentials.
- `403`: Authenticated, but not allowed: not a member, insufficient project role or the API token lacks the required scope.
- `404`: Not found, or not visible to the caller (tenancy is enforced: foreign resources look identical to missing ones).
- `429`: Rate limited. Back off and retry after the window in the `RateLimit-*` headers.

---

[API](https://skmtc.dev/tasg/apis/tasg-api.md) · [All operations](https://skmtc.dev/tasg/apis/tasg-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tasg/apis/tasg-api/revisions/cd2a1dbaf5cf?raw)
