Update SMS Trunk#
Updates an SMS trunk.
All attributes and relationships are optional. The configuration type cannot be changed:
in configuration, type must match the trunk’s type, and a different type is
rejected with 422. The configuration attributes you send are written and the others keep
their stored values. For example, when you change http_method of an http_in trunk to
get, also send body_type and body as null.
Request#
HTTP Method: PATCH
URI Path: /v3/sms_trunks/{id}
URI Query Parameters#
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
id |
|
Yes |
Unique identifier of the SMS trunk. |
Request Body Object Attributes#
Name |
Type |
Nullable |
Is Required? |
Description |
|---|---|---|---|---|
name |
|
No |
No |
Friendly name of the SMS trunk. Must be unique among the SMS trunks and SMS trunk groups of the account. |
external_reference_id |
|
Yes |
No |
Optional identifier for the SMS trunk in the customer’s external system. Maximum length is 100 characters. |
blocked |
|
No |
No |
When |
priority |
|
Yes |
No |
Routing priority of the trunk within its SMS trunk group. The range is 0-32767. On |
allow_any_did_as_source |
|
No |
No |
When |
configuration |
|
No |
No |
Trunk configuration object with |
Request Body Object Relationships#
Name |
Type |
Description |
|---|---|---|
outgoing_dids |
Replaces the DIDs allowed as the source address of messages sent through the trunk. Applies to |
|
sms_trunk_group |
The SMS Trunk Group the trunk joins, or |
Generated credentials cannot be changed through this endpoint. Use Regenerate SMS Trunk Credentials instead.
Examples#
http
1PATCH /v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24 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 "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24",
10 "type": "sms_trunks",
11 "attributes": {
12 "configuration": {
13 "type": "http_in",
14 "attributes": {
15 "url": "https://example.com/sms/v2"
16 }
17 }
18 }
19 }
20}
curl
1curl -i -X PATCH https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"configuration": {"attributes": {"url": "https://example.com/sms/v2"}, "type": "http_in"}}, "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24", "type": "sms_trunks"}}'
response
1HTTP/1.1 200 OK
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-22T10:02:17.541Z",
18 "configuration": {
19 "type": "http_in",
20 "attributes": {
21 "http_method": "post",
22 "url": "https://example.com/sms/v2",
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}
http
1PATCH /v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67 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 "id": "8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67",
10 "type": "sms_trunks",
11 "attributes": {
12 "allow_any_did_as_source": true
13 }
14 }
15}
curl
1curl -i -X PATCH https://api.didww.com/v3/sms_trunks/8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"allow_any_did_as_source": true}, "id": "8e4b2c6a-9d1f-4a3e-b7c5-5f0d2e8a1b67", "type": "sms_trunks"}}'
response
1HTTP/1.1 200 OK
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": true,
14 "allow_in": true,
15 "allow_out": true,
16 "created_at": "2026-10-22T09:15:42.118Z",
17 "updated_at": "2026-10-22T10:02:17.541Z",
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}
http
1PATCH /v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24 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 "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24",
10 "type": "sms_trunks",
11 "attributes": {
12 "priority": 50
13 },
14 "relationships": {
15 "sms_trunk_group": {
16 "data": {
17 "type": "sms_trunk_groups",
18 "id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46"
19 }
20 }
21 }
22 }
23}
curl
1curl -i -X PATCH https://api.didww.com/v3/sms_trunks/3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"priority": 50}, "id": "3c7e9a1d-2b4f-4e6a-8d5c-1f9b0a7e3c24", "relationships": {"sms_trunk_group": {"data": {"id": "c5e7a9b1-6d3f-4f2a-8c4e-9b1d7f3a5e46", "type": "sms_trunk_groups"}}}, "type": "sms_trunks"}}'
response
1HTTP/1.1 200 OK
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": 50,
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-22T10:02:17.541Z",
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}
Other Responses#
Code |
Success |
Description |
|---|---|---|
404 |
No |
|
422 |
No |
|
400 |
No |
|
401 |
No |
|
403 |
No |
The access token carries the |
429 |
No |
The request budget of the account for the current window is spent ( |