This method allows you to update a server group using the API.

**Tip**: You can explore and test this endpoint interactively using our [OpenAPI documentation](https://api.deployhq.com/docs).

## URL

```
/projects/<project>/server_groups/<identifier>
```

* Replace `<project>` with either the `permalink` or `identifier` of the project.
* Replace `<identifier>` with the identifier of the server group.

## HTTP Method

```
PUT
```

## Supported Parameters

* `branch` - The branch you wish to deploy this server group from (required)
* `name` - A description or name for the server group (required)
* `auto_deploy` - Should auto deployments be enabled, either `true` or `false` (required)
* `email_notify_on ` - When do you want to receive email notifications, either `never`, `failure` or `always` (required)
* `notification_email` - An email address to send notifications to
* `transfer_order` - The transfer order for the server group, `parallel` or `sequential` (required)

## Example cURL request

```
curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user adam@atechmedia.com:my-api-key \
-X PUT \
-d { \
    "server_group":{ \
      "name":"Created via the API (edited)", \
      "branch":"master", \
      "auto_deploy":true, \
      "email_notify_on":"failure", \
      "notification_email":"adamw@atech.media", \
      "transfer_order":"parallel" \
  } \
} \
https://atech.deployhq.com/projects/atomic-deployment-test/server_groups/983f6f1b-0d8b-4860-ad44-3cc4890a0097
```

## Example response

```json
{
  "identifier":"983f6f1b-0d8b-4860-ad44-3cc4890a0097",
  "name":"Created via the API (edited)",
  "servers":[],
  "preferred_branch":"master",
  "last_revision":null
}
```
