# Update Inbound Trunk Group

Updates a Trunk Group.

## Request

HTTP Method: `PATCH`

URI Path: `/v3/voice_in_trunk_groups/`

### URI Query Parameters

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| id | `string` | Yes | Unique ID identifier of Trunk Group. |
| include | `string` | No | [Inclusion](../../../specification/includes.html#api-includes) |

### Request Body Object Attributes

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| name | `string` | No | Yes | Unique name of the Trunk Group. |
| external\_reference\_id | `string` | Yes | No | Optional identifier for the trunk group in the customer's external system. Maximum length is 100 characters. |
| capacity\_limit | `integer` | No | No | Maximum number of simultaneous calls for the Trunk Group. |

### Request Body Object Relationships

| Name | Type | Description |
| --- | --- | --- |
| voice\_in\_trunks | [To many](../../../specification/relationships.html#api-relationships) | Linkage for included trunks. |

## Examples

Simple UpdateRemove Inbound Trunks from the Group

[[DIDWW-API-EXAMPLE-START]]

http

```
PATCH /v3/voice_in_trunk_groups/43deb3aa-674a-465e-ac16-fb3084325ec7 HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "id": "43deb3aa-674a-465e-ac16-fb3084325ec7",
    "type": "voice_in_trunk_groups",
    "attributes": {
      "name": "Renamed group",
      "capacity_limit": 1
    }
  }
}
```

curl

```
curl -i -X PATCH https://api.didww.com/v3/voice_in_trunk_groups/43deb3aa-674a-465e-ac16-fb3084325ec7 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"capacity_limit": 1, "name": "Renamed group"}, "id": "43deb3aa-674a-465e-ac16-fb3084325ec7", "type": "voice_in_trunk_groups"}}'
```

response

```
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "43deb3aa-674a-465e-ac16-fb3084325ec7",
    "type": "voice_in_trunk_groups",
    "links": {
      "self": "https://api.didww.com/v3/voice_in_trunk_groups/43deb3aa-674a-465e-ac16-fb3084325ec7"
    },
    "attributes": {
      "created_at": "2017-06-25T14:56:31.513Z",
      "external_reference_id": null,
      "name": "Renamed group",
      "capacity_limit": 1
    },
    "relationships": {
      "voice_in_trunks": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunk_groups/43deb3aa-674a-465e-ac16-fb3084325ec7/relationships/voice_in_trunks",
          "related": "https://api.didww.com/v3/voice_in_trunk_groups/43deb3aa-674a-465e-ac16-fb3084325ec7/voice_in_trunks"
        }
      }
    },
    "meta": {
      "trunks_count": 1
    }
  }
}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
PATCH /v3/voice_in_trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "id": "e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a",
    "type": "voice_in_trunk_groups",
    "relationships": {
      "voice_in_trunks": {
        "data": [

        ]
      }
    }
  }
}
```

curl

```
curl -i -X PATCH https://api.didww.com/v3/voice_in_trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"id": "e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a", "relationships": {"voice_in_trunks": {"data": []}}, "type": "voice_in_trunk_groups"}}'
```

response

```
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a",
    "type": "voice_in_trunk_groups",
    "links": {
      "self": "https://api.didww.com/v3/voice_in_trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a"
    },
    "attributes": {
      "created_at": "2017-06-25T14:56:31.513Z",
      "external_reference_id": null,
      "name": "Common Group",
      "capacity_limit": 69
    },
    "relationships": {
      "voice_in_trunks": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a/relationships/voice_in_trunks",
          "related": "https://api.didww.com/v3/voice_in_trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a/voice_in_trunks"
        }
      }
    },
    "meta": {
      "trunks_count": 0
    }
  }
}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 422 | No | [Unprocessable Entity](../../../specification/errors/index.html#api-validation-error-object) |
| 401 | No | [Unauthorized](../../../configuration.html#api-key) |

On this page
