Create Trunk Group#

Description

Creates a Trunk Group.

Request#

HTTP Method: POST

URI Path: /v3/trunk_groups

URI Query Parameters:

Name

Type

Is Required?

Description

include

string

Optional

Inclusion

Request Body Object Attributes:

Name

Type

Nullable

Is Required?

Description

name

string

False

Yes

Unique name of the Trunk Group.

capacity_limit

integer

False

Optional

Maximum number of simultaneous calls for the Trunk Group.

Request Body Object Relationships:

Title

Type

Description

trunks

To many | Linkage for included trunks.

Examples#

http

 1POST /v3/trunk_groups HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Api-Key: [API token]
 6
 7{
 8  "data": {
 9    "type": "trunk_groups",
10    "attributes": {
11      "name": "Main group",
12      "capacity_limit": 100
13    }
14  }
15}

curl

1curl -i -X POST https://api.didww.com/v3/trunk_groups -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"capacity_limit": 100, "name": "Main group"}, "type": "trunk_groups"}}'

response

 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "a6370df6-86db-4a1a-9a54-3742f1d8615c",
 7    "type": "trunk_groups",
 8    "attributes": {
 9      "created_at": "2017-06-25T14:56:31.513Z",
10      "name": "Main group",
11      "capacity_limit": 100
12    },
13    "relationships": {
14      "trunks": {
15        "links": {
16          "self": "https://api.didww.com/v3/trunk_groups/a6370df6-86db-4a1a-9a54-3742f1d8615c/relationships/trunks",
17          "related": "https://api.didww.com/v3/trunk_groups/a6370df6-86db-4a1a-9a54-3742f1d8615c/trunks"
18        }
19      }
20    },
21    "meta": {
22      "trunks_count": 0
23    }
24  },
25  "meta": {
26    "api_version": "2017-09-18"
27  }
28}

Other Responses#

Code

Success

Description

422

No

Unprocessable Entity

401

No

Unauthorized