# 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](sms-trunk-object.html).

### URI Query Parameters

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| include | `string` | No | [Inclusion](../../../specification/includes.html#api-includes) |
| filter[<filter\_name>] | `string` | No | [Filtering](../../../specification/filtering.html#api-filters) |
| fields[sms\_trunks] | `string` | No | [Sparse fieldsets](../../../specification/sparse-fieldsets.html#api-sparse-fieldsets) |
| sort | `string` | No | [Sorting](../../../specification/sorting.html#api-sorting) |
| page[number] | `integer` | No | [Page number](../../../specification/pagination.html#api-pagination). |
| page[size] | `integer` | No | [Page size](../../../specification/pagination.html#api-pagination). Pagination defaults to `50` records per page. The maximum is `100`. |

### Includes

| Value | Description |
| --- | --- |
| outgoing\_dids | [DID Object](../did/did-object.html#did-object-v35). DIDs allowed as the source address of outbound messages. |
| incoming\_dids | [DID Object](../did/did-object.html#did-object-v35). DIDs routed to the trunk for inbound messages. |
| sms\_trunk\_group | [SMS Trunk Group Object](../sms-trunk-groups/sms-trunk-group-object.html#sms-trunk-group-object-v35) |
| sender\_id\_verifications | [Sender ID Verification Object](../sender-id-verifications/sender-id-verification-object.html#sender-id-verification-object-v35). 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

Simple RequestFilter by Configuration Type

[[DIDWW-API-EXAMPLE-START]]

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}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
1GET /v3/sms_trunks?filter%5Bconfiguration.type%5D=smpp_esme 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?filter%5Bconfiguration.type%5D=smpp_esme' -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": "8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67",
 8      "type": "sms_trunks",
 9      "attributes": {
10        "name": "SMPP ESME",
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": true,
17        "created_at": "2026-10-22T09:15:42.118Z",
18        "updated_at": "2026-10-22T09:15:42.118Z",
19        "configuration": {
20          "type": "smpp_esme",
21          "attributes": {
22            "allowed_ips": [
23              "203.0.113.10/32",
24              "198.51.100.0/24"
25            ],
26            "system_id": "a7k2m9x4",
27            "system_type": null,
28            "password": "p3z8q1w6",
29            "server_location": "nyc"
30          }
31        }
32      },
33      "relationships": {
34        "outgoing_dids": {
35          "links": {
36            "self": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/relationships/outgoing_dids",
37            "related": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/outgoing_dids"
38          }
39        },
40        "incoming_dids": {
41          "links": {
42            "self": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/relationships/incoming_dids",
43            "related": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/incoming_dids"
44          }
45        },
46        "sms_trunk_group": {
47          "links": {
48            "self": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/relationships/sms_trunk_group",
49            "related": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/sms_trunk_group"
50          }
51        },
52        "sender_id_verifications": {
53          "links": {
54            "self": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/relationships/sender_id_verifications",
55            "related": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/sender_id_verifications"
56          }
57        }
58      }
59    }
60  ],
61  "meta": {
62    "api_version": "2026-11-19",
63    "total_records": 1
64  },
65  "links": {
66    "first": "https://api.didww.com/v3/sms_trunks?filter%5Bconfiguration.type%5D=smpp_esme&page%5Bnumber%5D=1&page%5Bsize%5D=50",
67    "last": "https://api.didww.com/v3/sms_trunks?filter%5Bconfiguration.type%5D=smpp_esme&page%5Bnumber%5D=1&page%5Bsize%5D=50"
68  }
69}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 400 | No | [Bad Request](../../../specification/errors/index.html#api-bad-request) |
| 401 | No | [Unauthorized](../../authentication.html#authentication-v35) |
| 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. |
