# Update a group

Updates an existing application group. Send only the parameters you wish to change.

[endpoint]
base_url = "https://errors.betterstack.com"
path = "/api/v1/application-groups/{id}"
method = "PATCH"

[[path_param]]
name = "id"
description = "The ID of the application group to update."
required = true
type = "string"

[[body_param]]
name = "name"
description = "New application group name. Must be unique within your team."
required = false
type = "string"

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

[[header]]
name = "Content-Type"
description = "application/json"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''Returns the updated application group.'''
body = '''{
  "data": {
    "id": "5678",
    "type": "application_group",
    "attributes": {
      "name": "updated-production-apps",
      "created_at": "2025-01-15T10:25:00.000Z",
      "updated_at": "2025-01-15T10:30:00.000Z",
      "sort_index": null,
      "team_name": "example-team"
    }
  }
}'''

[[response]]
status = 401
description = '''Unauthorized'''
body = '''{
  "errors": "Invalid authentication"
}'''

[[response]]
status = 404
description = '''Not Found'''
body = '''{
  "errors": "Resource with the provided ID was not found"
}'''

[[response]]
status = 422
description = '''Unprocessable Entity - Validation Errors'''
body = '''{
  "errors": "Validation errors",
  "invalid_attributes": {
    "name": ["already taken"]
  }
}'''
[/responses]

#### Example cURL

```shell
[label Example]
curl --request PATCH \
  --url https://errors.betterstack.com/api/v1/application-groups/5678 \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "updated-production-apps"
  }'
```

