This method allows you to update a server group within a template using the API.

## URL

```
/templates/<permalink>/server_groups/<identifier>
```

* Replace `<permalink>` with the permalink of the template.
* Replace `<identifier>` with the identifier of the server group.

## HTTP Method

```
PUT
```

## Supported Parameters

* `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

```bash
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", \
      "auto_deploy":true, \
      "email_notify_on":"failure", \
      "notification_email":"adamw@atech.media", \
      "transfer_order":"parallel" \
  } \
} \
https://atech.deployhq.com/templates/api-created/server_groups/4e62a8fd-8708-466b-b79f-59365c31e0d1
```

## Example response

```json
{
  "identifier":"4e62a8fd-8708-466b-b79f-59365c31e0d1",
  "name":"Created via the API",
  "servers":[],
  "preferred_branch":null,
  "last_revision":null
}
```