Create Voice IN Trunk Group#
Creates a Trunk Group.
Request#
HTTP Method: POST
URI Path: /v3/voice_in_trunk_groups
URI Query Parameters#
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
include |
|
No |
Request Body Object Attributes#
Name |
Type |
Nullable |
Is Required? |
Description |
|---|---|---|---|---|
name |
|
No |
Yes |
Unique name of the Trunk Group. |
capacity_limit |
|
No |
No |
Maximum number of simultaneous calls for the Trunk Group. |
Request Body Object Relationships#
Name |
Type |
Description |
|---|---|---|
voice_in_trunks |
Linkage for included trunks. |
Examples#
http
1POST /v3/voice_in_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": "voice_in_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/voice_in_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": "voice_in_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": "voice_in_trunk_groups",
8 "links": {
9 "self": "https://api.didww.com/v3/voice_in_trunk_groups/a6370df6-86db-4a1a-9a54-3742f1d8615c"
10 },
11 "attributes": {
12 "created_at": "2017-06-25T14:56:31.513Z",
13 "name": "Main group",
14 "capacity_limit": 100
15 },
16 "relationships": {
17 "voice_in_trunks": {
18 "links": {
19 "self": "https://api.didww.com/v3/voice_in_trunk_groups/a6370df6-86db-4a1a-9a54-3742f1d8615c/relationships/voice_in_trunks",
20 "related": "https://api.didww.com/v3/voice_in_trunk_groups/a6370df6-86db-4a1a-9a54-3742f1d8615c/voice_in_trunks"
21 }
22 }
23 },
24 "meta": {
25 "trunks_count": 0
26 }
27 }
28}
http
1POST /v3/voice_in_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": "voice_in_trunk_groups",
10 "attributes": {
11 "name": "Main group",
12 "capacity_limit": 100
13 },
14 "relationships": {
15 "voice_in_trunks": {
16 "data": [
17 {
18 "type": "voice_in_trunks",
19 "id": "b7a9d1ce-6a89-4071-bc0d-486ee223787d"
20 },
21 {
22 "type": "voice_in_trunks",
23 "id": "7ca415f8-8342-427a-bbfc-171b995f75d6"
24 },
25 {
26 "type": "voice_in_trunks",
27 "id": "46aa9cac-a8dd-4a06-82db-cb0731e53ba0"
28 }
29 ]
30 }
31 }
32 }
33}
curl
1curl -i -X POST 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" --data-raw '{"data": {"attributes": {"capacity_limit": 100, "name": "Main group"}, "relationships": {"voice_in_trunks": {"data": [{"type": "voice_in_trunks", "id": "b7a9d1ce-6a89-4071-bc0d-486ee223787d"}, {"type": "voice_in_trunks", "id": "7ca415f8-8342-427a-bbfc-171b995f75d6"}, {"type": "voice_in_trunks", "id": "46aa9cac-a8dd-4a06-82db-cb0731e53ba0"}]}}, "type": "voice_in_trunk_groups"}}'
response
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "faea735d-ba77-40ef-bf13-f4dfc0f43a68",
7 "type": "voice_in_trunk_groups",
8 "links": {
9 "self": "https://api.didww.com/v3/voice_in_trunk_groups/faea735d-ba77-40ef-bf13-f4dfc0f43a68"
10 },
11 "attributes": {
12 "created_at": "2017-06-25T14:56:31.513Z",
13 "name": "Main group",
14 "capacity_limit": 100
15 },
16 "relationships": {
17 "voice_in_trunks": {
18 "links": {
19 "self": "https://api.didww.com/v3/voice_in_trunk_groups/faea735d-ba77-40ef-bf13-f4dfc0f43a68/relationships/voice_in_trunks",
20 "related": "https://api.didww.com/v3/voice_in_trunk_groups/faea735d-ba77-40ef-bf13-f4dfc0f43a68/voice_in_trunks"
21 }
22 }
23 },
24 "meta": {
25 "trunks_count": 3
26 }
27 }
28}
http
1POST /v3/voice_in_trunk_groups?include=voice_in_trunks 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": "voice_in_trunk_groups",
10 "attributes": {
11 "name": "Main group",
12 "capacity_limit": 100
13 },
14 "relationships": {
15 "voice_in_trunks": {
16 "data": [
17 {
18 "type": "voice_in_trunks",
19 "id": "1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7"
20 },
21 {
22 "type": "voice_in_trunks",
23 "id": "c606cd05-a19f-4d3c-9362-3857a79a6e1d"
24 }
25 ]
26 }
27 }
28 }
29}
curl
1curl -i -X POST '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" --data-raw '{"data": {"attributes": {"capacity_limit": 100, "name": "Main group"}, "relationships": {"voice_in_trunks": {"data": [{"type": "voice_in_trunks", "id": "1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7"}, {"type": "voice_in_trunks", "id": "c606cd05-a19f-4d3c-9362-3857a79a6e1d"}]}}, "type": "voice_in_trunk_groups"}}'
response
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "3b49216d-ccb0-4376-b9fa-a43ffcb48c35",
7 "type": "voice_in_trunk_groups",
8 "links": {
9 "self": "https://api.didww.com/v3/voice_in_trunk_groups/3b49216d-ccb0-4376-b9fa-a43ffcb48c35"
10 },
11 "attributes": {
12 "created_at": "2017-08-16T14:04:36.013Z",
13 "name": "Main group",
14 "capacity_limit": 100
15 },
16 "relationships": {
17 "voice_in_trunks": {
18 "links": {
19 "self": "https://api.didww.com/v3/voice_in_trunk_groups/3b49216d-ccb0-4376-b9fa-a43ffcb48c35/relationships/voice_in_trunks",
20 "related": "https://api.didww.com/v3/voice_in_trunk_groups/3b49216d-ccb0-4376-b9fa-a43ffcb48c35/voice_in_trunks"
21 },
22 "data": [
23 {
24 "type": "voice_in_trunks",
25 "id": "1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7"
26 },
27 {
28 "type": "voice_in_trunks",
29 "id": "c606cd05-a19f-4d3c-9362-3857a79a6e1d"
30 }
31 ]
32 }
33 },
34 "meta": {
35 "trunks_count": 2
36 }
37 },
38 "included": [
39 {
40 "data": {
41 "id": "1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7",
42 "type": "voice_in_trunks",
43 "attributes": {
44 "priority": 1,
45 "capacity_limit": 2,
46 "weight": 65535,
47 "name": "Office PSTN",
48 "cli_format": "e164",
49 "cli_prefix": null,
50 "description": null,
51 "ringing_timeout": null,
52 "configuration": {
53 "type": "pstn_configurations",
54 "attributes": {
55 "dst": "18337249999"
56 ]
57 }
58 }
59 },
60 "relationships": {
61 "voice_in_trunk_group": {
62 "links": {
63 "self": "https://api.didww.com/v3/voice_in_trunks/1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7/relationships/voice_in_trunk_group",
64 "related": "https://api.didww.com/v3/voice_in_trunks/1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7/voice_in_trunk_group"
65 }
66 }
67 }
68 }
69 },
70 {
71 "data": {
72 "id": "c606cd05-a19f-4d3c-9362-3857a79a6e1d",
73 "type": "voice_in_trunks",
74 "attributes": {
75 "priority": 1,
76 "capacity_limit": 18,
77 "weight": 65535,
78 "name": "Office sip",
79 "cli_format": "e164",
80 "cli_prefix": "+1",
81 "description": null,
82 "ringing_timeout": null,
83 "configuration": {
84 "type": "sip_configurations",
85 "attributes": {
86 "dst": "1xxxxxxxxx",
87 "host": "example.com",
88 "port": null,
89 "codec_ids": [
90 9,
91 6
92 ]
93 }
94 }
95 },
96 "relationships": {
97 "voice_in_trunk_group": {
98 "links": {
99 "self": "https://api.didww.com/v3/voice_in_trunks/c606cd05-a19f-4d3c-9362-3857a79a6e1d/relationships/voice_in_trunk_group",
100 "related": "https://api.didww.com/v3/voice_in_trunks/c606cd05-a19f-4d3c-9362-3857a79a6e1d/voice_in_trunk_group"
101 }
102 }
103 }
104 }
105 }
106 ]
107}
Other Responses#
Code |
Success |
Description |
|---|---|---|
422 |
No |
|
401 |
No |