> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orkeia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Atualizar Setor

> Atualiza os dados de um setor específico.

## Endpoint

`PUT https://gateway.orkeia.ai/sectors/{id}`

**Autenticação**\
Requer cabeçalho `authorization:  <seu_token>`.

## Parâmetros de Caminho

| Nome | Tipo   | Obrigatório | Descrição                     | Exemplo       |
| ---- | ------ | ----------- | ----------------------------- | ------------- |
| id   | string | Sim         | Identificador único do setor. | SECTOR\_12345 |

## Corpo da Requisição (JSON)

> O serviço recebe um **wrapper** com a propriedade `sector`. (O `environment` é tratado no servidor.)

```json theme={null}
{
  "sector": {
    "name": "Setor Atualizado",
    "description": "Nova descrição"
  }
}
```

## Exemplo (cURL)

```bash theme={null}
curl -X PUT "https://gateway.orkeia.ai/sectors/SECTOR_12345" \
  -H "authorization:  <seu_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "sector": {
      "name": "Setor Atualizado",
      "description": "Nova descrição"
    }
  }'
```

## Respostas

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": {
    "id": "SECTOR_12345",
    "name": "Setor Atualizado",
    "description": "Nova descrição"
  }
}
```

### 500 — Server Error

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Client Error

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```
