# Update a dashboard section

Updates an existing section by its ID. You only need to provide the fields you want to change.

[endpoint]
base_url = "https://telemetry.betterstack.com"
path = "/api/v2/dashboards/{dashboard_id}/sections/{id}"
method = "PATCH"

[[path_param]]
name = "dashboard_id"
description = "The unique identifier of the dashboard."
required = true
type = "integer"

[[path_param]]
name = "id"
description = "The unique identifier of the section to update."
required = true
type = "integer"

[[body_param]]
name = "name"
description = "A new name for the section."
required = false
type = "string"

[[body_param]]
name = "y"
description = "A new vertical position for the section."
required = false
type = "integer"

[[body_param]]
name = "collapsed"
description = "A new collapsed state for the section."
required = false
type = "boolean"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = "The section was updated successfully."
body = '''
{
  "data": {
    "id": "890",
    "type": "section",
    "attributes": {
      "name": "Updated Section Name",
      "y": 12,
      "collapsed": true
    }
  }
}
'''

[[response]]
status = 404
description = "The specified dashboard or section was not found."
[/responses]

## Example request

```shell
[label cURL]
curl --request PATCH \
  --url https://telemetry.betterstack.com/api/v2/dashboards/1234/sections/890 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Updated Section Name",
    "y": 12,
    "collapsed": true
  }'
```
