# Get Inbound Trunk Groups

Returns a collection of Trunk Groups.

## Request

HTTP Method: `GET`

URI Path: `/v3/voice_in_trunk_groups`

Note

For all returned data attributes, see [Trunk Group Object](trunk-group-object.html).

### URI Query Parameters

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| include | `string` | No | [Inclusion](../../../specification/includes.html#api-includes) |
| filter[<filter\_name>] | `string` | No | [Filtering](../../../specification/filtering.html#api-filters) |
| fields[voice\_in\_trunk\_groups] | `string` | No | [Sparse fieldsets](../../../specification/sparse-fieldsets.html#api-sparse-fieldsets) |
| sort | `string` | No | [Sorting](../../../specification/sorting.html#api-sorting) |

### Includes

| Value | Description |
| --- | --- |
| voice\_in\_trunks | [Trunk Object](../voice-in-trunks/voice-in-trunk-object.html#voice-in-trunk-object-v34) |

### Filters

| Filter Name | Type | Allow Blank | Allow Array | Filters by: |
| --- | --- | --- | --- | --- |
| external\_reference\_id | `string` | No | No | The `external_reference_id` field. |

### Sorting

| Value | Sorts by: |
| --- | --- |
| name | The `name` field. |
| created\_at | The `created_at` field. |
| capacity\_limit | The `capacity_limit` field. |

## Examples

Simple RequestIncluded Trunks

[[DIDWW-API-EXAMPLE-START]]

http

```
GET /v3/voice_in_trunk_groups HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
```

curl

```
curl -i -X GET https://api.didww.com/v3/voice_in_trunk_groups -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"
```

response

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

{
  "data": [
    {
      "id": "65b401cb-42f5-4911-877d-dc317a46b478",
      "type": "voice_in_trunk_groups",
      "links": {
        "self": "https://api.didww.com/v3/voice_in_trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478"
      },
      "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/65b401cb-42f5-4911-877d-dc317a46b478/relationships/voice_in_trunks",
            "related": "https://api.didww.com/v3/voice_in_trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478/voice_in_trunks"
          }
        }
      },
      "meta": {
        "trunks_count": 1
      }
    },
    {
      "id": "72a60b4a-affb-46c7-8a8a-7e042c7611e8",
      "type": "voice_in_trunk_groups",
      "links": {
        "self": "https://api.didww.com/v3/voice_in_trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8"
      },
      "attributes": {
        "created_at": "2017-06-25T14:56:31.513Z",
        "external_reference_id": null,
        "name": "Custom Group",
        "capacity_limit": 50
      },
      "relationships": {
        "voice_in_trunks": {
          "links": {
            "self": "https://api.didww.com/v3/voice_in_trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8/relationships/voice_in_trunks",
            "related": "https://api.didww.com/v3/voice_in_trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8/voice_in_trunks"
          }
        }
      },
      "meta": {
        "trunks_count": 0
      }
    }
  ],
  "meta": {
    "total_records": 2
  },
  "links": {
    "first": "https://api.didww.com/v3/voice_in_trunk_groups?page%5Bnumber%5D=1&page%5Bsize%5D=50",
    "last": "https://api.didww.com/v3/voice_in_trunk_groups?page%5Bnumber%5D=1&page%5Bsize%5D=50"
  }
}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
GET /v3/voice_in_trunk_groups?include=voice_in_trunks HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
```

curl

```
curl -i -X GET 'https://api.didww.com/v3/voice_in_trunk_groups?include=voice_in_trunks' -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"
```

response

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

{
  "data": [
    {
      "id": "a8176983-61c4-4768-b699-10d5f3245d90",
      "type": "voice_in_trunk_groups",
      "links": {
        "self": "https://api.didww.com/v3/voice_in_trunk_groups/a8176983-61c4-4768-b699-10d5f3245d90"
      },
      "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/a8176983-61c4-4768-b699-10d5f3245d90/relationships/voice_in_trunks",
            "related": "https://api.didww.com/v3/voice_in_trunk_groups/a8176983-61c4-4768-b699-10d5f3245d90/voice_in_trunks"
          },
          "data": [
            {
              "type": "voice_in_trunks",
              "id": "5aa0b0ea-2bda-4424-a93c-104829d72c06"
            }
          ]
        }
      },
      "meta": {
        "trunks_count": 1
      }
    },
    {
      "id": "def3b7b1-ce76-420d-9684-8dbdb69e17c1",
      "type": "voice_in_trunk_groups",
      "links": {
        "self": "https://api.didww.com/v3/voice_in_trunk_groups/def3b7b1-ce76-420d-9684-8dbdb69e17c1"
      },
      "attributes": {
        "created_at": "2017-06-25T14:56:31.513Z",
        "external_reference_id": null,
        "name": "Custom Group",
        "capacity_limit": 50
      },
      "relationships": {
        "voice_in_trunks": {
          "links": {
            "self": "https://api.didww.com/v3/voice_in_trunk_groups/def3b7b1-ce76-420d-9684-8dbdb69e17c1/relationships/voice_in_trunks",
            "related": "https://api.didww.com/v3/voice_in_trunk_groups/def3b7b1-ce76-420d-9684-8dbdb69e17c1/voice_in_trunks"
          },
          "data": [

          ]
        }
      },
      "meta": {
        "trunks_count": 0
      }
    }
  ],
  "included": [
    {
      "id": "5aa0b0ea-2bda-4424-a93c-104829d72c06",
      "type": "voice_in_trunks",
      "attributes": {
        "priority": 1,
        "capacity_limit": 5,
        "weight": 65535,
        "name": "Office Mobile",
        "cli_format": "e164",
        "cli_prefix": null,
        "description": null,
        "ringing_timeout": null,
        "configuration": {
          "type": "pstn_configurations",
          "attributes": {
            "dst": "1xxxxxxxxx"
          }
        }
      },
      "relationships": {
        "voice_in_trunk_group": {
          "links": {
            "self": "https://api.didww.com/v3/voice_in_trunks/5aa0b0ea-2bda-4424-a93c-104829d72c06/relationships/voice_in_trunk_group",
            "related": "https://api.didww.com/v3/voice_in_trunks/5aa0b0ea-2bda-4424-a93c-104829d72c06/voice_in_trunk_group"
          }
        }
      }
    }
  ],
  "meta": {
    "total_records": 2
  },
  "links": {
    "first": "https://api.didww.com/v3/voice_in_trunk_groups?include=voice_in_trunks&page%5Bnumber%5D=1&page%5Bsize%5D=50",
    "last": "https://api.didww.com/v3/voice_in_trunk_groups?include=voice_in_trunks&page%5Bnumber%5D=1&page%5Bsize%5D=50"
  }
}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 401 | No | [Unauthorized](../../../configuration.html#api-key) |

On this page
