# Update component

Partially update a component's name or description.

Source: https://statusdashboard.com/docs/api/status-dashboards/components/update

`PATCH /app/components/{id}`

Partially updates an existing component. All request body fields are optional — only the fields you provide are changed.

Requires the **admin** role.

***

## Path parameters
| Parameter | Type   | Description                      |
| --------- | ------ | -------------------------------- |
| `id`      | string | UUID of the component to update. |

***

## Request
See [API Basics](/docs/api) for required headers.

### Request body
At least one field must be provided. An empty body returns `400`.

| Field         | Type   | Required | Description                                                                                         |
| ------------- | ------ | -------- | --------------------------------------------------------------------------------------------------- |
| `name`        | string | No       | New display name. Maximum 50 characters. Must be unique within the organization (case-insensitive). |
| `description` | string | No       | New description. Maximum 150 characters. Pass an empty string to clear it.                          |

***

## Sample request
```bash
curl -X PATCH https://api.statusdashboard.com/app/components/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer bcf847abf5c6:def456" \
  -H "Content-Type: application/json" \
  -d '{"name": "REST API", "description": "Public REST API and webhooks"}'
```

## Sample response
**Status: `200 OK`**

```json
{
  "component": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "REST API",
    "description": "Public REST API and webhooks",
    "currentStatus": "Operational",
    "currentStatusSnapshot": {
      "label": "Operational",
      "color": "#10b981",
      "icon": "check-circle"
    },
    "statusUpdatedAt": "2026-04-01T08:00:00.000Z",
    "createdAt": "2026-01-10T12:00:00.000Z"
  }
}
```

***

## Error responses
| Status | When                                                                                                                           |
| ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `400`  | Validation failure — empty body, malformed JSON, a field exceeds its maximum length, or the request body is not a JSON object. |
| `403`  | Insufficient permissions.                                                                                                      |
| `404`  | No component with that ID exists in the organization.                                                                          |
| `409`  | Another component with the same name already exists in the organization.                                                       |
