# Update a source group

Updates an existing source group. Send only the parameters you wish to change (e.g. `name`&nbsp;)

[endpoint]
base_url = "https://telemetry.betterstack.com"
path = "/api/v1/source-groups/{source_group_id}"
method = "PATCH"

[[path_param]]
name = "id"
description = "ID of the source group you want to update"
required = true
type = "string"

[[body_param]]
name = "name"
description = "The name of the group that you can see in the dashboard."
required = false
type = "string"

[[body_param]]
name = "sort_index"
description = "Set sort_index to specify how to sort your source groups."
required = false
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''The source group was updated'''
body = '''
{
  "data": {
    "id": "95251342",
    "type": "source_group",
    "attributes": {
      "name": "Backend sources",
      "sort_index": null,
      "created_at": "2025-06-30T17:43:12.192Z",
      "updated_at": "2020-06-30T17:43:12.192Z",
      "team_name": "Test team"
    }
  }
}
'''

[[response]]
status = 404
description = '''Your team has no source group with the given ID'''
body = '''{
    "errors": "Resource with provided ID was not found"
}'''
[/responses]

#### Example cURL 

```shell
[label Example]
curl --request PUT \
  --url https://telemetry.betterstack.com/api/v1/source-groups/123 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "My renamed source group"
  }'
```
