# Create SMS Trunk

Creates an SMS trunk.

The `configuration` object is required. Its `type` decides which configuration
attributes the trunk takes and whether the trunk handles inbound messages, outbound
messages, or both. The type cannot be changed after the trunk is created.

## Request

HTTP Method: `POST`

URI Path: `/v3/sms_trunks`

### Request Body Object Attributes

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| name | `string` | No | Yes | Friendly name of the SMS trunk. 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 in the customer's external system. Maximum length is 100 characters. |
| blocked | `boolean` | No | No | When `true`, the trunk does not handle messages. Default value is `false`. |
| priority | `integer` | Yes | No | Routing priority of the trunk within its SMS trunk group. The range is 0-32767. On `sms_to_email`, `http_in`, `smpp_esme`, and `smpp_smsc` trunks, the value `100` is used when `priority` is omitted or `null`. On `http_out` trunks, `priority` must be omitted or `null`. |
| allow\_any\_did\_as\_source | `boolean` | No | No | When `true`, any DID of the account can be used as the source address of messages sent through the trunk, and `outgoing_dids` must be empty. Can be enabled only on `http_out`, `smpp_esme`, and `smpp_smsc` trunks. Default value is `false`. |
| configuration | `object` | No | Yes | Trunk configuration object with `type` and `attributes`. `type` is one of `sms_to_email`, `http_in`, `http_out`, `smpp_esme`, `smpp_smsc`. See [Configuration Attributes by Type](#sms-trunk-create-configuration-v35). |

### Request Body Object Relationships

| Name | Type | Description |
| --- | --- | --- |
| outgoing\_dids | [To many](../../../specification/relationships.html#api-relationships) | DIDs allowed as the source address of messages sent through the trunk. Applies to `http_out`, `smpp_esme`, and `smpp_smsc` trunks. Must be empty while `allow_any_did_as_source` is `true`. Only DIDs of the account that support the `p2p` feature are accepted; a DID awaiting registration is rejected. |
| sms\_trunk\_group | [To one](../../../specification/relationships.html#api-relationships) | The [SMS Trunk Group](../sms-trunk-groups/index.html) the trunk joins, or `null`. Not allowed on `http_out` trunks. |

Inbound routing is not configured on the trunk: to route a DID to the trunk, update the
`sms_trunk` relationship of the [DID](../did/index.html).

### Configuration Attributes by Type

Send the configuration attributes in `configuration.attributes`. Read-only attributes
(`auth_name` and `auth_password` of `http_out` trunks, `system_id` and `password`
of `smpp_esme` trunks) are generated by DIDWW and must not be sent. An attribute that
does not belong to the selected type is rejected. For the returned attributes, see
[Configuration](sms-trunk-object.html#sms-trunk-configuration-v35).

sms\_to\_emailhttp\_inhttp\_outsmpp\_esmesmpp\_smsc

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| send\_to | `string` | No | Yes | Recipient email address. |
| subject | `string` | No | Yes | Email subject template. |
| message | `string` | No | Yes | Email body template. |

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| url | `string` | No | Yes | Endpoint the request is sent to. |
| http\_method | `string` | No | Yes | Possible values: `get`; `post`; `put`. |
| query\_parameters | `object` | Yes | No | Query parameters added to the request, as an object of string names and string values. |
| headers | `object` | Yes | No | Headers added to the request, as an object of string names and string values. |
| body\_type | `string` | Yes | Conditional | How `body` is encoded. Possible values: `json`; `html_multipart`; `html_url_encoded`; `raw`. Required when `http_method` is `post` or `put`. Must be omitted or `null` when it is `get`. |
| body | `string` or `object` | Yes | Conditional | Request body template. With `json`, a JSON object encoded as a string. With `html_multipart` or `html_url_encoded`, an object of string names and string values. With `raw`, a string. Required when `http_method` is `post` or `put`. Must be omitted or `null` when it is `get`. |
| follow\_redirect | `boolean` | No | No | Follow 3xx responses. Default value is `false`. |
| validate\_https\_certificate | `boolean` | No | No | Reject an untrusted TLS certificate of the endpoint. Default value is `true`. |

The query parameters, headers, and body can use the placeholders `{SMS_TEXT}`,
`{SMS_TEXT_BASE64_ENCODED}`, `{SMS_SRC_ADDR}`, `{SMS_DST_ADDR}`, and `{SMS_TIME}`.
See [Available variables](../../../../sms/sms-trunks/technical-data/http-specification.html#sms-in-spec-variables).

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| callback\_url | `string` | Yes | No | HTTP(S) URL to which DIDWW sends the status events of messages submitted through the trunk. See [SMS OUT callbacks](../../../../sms/outbound-sms-api/status-callbacks-and-delivery-receipts.html#sms-out-spec-callbacks). |
| allowed\_ips | Array of `strings` | Yes | No | IP addresses from which messages are accepted, in the format (IPv4|IPv6)[/mask]. Up to 15 unique entries. When empty, messages are accepted from any address. |

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| server\_location | `string` | No | Yes | Location of the DIDWW SMPP server the trunk is served from. Possible values: `nyc` (US, NY), `ams` (NL, AMS). In the sandbox environment only `nyc` is accepted. See [Server locations and IP addresses](../../../../sms/sms-trunks/technical-data/smpp-specification.html#smpp-endpoints). |
| system\_type | `string` | Yes | No | SMPP `system_type`. Maximum length is 12 characters. |
| allowed\_ips | Array of `strings` | Yes | No | IP addresses from which the ESME may bind, in the format (IPv4|IPv6)[/mask]. Up to 15 unique entries. When empty, binding is allowed from any address. |

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| host | `string` | No | Yes | SMSC host DIDWW binds to. |
| system\_id | `string` | No | Yes | SMPP `system_id` DIDWW binds with. Maximum length is 15 characters. |
| password | `string` | No | Yes | SMPP bind password. Maximum length is 8 characters. |
| server\_location | `string` | No | Yes | Location of the DIDWW SMPP server that connects to the SMSC. Possible values: `nyc` (US, NY), `ams` (NL, AMS). In the sandbox environment only `nyc` is accepted. See [Server locations and IP addresses](../../../../sms/sms-trunks/technical-data/smpp-specification.html#smpp-endpoints). |
| system\_type | `string` | Yes | No | SMPP `system_type`. Maximum length is 12 characters. |
| tx\_port | `integer` | No | No | Transmitter port. Default value is `2775`. |
| rx\_port | `integer` | No | No | Receiver port. Default value is `2776`. |
| transceiver\_mode | `boolean` | No | No | Bind as a transceiver instead of separate transmitter and receiver binds. Default value is `false`. |
| connection\_timeout | `integer` | No | No | Bind timeout in seconds. Default value is `20`. |
| use\_ssl | `boolean` | No | No | Wrap the connection in TLS. Default value is `false`. |

## Examples

sms\_to\_emailhttp\_inhttp\_outsmpp\_esmesmpp\_smsc

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /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]
 6
 7{
 8  "data": {
 9    "type": "sms_trunks",
10    "attributes": {
11      "name": "Inbound email",
12      "configuration": {
13        "type": "sms_to_email",
14        "attributes": {
15          "send_to": "sms@example.com",
16          "subject": "New SMS from {SMS_SRC_ADDR}",
17          "message": "{SMS_TIME} {SMS_SRC_ADDR} -> {SMS_DST_ADDR}: {SMS_TEXT}"
18        }
19      }
20    }
21  }
22}
```

curl

```
1curl -i -X POST 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]" --data-raw '{"data": {"attributes": {"configuration": {"attributes": {"message": "{SMS_TIME} {SMS_SRC_ADDR} -> {SMS_DST_ADDR}: {SMS_TEXT}", "send_to": "sms@example.com", "subject": "New SMS from {SMS_SRC_ADDR}"}, "type": "sms_to_email"}, "name": "Inbound email"}, "type": "sms_trunks"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90",
 7    "type": "sms_trunks",
 8    "attributes": {
 9      "name": "Inbound email",
10      "external_reference_id": null,
11      "blocked": false,
12      "priority": 100,
13      "allow_any_did_as_source": false,
14      "allow_in": true,
15      "allow_out": false,
16      "created_at": "2026-10-22T09:15:42.118Z",
17      "updated_at": "2026-10-22T09:15:42.118Z",
18      "configuration": {
19        "type": "sms_to_email",
20        "attributes": {
21          "send_to": "sms@example.com",
22          "subject": "New SMS from {SMS_SRC_ADDR}",
23          "message": "{SMS_TIME} {SMS_SRC_ADDR} -> {SMS_DST_ADDR}: {SMS_TEXT}"
24        }
25      }
26    },
27    "relationships": {
28      "outgoing_dids": {
29        "links": {
30          "self": "https://api.didww.com/v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90/relationships/outgoing_dids",
31          "related": "https://api.didww.com/v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90/outgoing_dids"
32        }
33      },
34      "incoming_dids": {
35        "links": {
36          "self": "https://api.didww.com/v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90/relationships/incoming_dids",
37          "related": "https://api.didww.com/v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90/incoming_dids"
38        }
39      },
40      "sms_trunk_group": {
41        "links": {
42          "self": "https://api.didww.com/v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90/relationships/sms_trunk_group",
43          "related": "https://api.didww.com/v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90/sms_trunk_group"
44        }
45      },
46      "sender_id_verifications": {
47        "links": {
48          "self": "https://api.didww.com/v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90/relationships/sender_id_verifications",
49          "related": "https://api.didww.com/v3/sms_trunks/0b1f6c2e-5d4a-4f8e-9c3b-7a2d1e6f4b90/sender_id_verifications"
50        }
51      }
52    }
53  },
54  "meta": {
55    "api_version": "2026-11-19"
56  }
57}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /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]
 6
 7{
 8  "data": {
 9    "type": "sms_trunks",
10    "attributes": {
11      "name": "Inbound webhook",
12      "configuration": {
13        "type": "http_in",
14        "attributes": {
15          "http_method": "post",
16          "url": "https://example.com/sms",
17          "headers": {
18            "X-Source": "didww"
19          },
20          "body_type": "json",
21          "body": "{\"text\":\"{SMS_TEXT}\",\"from\":\"{SMS_SRC_ADDR}\",\"to\":\"{SMS_DST_ADDR}\"}"
22        }
23      }
24    }
25  }
26}
```

curl

```
1curl -i -X POST 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]" --data-raw '{"data": {"attributes": {"configuration": {"attributes": {"body": "{\"text\":\"{SMS_TEXT}\",\"from\":\"{SMS_SRC_ADDR}\",\"to\":\"{SMS_DST_ADDR}\"}", "body_type": "json", "headers": {"X-Source": "didww"}, "http_method": "post", "url": "https://example.com/sms"}, "type": "http_in"}, "name": "Inbound webhook"}, "type": "sms_trunks"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24",
 7    "type": "sms_trunks",
 8    "attributes": {
 9      "name": "Inbound webhook",
10      "external_reference_id": null,
11      "blocked": false,
12      "priority": 100,
13      "allow_any_did_as_source": false,
14      "allow_in": true,
15      "allow_out": false,
16      "created_at": "2026-10-22T09:15:42.118Z",
17      "updated_at": "2026-10-22T09:15:42.118Z",
18      "configuration": {
19        "type": "http_in",
20        "attributes": {
21          "http_method": "post",
22          "url": "https://example.com/sms",
23          "query_parameters": null,
24          "headers": {
25            "X-Source": "didww"
26          },
27          "follow_redirect": false,
28          "validate_https_certificate": true,
29          "body_type": "json",
30          "body": "{\"text\":\"{SMS_TEXT}\",\"from\":\"{SMS_SRC_ADDR}\",\"to\":\"{SMS_DST_ADDR}\"}"
31        }
32      }
33    },
34    "relationships": {
35      "outgoing_dids": {
36        "links": {
37          "self": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/relationships/outgoing_dids",
38          "related": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/outgoing_dids"
39        }
40      },
41      "incoming_dids": {
42        "links": {
43          "self": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/relationships/incoming_dids",
44          "related": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/incoming_dids"
45        }
46      },
47      "sms_trunk_group": {
48        "links": {
49          "self": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/relationships/sms_trunk_group",
50          "related": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/sms_trunk_group"
51        }
52      },
53      "sender_id_verifications": {
54        "links": {
55          "self": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/relationships/sender_id_verifications",
56          "related": "https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24/sender_id_verifications"
57        }
58      }
59    }
60  },
61  "meta": {
62    "api_version": "2026-11-19"
63  }
64}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /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]
 6
 7{
 8  "data": {
 9    "type": "sms_trunks",
10    "attributes": {
11      "name": "Outbound HTTP",
12      "configuration": {
13        "type": "http_out",
14        "attributes": {
15          "callback_url": "https://example.com/sms/status",
16          "allowed_ips": [
17            "203.0.113.10"
18          ]
19        }
20      }
21    }
22  }
23}
```

curl

```
1curl -i -X POST 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]" --data-raw '{"data": {"attributes": {"configuration": {"attributes": {"allowed_ips": ["203.0.113.10"], "callback_url": "https://example.com/sms/status"}, "type": "http_out"}, "name": "Outbound HTTP"}, "type": "sms_trunks"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13",
 7    "type": "sms_trunks",
 8    "attributes": {
 9      "name": "Outbound HTTP",
10      "external_reference_id": null,
11      "blocked": false,
12      "priority": null,
13      "allow_any_did_as_source": false,
14      "allow_in": false,
15      "allow_out": true,
16      "created_at": "2026-10-22T09:15:42.118Z",
17      "updated_at": "2026-10-22T09:15:42.118Z",
18      "configuration": {
19        "type": "http_out",
20        "attributes": {
21          "callback_url": "https://example.com/sms/status",
22          "allowed_ips": [
23            "203.0.113.10/32"
24          ],
25          "auth_name": "k3v9xq2m7p",
26          "auth_password": "w8r2c5n1zt"
27        }
28      }
29    },
30    "relationships": {
31      "outgoing_dids": {
32        "links": {
33          "self": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/relationships/outgoing_dids",
34          "related": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/outgoing_dids"
35        }
36      },
37      "incoming_dids": {
38        "links": {
39          "self": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/relationships/incoming_dids",
40          "related": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/incoming_dids"
41        }
42      },
43      "sms_trunk_group": {
44        "links": {
45          "self": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/relationships/sms_trunk_group",
46          "related": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/sms_trunk_group"
47        }
48      },
49      "sender_id_verifications": {
50        "links": {
51          "self": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/relationships/sender_id_verifications",
52          "related": "https://api.didww.com/v3/sms_trunks/6a2d4f8b-1c3e-4b7a-9e5f-2d8c0b6a4f13/sender_id_verifications"
53        }
54      }
55    },
56    "meta": {
57      "host": "https://us.sms-out.didww.com/outbound_messages"
58    }
59  },
60  "meta": {
61    "api_version": "2026-11-19"
62  }
63}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /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]
 6
 7{
 8  "data": {
 9    "type": "sms_trunks",
10    "attributes": {
11      "name": "SMPP ESME",
12      "configuration": {
13        "type": "smpp_esme",
14        "attributes": {
15          "allowed_ips": [
16            "203.0.113.10",
17            "198.51.100.0/24"
18          ],
19          "server_location": "nyc"
20        }
21      }
22    },
23    "relationships": {
24      "outgoing_dids": {
25        "data": [
26          {
27            "type": "dids",
28            "id": "9f1e3d5b-7a2c-4c6e-8b0d-4e6a8c2f1d35"
29          },
30          {
31            "type": "dids",
32            "id": "2b4d6f8a-1c3e-4a5b-9d7f-0e2c4a6b8d13"
33          }
34        ]
35      }
36    }
37  }
38}
```

curl

```
1curl -i -X POST 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]" --data-raw '{"data": {"attributes": {"configuration": {"attributes": {"allowed_ips": ["203.0.113.10", "198.51.100.0/24"], "server_location": "nyc"}, "type": "smpp_esme"}, "name": "SMPP ESME"}, "relationships": {"outgoing_dids": {"data": [{"type": "dids", "id": "9f1e3d5b-7a2c-4c6e-8b0d-4e6a8c2f1d35"}, {"type": "dids", "id": "2b4d6f8a-1c3e-4a5b-9d7f-0e2c4a6b8d13"}]}}, "type": "sms_trunks"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67",
 7    "type": "sms_trunks",
 8    "attributes": {
 9      "name": "SMPP ESME",
10      "external_reference_id": null,
11      "blocked": false,
12      "priority": 100,
13      "allow_any_did_as_source": false,
14      "allow_in": true,
15      "allow_out": true,
16      "created_at": "2026-10-22T09:15:42.118Z",
17      "updated_at": "2026-10-22T09:15:42.118Z",
18      "configuration": {
19        "type": "smpp_esme",
20        "attributes": {
21          "allowed_ips": [
22            "203.0.113.10/32",
23            "198.51.100.0/24"
24          ],
25          "system_id": "a7k2m9x4",
26          "system_type": null,
27          "password": "p3z8q1w6",
28          "server_location": "nyc"
29        }
30      }
31    },
32    "relationships": {
33      "outgoing_dids": {
34        "links": {
35          "self": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/relationships/outgoing_dids",
36          "related": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/outgoing_dids"
37        }
38      },
39      "incoming_dids": {
40        "links": {
41          "self": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/relationships/incoming_dids",
42          "related": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/incoming_dids"
43        }
44      },
45      "sms_trunk_group": {
46        "links": {
47          "self": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/relationships/sms_trunk_group",
48          "related": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/sms_trunk_group"
49        }
50      },
51      "sender_id_verifications": {
52        "links": {
53          "self": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/relationships/sender_id_verifications",
54          "related": "https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67/sender_id_verifications"
55        }
56      }
57    }
58  },
59  "meta": {
60    "api_version": "2026-11-19"
61  }
62}
```

[[DIDWW-API-EXAMPLE-END]]

[[DIDWW-API-EXAMPLE-START]]

http

```
 1POST /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]
 6
 7{
 8  "data": {
 9    "type": "sms_trunks",
10    "attributes": {
11      "name": "SMPP SMSC",
12      "priority": 10,
13      "configuration": {
14        "type": "smpp_smsc",
15        "attributes": {
16          "host": "smsc.example.com",
17          "system_id": "didww",
18          "password": "s3cr3t",
19          "server_location": "ams"
20        }
21      }
22    },
23    "relationships": {
24      "sms_trunk_group": {
25        "data": {
26          "type": "sms_trunk_groups",
27          "id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46"
28        }
29      }
30    }
31  }
32}
```

curl

```
1curl -i -X POST 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]" --data-raw '{"data": {"attributes": {"configuration": {"attributes": {"host": "smsc.example.com", "password": "s3cr3t", "server_location": "ams", "system_id": "didww"}, "type": "smpp_smsc"}, "name": "SMPP SMSC", "priority": 10}, "relationships": {"sms_trunk_group": {"data": {"id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46", "type": "sms_trunk_groups"}}}, "type": "sms_trunks"}}'
```

response

```
 1HTTP/1.1 201 Created
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28",
 7    "type": "sms_trunks",
 8    "attributes": {
 9      "name": "SMPP SMSC",
10      "external_reference_id": null,
11      "blocked": false,
12      "priority": 10,
13      "allow_any_did_as_source": false,
14      "allow_in": true,
15      "allow_out": true,
16      "created_at": "2026-10-22T09:15:42.118Z",
17      "updated_at": "2026-10-22T09:15:42.118Z",
18      "configuration": {
19        "type": "smpp_smsc",
20        "attributes": {
21          "system_id": "didww",
22          "system_type": null,
23          "host": "smsc.example.com",
24          "tx_port": 2775,
25          "rx_port": 2776,
26          "transceiver_mode": false,
27          "connection_timeout": 20,
28          "use_ssl": false,
29          "password": "s3cr3t",
30          "server_location": "ams"
31        }
32      }
33    },
34    "relationships": {
35      "outgoing_dids": {
36        "links": {
37          "self": "https://api.didww.com/v3/sms_trunks/a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28/relationships/outgoing_dids",
38          "related": "https://api.didww.com/v3/sms_trunks/a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28/outgoing_dids"
39        }
40      },
41      "incoming_dids": {
42        "links": {
43          "self": "https://api.didww.com/v3/sms_trunks/a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28/relationships/incoming_dids",
44          "related": "https://api.didww.com/v3/sms_trunks/a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28/incoming_dids"
45        }
46      },
47      "sms_trunk_group": {
48        "links": {
49          "self": "https://api.didww.com/v3/sms_trunks/a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28/relationships/sms_trunk_group",
50          "related": "https://api.didww.com/v3/sms_trunks/a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28/sms_trunk_group"
51        }
52      },
53      "sender_id_verifications": {
54        "links": {
55          "self": "https://api.didww.com/v3/sms_trunks/a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28/relationships/sender_id_verifications",
56          "related": "https://api.didww.com/v3/sms_trunks/a1d3f5b7-4c2e-4e8a-9b6d-3e7f1c5a9d28/sender_id_verifications"
57        }
58      }
59    }
60  },
61  "meta": {
62    "api_version": "2026-11-19"
63  }
64}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 422 | No | [Validation Error Object](../../../specification/errors/index.html#api-validation-error-object) |
| 400 | No | [Bad Request](../../../specification/errors/index.html#api-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](../../authentication.html#authentication-v35) |
| 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](../../authentication.html#authentication-scopes-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. |
