---
title: "Update Sector"
method: PATCH
path: "/api/sectors/{sector_uuid}"
tags: ["sectors"]
---

# Update Sector

`PATCH /api/sectors/{sector_uuid}`

## Request

- Base URL: `https://api.regdoor.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.regdoor.com/api/sectors/{sector_uuid}`
- Auth: HTTP bearer

Update an existing sector or subsector.

You can:
- Update the name
- Update the info
- Change the father sector (set a new father_sector_uuid)
- Remove the father relationship (set father_sector_uuid to null)
- Convert a subsector to a root sector (set father_sector_uuid to null)

Args:
    sector_uuid: UUID of the sector to update
    payload: SectorUpdate payload with optional fields to update

Returns:
    Updated Sector instance

## Path parameters

- `sector_uuid` string, uuid, required

## Request body

- SectorUpdate: Schema for updating a sector or subsector
  - `name` string, nullable
  - `father_sector_uuid` string, uuid4, nullable
  - `info` object, nullable
  - `contents` SectorContentAssociation[], nullable
    - `content_uuid` string, uuid4, required
    - `impact_level` 'High' | 'Medium' | 'Low', required
    - `info` object, nullable
  - `organizations` OrganizationSectorAssociation[], nullable
    - `organization_uuid` string, uuid4, required
    - `type` 'transversal' | 'primary' | 'secondary' | 'indirect', required
    - `info` object, nullable

## Response `200`

Successful Response

- Sector: Full sector schema with relationships
  - `name` string, required
  - `info` object, nullable
  - `uuid` string, uuid4, required
  - `father_sector_uuid` string, uuid4, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `deleted_at` string, date-time, nullable
  - `subsectors` SectorRef[]
    - `uuid` string, uuid4, required
    - `name` string, required
    - `father_sector_uuid` string, uuid4, nullable
  - `contents` AppViewsSchemasSectorsSchemaContentRef[], required
    - `uuid` string, uuid4, required
    - `name` string, required
  - `organizations` OrganizationRef[], required
    - `uuid` string, uuid4, required
    - `name` string, required

## Other responses

- `404`: Not found
- `422`: Validation Error

---

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