Create Inbound 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

string

No

Inclusion

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

Linkage for included trunks.

Examples

http

POST /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]

{
  "data": {
    "type": "voice_in_trunk_groups",
    "attributes": {
      "name": "Main group",
      "capacity_limit": 100
    }
  }
}

curl

curl -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

HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "a6370df6-86db-4a1a-9a54-3742f1d8615c",
    "type": "voice_in_trunk_groups",
    "links": {
      "self": "https://api.didww.com/v3/voice_in_trunk_groups/a6370df6-86db-4a1a-9a54-3742f1d8615c"
    },
    "attributes": {
      "created_at": "2017-06-25T14:56:31.513Z",
      "external_reference_id": null,
      "name": "Main group",
      "capacity_limit": 100
    },
    "relationships": {
      "voice_in_trunks": {
        "links": {
          "self": "https://api.didww.com/v3/voice_in_trunk_groups/a6370df6-86db-4a1a-9a54-3742f1d8615c/relationships/voice_in_trunks",
          "related": "https://api.didww.com/v3/voice_in_trunk_groups/a6370df6-86db-4a1a-9a54-3742f1d8615c/voice_in_trunks"
        }
      }
    },
    "meta": {
      "trunks_count": 0
    }
  }
}

Other Responses

Code

Success

Description

422

No

Unprocessable Entity

401

No

Unauthorized