Create Trunk Group
POST https://{{host}}/v3/trunk_groups
Creates a Trunk Group.
Request Body Scheme
{
data (object, required)
{
type (string, required): trunk_groups
attributes (object, optional)
{
name (string, NOT nullable, required)
Unique name of the Trunk Group.capacity_limit (integer, NOT nullable, optional)
Maximum number of simultaneous calls for the Trunk Group.
}
relationships (object, optional)
{
trunks (object, optional): to-many
Linkage for included list of Trunk Objects
}
}
}
Request Body Example
Simple Create
{
"data": {
"type": "trunk_groups",
"attributes": {
"name": "Main group",
"capacity_limit": 100
}
}
}
Create and Assign Trunks
{
"data": {
"type": "trunk_groups",
"attributes": {
"name": "Main group",
"capacity_limit": 100
},
"relationships": {
"trunks": {
"data": [
{
"type": "trunks",
"id": "b7a9d1ce-6a89-4071-bc0d-486ee223787d"
},
{
"type": "trunks",
"id": "7ca415f8-8342-427a-bbfc-171b995f75d6"
},
{
"type": "trunks",
"id": "46aa9cac-a8dd-4a06-82db-cb0731e53ba0"
}
]
}
}
}
}
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
include | null | Comma-separated values of include parameter. | |
The response will include a top-level object relationships with associated data under the appropriate resource key. | |||
Details in Inclusion of Related Resources Article. | |||
Allowed values: | |||
trunks - List of Trunk Objects | |||
*** |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string | ||
Content-Type | string | ||
Api-Key | string |
RESPONSES
status: Created
{"data":{"id":"3b49216d-ccb0-4376-b9fa-a43ffcb48c35","type":"trunk_groups","attributes":{"created_at":"2017-08-16T14:04:36.013Z","name":"Main group","capacity_limit":100},"relationships":{"trunks":{"links":{"self":"https://api.didww.com/v3/trunk_groups/3b49216d-ccb0-4376-b9fa-a43ffcb48c35/relationships/trunks","related":"https://api.didww.com/v3/trunk_groups/3b49216d-ccb0-4376-b9fa-a43ffcb48c35/trunks"},"data":[{"type":"trunks","id":"1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7"},{"type":"trunks","id":"c606cd05-a19f-4d3c-9362-3857a79a6e1d"}]}},"meta":{"trunks_count":2}},"included":[{"data":{"id":"1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7","type":"trunks","attributes":{"priority":1,"capacity_limit":9,"weight":65535,"name":"Office IAX2","cli_format":"e164","cli_prefix":"+1","description":null,"ringing_timeout":null,"configuration":{"type":"iax2_configurations","attributes":{"dst":"1xxxxxxxxx","host":"example.com","port":null,"auth_user":"username","auth_password":"password","codec_ids":[9,6]}}},"relationships":{"trunk_group":{"links":{"self":"https://api.didww.com/v3/trunks/1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7/relationships/trunk_group","related":"https://api.didww.com/v3/trunks/1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7/trunk_group"}}}}},{"data":{"id":"c606cd05-a19f-4d3c-9362-3857a79a6e1d","type":"trunks","attributes":{"priority":1,"capacity_limit":18,"weight":65535,"name":"Office H323","cli_format":"e164","cli_prefix":"+1","description":null,"ringing_timeout":null,"configuration":{"type":"h323_configurations","attributes":{"dst":"1xxxxxxxxx","host":"example.com","port":null,"codec_ids":[9,6]}}},"relationships":{"trunk_group":{"links":{"self":"https://api.didww.com/v3/trunks/c606cd05-a19f-4d3c-9362-3857a79a6e1d/relationships/trunk_group","related":"https://api.didww.com/v3/trunks/c606cd05-a19f-4d3c-9362-3857a79a6e1d/trunk_group"}}}}}],"meta":{"api_version":"2021-04-19"}}