Create SMS Trunk Group#

Creates an SMS trunk group. The member trunks are tried in the order defined by their priority.

Request#

HTTP Method: POST

URI Path: /v3/sms_trunk_groups

Request Body Object Attributes#

Name

Type

Nullable

Is Required?

Description

name

string

No

Yes

Friendly name of the SMS trunk group. Must be unique among the SMS trunks and SMS trunk groups of the account.

external_reference_id

string

Yes

No

Optional identifier for the SMS trunk group in the customer’s external system. Maximum length is 100 characters.

Request Body Object Relationships#

Name

Type

Description

sms_trunks

To many

The SMS trunks that form the group. Only sms_to_email, http_in, smpp_esme, and smpp_smsc trunks of the account are accepted. The list must not contain duplicates.

Examples#

http

 1POST /v3/sms_trunk_groups HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "type": "sms_trunk_groups",
10    "attributes": {
11      "name": "Inbound SMS"
12    },
13    "relationships": {
14      "sms_trunks": {
15        "data": [
16          {
17            "type": "sms_trunks",
18            "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24"
19          },
20          {
21            "type": "sms_trunks",
22            "id": "0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90"
23          }
24        ]
25      }
26    }
27  }
28}

curl

1curl -i -X POST https://api.didww.com/v3/sms_trunk_groups -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"name": "Inbound SMS"}, "relationships": {"sms_trunks": {"data": [{"type": "sms_trunks", "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24"}, {"type": "sms_trunks", "id": "0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90"}]}}, "type": "sms_trunk_groups"}}'

response

 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46",
 7    "type": "sms_trunk_groups",
 8    "attributes": {
 9      "name": "Inbound SMS",
10      "external_reference_id": null,
11      "created_at": "2026-10-22T09:15:42.118Z",
12      "updated_at": "2026-10-22T09:15:42.118Z"
13    },
14    "relationships": {
15      "sms_trunks": {
16        "links": {
17          "self": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/relationships/sms_trunks",
18          "related": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/sms_trunks"
19        }
20      },
21      "incoming_dids": {
22        "links": {
23          "self": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/relationships/incoming_dids",
24          "related": "https://api.didww.com/v3/sms_trunk_groups/c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46/incoming_dids"
25        }
26      }
27    },
28    "meta": {
29      "sms_trunks_count": 2
30    }
31  },
32  "meta": {
33    "api_version": "2026-11-19"
34  }
35}

Other Responses#

Code

Success

Description

422

No

Validation Error Object

400

No

Bad Request. Also returned with the title Quota limit reached when the account has reached its limit of SMS trunks and SMS trunk groups.

401

No

Unauthorized

403

No

The access token carries the read scope, which does not cover this method (title Insufficient scope). The response carries WWW-Authenticate: Bearer error="insufficient_scope". See Scopes.

429

No

The request budget of the account for the current window is spent (too_many_requests). Retry-After gives the number of seconds to wait.