Get SMS Trunks#

Returns the collection of SMS trunks configured for the account.

Request#

HTTP Method: GET

URI Path: /v3/sms_trunks

Note

For all returned data attributes, see SMS Trunk Object.

URI Query Parameters#

Name

Type

Is Required?

Description

include

string

No

Inclusion

filter[<filter_name>]

string

No

Filtering

fields[sms_trunks]

string

No

Sparse fieldsets

sort

string

No

Sorting

page[number]

integer

No

Page number.

page[size]

integer

No

Page size. Pagination defaults to 50 records per page. The maximum is 100.

Includes#

Value

Description

outgoing_dids

DID Object. DIDs allowed as the source address of outbound messages.

incoming_dids

DID Object. DIDs routed to the trunk for inbound messages.

sms_trunk_group

SMS Trunk Group Object

sender_id_verifications

Sender ID Verification Object. Sender ID verifications routed through the trunk.

Filters#

Filter Name

Type

Allow Blank

Allow Array

Filters by:

id

string

No

Yes

The trunk id field.

name

string

No

Yes

The trunk name field (exact match).

external_reference_id

string

No

No

The external_reference_id field.

configuration.type

string

No

Yes

The configuration.type field. Possible values: sms_to_email, http_in, http_out, smpp_esme, smpp_smsc. Any other value returns 400 Bad Request.

Sorting#

Value

Sorts by:

name

The name field.

external_reference_id

The external_reference_id field.

blocked

The blocked field.

priority

The priority field.

allow_in

The allow_in field.

allow_out

The allow_out field.

created_at

The created_at field.

updated_at

The updated_at field.

Prefix a value with - to sort in descending order.

Examples#

http

1GET /v3/sms_trunks HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Authorization: Bearer [access token]

curl

1curl -i -X GET https://api.didww.com/v3/sms_trunks -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]"

response

  1HTTP/1.1 200 OK
  2Content-Type: application/vnd.api+json
  3
  4{
  5  "data": [
  6    {
  7      "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24",
  8      "type": "sms_trunks",
  9      "attributes": {
 10        "name": "Inbound webhook",
 11        "external_reference_id": null,
 12        "blocked": false,
 13        "priority": 100,
 14        "allow_any_did_as_source": false,
 15        "allow_in": true,
 16        "allow_out": false,
 17        "created_at": "2026-10-22T09:15:42.118Z",
 18        "updated_at": "2026-10-22T09:15:42.118Z",
 19        "configuration": {
 20          "type": "http_in",
 21          "attributes": {
 22            "http_method": "post",
 23            "url": "https://example.com/sms",
 24            "query_parameters": null,
 25            "headers": {
 26              "X-Source": "didww"
 27            },
 28            "follow_redirect": false,
 29            "validate_https_certificate": true,
 30            "body_type": "json",
 31            "body": "{\"text\":\"{SMS_TEXT}\",\"from\":\"{SMS_SRC_ADDR}\",\"to\":\"{SMS_DST_ADDR}\"}"
 32          }
 33        }
 34      },
 35      "relationships": {
 36        "outgoing_dids": {
 37          "links": {
 38            "self": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/relationships/outgoing_dids",
 39            "related": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/outgoing_dids"
 40          }
 41        },
 42        "incoming_dids": {
 43          "links": {
 44            "self": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/relationships/incoming_dids",
 45            "related": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/incoming_dids"
 46          }
 47        },
 48        "sms_trunk_group": {
 49          "links": {
 50            "self": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/relationships/sms_trunk_group",
 51            "related": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/sms_trunk_group"
 52          }
 53        },
 54        "sender_id_verifications": {
 55          "links": {
 56            "self": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/relationships/sender_id_verifications",
 57            "related": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/sender_id_verifications"
 58          }
 59        }
 60      }
 61    },
 62    {
 63      "id": "6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13",
 64      "type": "sms_trunks",
 65      "attributes": {
 66        "name": "Outbound HTTP",
 67        "external_reference_id": null,
 68        "blocked": false,
 69        "priority": null,
 70        "allow_any_did_as_source": false,
 71        "allow_in": false,
 72        "allow_out": true,
 73        "created_at": "2026-10-22T09:15:42.118Z",
 74        "updated_at": "2026-10-22T09:15:42.118Z",
 75        "configuration": {
 76          "type": "http_out",
 77          "attributes": {
 78            "callback_url": "https://example.com/sms/status",
 79            "allowed_ips": [
 80              "203.0.113.10/32"
 81            ],
 82            "auth_name": "k3v9xq2m7p",
 83            "auth_password": "w8r2c5n1zt"
 84          }
 85        }
 86      },
 87      "relationships": {
 88        "outgoing_dids": {
 89          "links": {
 90            "self": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/relationships/outgoing_dids",
 91            "related": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/outgoing_dids"
 92          }
 93        },
 94        "incoming_dids": {
 95          "links": {
 96            "self": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/relationships/incoming_dids",
 97            "related": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/incoming_dids"
 98          }
 99        },
100        "sms_trunk_group": {
101          "links": {
102            "self": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/relationships/sms_trunk_group",
103            "related": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/sms_trunk_group"
104          }
105        },
106        "sender_id_verifications": {
107          "links": {
108            "self": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/relationships/sender_id_verifications",
109            "related": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/sender_id_verifications"
110          }
111        }
112      },
113      "meta": {
114        "host": "https://us.sms-out.didww.com/outbound_messages"
115      }
116    }
117  ],
118  "meta": {
119    "api_version": "2026-11-19",
120    "total_records": 2
121  },
122  "links": {
123    "first": "https://api.didww.com/v3/sms_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50",
124    "last": "https://api.didww.com/v3/sms_trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50"
125  }
126}

Other Responses#

Code

Success

Description

400

No

Bad Request

401

No

Unauthorized

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.